# HG changeset patch # User Sebastien Jodogne # Date 1599919428 -7200 # Node ID dbd74fa2f4469e7cb710bab1c9e8cff3228e4587 # Parent 32cda90ccf0930792741f2181d79db7c1a634ad1 Enable the access to raw frames in Philips ELSCINT1 proprietary compression diff -r 32cda90ccf09 -r dbd74fa2f446 NEWS --- a/NEWS Wed Sep 09 14:47:10 2020 +0200 +++ b/NEWS Sat Sep 12 16:03:48 2020 +0200 @@ -9,6 +9,8 @@ * Fix transcoding in C-MOVE SCP, in the case where "SynchronousCMove" is "true" * When checking DICOM allowed methods, if there are multiple modalities with the same AET, differentiate them from the calling IP +* Enable the access to raw frames in Philips ELSCINT1 proprietary compression + Version 1.7.3 (2020-08-24) ========================== diff -r 32cda90ccf09 -r dbd74fa2f446 OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp Wed Sep 09 14:47:10 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.cpp Sat Sep 12 16:03:48 2020 +0200 @@ -347,14 +347,6 @@ return; } - // Test whether this image is composed of a sequence of fragments - DcmPixelSequence* pixelSequence = FromDcmtkBridge::GetPixelSequence(dicom); - if (pixelSequence != NULL) - { - index_.reset(new FragmentIndex(pixelSequence, countFrames_)); - return; - } - // Extract information about the image structure DicomMap tags; std::set ignoreTagLength; @@ -362,15 +354,24 @@ DicomImageInformation information(tags); - // Access to the raw pixel data - if (DicomImageDecoder::IsPsmctRle1(dicom)) + // Test whether this image is composed of a sequence of fragments + if (dicom.tagExistsWithValue(DCM_PixelData)) + { + DcmPixelSequence* pixelSequence = FromDcmtkBridge::GetPixelSequence(dicom); + if (pixelSequence != NULL) + { + index_.reset(new FragmentIndex(pixelSequence, countFrames_)); + } + else + { + // Access to the raw pixel data + index_.reset(new UncompressedIndex(dicom, countFrames_, information.GetFrameSize())); + } + } + else if (DicomImageDecoder::IsPsmctRle1(dicom)) { index_.reset(new PsmctRle1Index(dicom, countFrames_, information.GetFrameSize())); } - else - { - index_.reset(new UncompressedIndex(dicom, countFrames_, information.GetFrameSize())); - } } @@ -387,7 +388,7 @@ } else { - frame.clear(); + throw OrthancException(ErrorCode_BadFileFormat, "Cannot access a raw frame"); } } } diff -r 32cda90ccf09 -r dbd74fa2f446 OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp --- a/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Wed Sep 09 14:47:10 2020 +0200 +++ b/OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp Sat Sep 12 16:03:48 2020 +0200 @@ -134,6 +134,7 @@ // Check whether the DICOM instance contains an image encoded with // the PMSCT_RLE1 scheme. if (!dataset.findAndGetElement(ToDcmtkBridge::Convert(DICOM_TAG_COMPRESSION_TYPE), e).good() || + !dataset.tagExistsWithValue(ToDcmtkBridge::Convert(DICOM_TAG_CONTENT)) || // New in Orthanc 1.7.4 e == NULL || !e->isaString() || !e->getString(c).good() ||