I configure read flags enough to read DICOM SR, because I find many unrightful tags in DICOM SR.
If there is NumericValue that violated DICOM standard in DICOM SR, DCMTK does not read MeasurementUnitsCodeSequence.
For example, when NumericValue violates maximum VR length.
I found the appropriate source for this issue.
Code: Select all
#dcmsr - dsrnumvl.cc
OFCondition DSRNumericMeasurementValue::readItem(DcmItem &dataset)
{
/* read NumericValue */
OFCondition result = DSRTypes::getAndCheckStringValueFromDataset(dataset, DCM_NumericValue, NumericValue, "1", "1", "MeasuredValueSequence");
if (result.good())
{
/* read some optional attributes */
DSRTypes::getAndCheckElementFromDataset(dataset, FloatingPointValue, "1", "1C", "MeasuredValueSequence");
if (DSRTypes::getAndCheckElementFromDataset(dataset, RationalNumeratorValue, "1", "1C", "MeasuredValueSequence").good())
DSRTypes::getAndCheckElementFromDataset(dataset, RationalDenominatorValue, "1", "1" /* was 1C */, "MeasuredValueSequence");
/* read MeasurementUnitsCodeSequence */
result = MeasurementUnit.readSequence(dataset, DCM_MeasurementUnitsCodeSequence, "1" /*type*/);
}
return result;
}
Therefore, the subsequent process does not work.
Can you change this behavior, or is this right?