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.
Updated by Jörg Riesmeier over 2 years ago
It should also be checked whether "DERIVED" is always the correct Value at position 1. For some IODs (e.g. Enhanced CT and MR), there is a third Enumerated Value: MIXED. See PS3.3 Table C.8-127 for details.
In this context, the Frame Type (0008,9007) Attribute also needs to be checked and possibly modified.
Updated by Jörg Riesmeier over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Estimated time set to 3:00 h
Closed with commit e26565202.
Updated by Jörg Riesmeier over 2 years ago
- Related to Bug #1068: Check whether Frame Type (0008,9007) also needs to be updated when using lossy compression added