# HG changeset patch # User Alain Mazy # Date 1758182721 -7200 # Node ID 6ce5e7b44afcf924ff64f32f89bafd6e84e04692 # Parent e90b9d76ff6d5f0c2b5c2b2a85af6648162a266c fix test_decode_elscint diff -r e90b9d76ff6d -r 6ce5e7b44afc OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Thu Sep 18 09:53:50 2025 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Thu Sep 18 10:05:21 2025 +0200 @@ -1694,21 +1694,23 @@ MimeType& mime, unsigned int frameId) const { - if (!this->HasTag(DICOM_TAG_PIXEL_DATA)) + DcmDataset* dcmDataset = GetDcmtkObjectConst().getDataset(); + + if (!this->HasTag(DICOM_TAG_PIXEL_DATA) && !DicomImageDecoder::IsPsmctRle1(*dcmDataset)) { throw OrthancException(ErrorCode_BadRequest, "Cannot extract a frame from a DIOCM file that does not have pixel data."); } if (pimpl_->frameIndex_.get() == NULL) { - assert(pimpl_->file_ != NULL && - GetDcmtkObjectConst().getDataset() != NULL); - pimpl_->frameIndex_.reset(new DicomFrameIndex(*GetDcmtkObjectConst().getDataset())); + assert(pimpl_->file_ != NULL && dcmDataset != NULL); + + pimpl_->frameIndex_.reset(new DicomFrameIndex(*dcmDataset)); } pimpl_->frameIndex_->GetRawFrame(target, frameId); - E_TransferSyntax transferSyntax = GetDcmtkObjectConst().getDataset()->getCurrentXfer(); + E_TransferSyntax transferSyntax = dcmDataset->getCurrentXfer(); switch (transferSyntax) { case EXS_JPEGProcess1: