Bug #1043
closedDCMTK does not handle uncompressed color images with YBR_FULL_422 color model correctly
100%
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 <TNemeth@erad.com>.
Updated by Marco Eichelberg over 2 years ago
- % Done changed from 0 to 100
- Estimated time set to 4:00 h
Closed by commit #e516c39d3 for the public DCMTK and commit #c6c60f7bb for the private modules.