Project

General

Profile

Actions

Bug #1043

closed

DCMTK does not handle uncompressed color images with YBR_FULL_422 color model correctly

Added by Marco Eichelberg almost 3 years ago. Updated over 2 years ago.

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

100%

Estimated time:
4:00 h
Module:
dcmdata, dcmjpeg, dcmjpls, dcmjp2k
Operating System:
Compiler:

Description

DcmPixelData::getUncompressedFrame() fails to correctly process uncompressed color images with YBR_FULL_422 photometric interpretation, an encoding that is unusual but explicitly permitted in DICOM. Furthermore, the various compression encoders in DCMTK also fail to handle such images. In both cases, this is caused by DcmElement::getUncompressedFrameSize(), which does not take into account that in this case, frame size is rows * columns * 2 and not rows * columns * 3.

There are, however, many uncompressed images that claim to be encoded in YBR_FULL_422, whereas the size of the pixel data element indicates that they are in fact encoded in YBR_FULL. This may happen if a compression decoder fails to modify the photometric interpretation after decompression. This case also needs to be handled properly by some heuristic, since it seems to be more common than actual uncompressed YBR_FULL_422.

Bug reported 2022-10-28 by Tamas Nemeth <>.

Actions

Also available in: Atom PDF