# HG changeset patch # User Sebastien Jodogne # Date 1589534275 -7200 # Node ID bf46e10de8ae86ef3b3b87bed796175963c8f891 # Parent e6606d3ec89268047f63f90cd828f4402fca7ea0 clarifying debug message diff -r e6606d3ec892 -r bf46e10de8ae Core/DicomParsing/Internals/DicomImageDecoder.cpp --- 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 converted(dynamic_cast(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"); + } }