Project

General

Profile

Actions

Bug #1056

closed

DcmCodec::updateImageType() adds Image Type (0008,0008) with incorrect value

Added by Jörg Riesmeier over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
Start date:
2023-01-11
Due date:
% Done:

100%

Estimated time:
3:00 h
Module:
dcmdata, dcmjpeg, dcmimage, others?
Operating System:
Compiler:

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.


Related issues 1 (1 open0 closed)

Related to DCMTK - Bug #1068: Check whether Frame Type (0008,9007) also needs to be updated when using lossy compressionNew2023-02-23

Actions
Actions

Also available in: Atom PDF