the following code behaves differently in dcmtk 3.6.3 vs 3.6.6
Code: Select all
auto originalTS = m_dataset->getOriginalXfer(); //EXS_JPEGProcess14SV1
auto cond = m_dataset->chooseRepresentation(EXS_LittleEndianExplicit, nullptr); // no errors
//prepare to write object to stream
m_dfile->transferInit();
m_dfile->validateMetaInfo(EXS_JPEGProcess14SV1); // no erros
auto isValid = m_dataset->canWriteXfer(EXS_JPEGProcess14SV1) // returns true in v3.6.3 and false in v3.6.6
//elementLength returns the correct answer '31494' in v3.6.3; v3.6.6 returns '4404'
Uint32 elementLength =
m_dfile->getMetaInfo()->calcElementLength(EXS_JPEGProcess14SV1, EET_ExplicitLength) +
m_dfile->getDataset()->calcElementLength(EXS_JPEGProcess14SV1, EET_ExplicitLength);
My questions are:
1. what changed in version 3.6.6
2. why does m_dataset->canWriteXfer(EXS_JPEGProcess14SV1) return false if the dataset's original syntax is EXS_JPEGProcess14SV1.
3. switching the current representation back to EXS_JPEGProcess14SV1 seems to fix the elementLength, why is this necessary ?