Feature #997
openRevise mechanism to compress/decompress pixel data
0%
Description
Currently, the DcmPixelData::chooseRepresentation() method is declared as "public" and, although its direct call by user code is marked as deprecated (by commit d1a561752), calling this method on a pixel data element that is contained in a DICOM dataset may result in an inconsistent state of the DcmDataset instance. As a result, the dataset cannot be stored as a file or transferred over the network.
In a first step, the DcmPixelData::chooseRepresentation() should be declared as "protected" so it cannot be called by user code any longer.
In addition, a new method such as decompressPixelData() should be defined on DcmDataset and DcmItem level, which allows for decompressing the pixel data of the entire dataset or of a selected item (e.g. contained somewhere in the dataset in the Icon Image Sequence). If only the pixel data of a selected item is decompressed, the transfer syntax of the associated DICOM dataset does not need to be adapted since a JPEG-compressed DICOM image (refers to compressed pixel data on top level) may well contain an uncompressed icon image.
In the long term, the current mechanism of having, at least in theory, multiple representations of the same dataset and the method chooseRepresentation() to choose between should be enhanced in a way that changes of describing information of the pixel data (such as Photometric Interpretation or Pixel Representation) is also changed accordingly when switching between representations. Currently, this does not really work and, therefore, the previous pixel data representation is removed (see commit 0e8fae86).
Updated by Jörg Riesmeier about 4 years ago
- Related to Bug #984: Problem in DCMTK 3.6.6 with double call of DcmPixelData::decode() added