Actions
Bug #984
closedProblem in DCMTK 3.6.6 with double call of DcmPixelData::decode()
Start date:
2021-04-26
Due date:
% Done:
100%
Estimated time:
3:00 h
Module:
dcmdata, dcmimgle
Operating System:
Compiler:
Description
With commit 0e8fae86ca, DCMTK issue #845 has been fixed but at the same time it is not possible any longer to "decode" the pixel data of a DICOM image twice.
The following sample program demonstrates this issue. It was provided by Daniel Grieger <Daniel.Grieger/at/ith-icoserve/dot/com> who also reported this bug:
#include <iostream> #include <dcmtk/dcmdata/dcfilefo.h> #include <dcmtk/dcmimgle/dcmimage.h> #include <dcmtk/dcmjpeg/djencode.h> #include <dcmtk/dcmjpeg/djdecode.h> int main() { DJEncoderRegistration::registerCodecs(); DJDecoderRegistration::registerCodecs(EDC_lossyOnly, EUC_default, EPC_colorByPixel, false); const std::shared_ptr<DcmFileFormat> dcmFileFormat = std::make_shared<DcmFileFormat>(); std::cout << std::string(dcmFileFormat->loadFile(OFFilename("test.dcm")).text()) << std::endl; const std::shared_ptr<DicomImage> dicomImage1 = std::make_shared<DicomImage>(dcmFileFormat->getDataset(), dcmFileFormat->getDataset()->getCurrentXfer()); std::cout << std::string(DicomImage::getString(dicomImage1->getStatus())) << std::endl; const std::shared_ptr<DicomImage> dicomImage2 = std::make_shared<DicomImage>(dcmFileFormat->getDataset(), dcmFileFormat->getDataset()->getCurrentXfer()); std::cout << std::string(DicomImage::getString(dicomImage2->getStatus())) << std::endl; DJEncoderRegistration::cleanup(); DJDecoderRegistration::cleanup(); return 0; }
The output with the current DCMTK 3.6.6 is the following:
Normal Status OK E: no pixel data found in DICOM dataset Missing attribute
With DCMTK 3.6.5 (i.e. before the above mentioned commit) the output was:
Normal Status OK Status OK
More details can be found in his email from 2021-04-06.
Actions