# HG changeset patch # User Alain Mazy # Date 1757673199 -7200 # Node ID 72f74eba36fbeb7e072ca4f6fc55e6e9557af156 # Parent 1f07e38a804fbc7c5b6562ad206d9b0706852884 error when trying to extract a frame from a file without pixel data diff -r 1f07e38a804f -r 72f74eba36fb OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Fri Sep 12 11:28:12 2025 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Fri Sep 12 12:33:19 2025 +0200 @@ -1694,6 +1694,11 @@ MimeType& mime, unsigned int frameId) const { + if (!this->HasTag(DICOM_TAG_PIXEL_DATA)) + { + 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 &&