comparison OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp @ 4203:4d42408da117

improving const-correctness in ParsedDicomFile
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Sep 2020 15:01:31 +0200
parents 2d5209153b32
children 0034f855c023
comparison
equal deleted inserted replaced
4202:2007ab69ac16 4203:4d42408da117
646 throw OrthancException(ErrorCode_BadFileFormat, 646 throw OrthancException(ErrorCode_BadFileFormat,
647 "Cannot decode a non-palette image"); 647 "Cannot decode a non-palette image");
648 } 648 }
649 649
650 return target.release(); 650 return target.release();
651 }
652 }
653
654
655 ImageAccessor* DicomImageDecoder::Decode(const ParsedDicomFile& dicom,
656 unsigned int frame)
657 {
658 if (dicom.GetDcmtkObject().getDataset() == NULL)
659 {
660 throw OrthancException(ErrorCode_InternalError);
661 }
662 else
663 {
664 return Decode(*dicom.GetDcmtkObject().getDataset(), frame);
665 } 651 }
666 } 652 }
667 653
668 654
669 ImageAccessor* DicomImageDecoder::Decode(DcmDataset& dataset, 655 ImageAccessor* DicomImageDecoder::Decode(DcmDataset& dataset,