Bug #1056
closedDcmCodec::updateImageType() adds Image Type (0008,0008) with incorrect value
100%
Description
When compressing a DICOM image with JPEG Baseline, the JPEG encoder calls DcmCodec::updateImageType(), which adds the Image Type (0008,0008) Attribute with a possibly invalid value.
For example, compressing a DICOM Secondary Capture image that does not contain the Image Type (0008,0008) Attribute with the following command:
dcmcjpeg +eb -d SC.dcm SC_jpg.dcm
... results in an invalid value of "DERIVED" for the Image Type (0008,0008) Attribute. This value is invalid because the Value Multiplicity is "2-n" according to DICOM PS3.6, i.e. at least two values should be present.
The tool "dciodvfy" reports the following errors:
Error - Bad attribute Value Multiplicity 1 (2-n Required by Dictionary) Element=<ImageType> Module=<GeneralImage> Error - Bad attribute Value Multiplicity Type 3 Optional Element=<ImageType> Module=<GeneralImage>
The same is probably true for other compression schemes, e.g. RLE, and other command line tools like dcmquant, as they also call the above-mentioned function.