Mercurial > hg > orthanc
diff Core/DicomParsing/Internals/DicomImageDecoder.cpp @ 3932:bf46e10de8ae transcoding
clarifying debug message
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 May 2020 11:17:55 +0200 |
parents | 795c9ca5eb91 |
children |
line wrap: on
line diff
--- a/Core/DicomParsing/Internals/DicomImageDecoder.cpp Fri May 15 09:22:31 2020 +0200 +++ b/Core/DicomParsing/Internals/DicomImageDecoder.cpp Fri May 15 11:17:55 2020 +0200 @@ -810,7 +810,7 @@ **/ { - LOG(INFO) << "Decoding a compressed image by converting its transfer syntax to Little Endian"; + LOG(INFO) << "Trying to decode a compressed image by transcoding it to Little Endian Explicit"; std::unique_ptr<DcmDataset> converted(dynamic_cast<DcmDataset*>(dataset.clone())); converted->chooseRepresentation(EXS_LittleEndianExplicit, NULL); @@ -821,8 +821,18 @@ } } - throw OrthancException(ErrorCode_BadFileFormat, - "Cannot decode a DICOM image with the built-in decoder"); + DicomTransferSyntax s; + if (FromDcmtkBridge::LookupOrthancTransferSyntax(s, dataset.getCurrentXfer())) + { + throw OrthancException(ErrorCode_NotImplemented, + "The built-in DCMTK decoder cannot decode some DICOM instance " + "whose transfer syntax is: " + std::string(GetTransferSyntaxUid(s))); + } + else + { + throw OrthancException(ErrorCode_NotImplemented, + "The built-in DCMTK decoder cannot decode some DICOM instance"); + } }