comparison OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp @ 4200:7112a8af0b63

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Sep 2020 20:53:31 +0200
parents dbd74fa2f446
children 2d5209153b32
comparison
equal deleted inserted replaced
4199:fbc49a65340a 4200:7112a8af0b63
344 return new Image(format, info.GetWidth(), info.GetHeight(), false); 344 return new Image(format, info.GetWidth(), info.GetHeight(), false);
345 } 345 }
346 346
347 347
348 template <typename PixelType> 348 template <typename PixelType>
349 static void CopyPixels(ImageAccessor& target, 349 static void CopyPixels(const ImageAccessor& target,
350 const DicomIntegerPixelAccessor& source) 350 const DicomIntegerPixelAccessor& source)
351 { 351 {
352 // WARNING - "::min()" should be replaced by "::lowest()" if 352 // WARNING - "::min()" should be replaced by "::lowest()" if
353 // dealing with float or double (which is not the case so far) 353 // dealing with float or double (which is not the case so far)
354 const PixelType minValue = std::numeric_limits<PixelType>::min(); 354 const PixelType minValue = std::numeric_limits<PixelType>::min();
650 return target.release(); 650 return target.release();
651 } 651 }
652 } 652 }
653 653
654 654
655 ImageAccessor* DicomImageDecoder::Decode(ParsedDicomFile& dicom, 655 ImageAccessor* DicomImageDecoder::Decode(const ParsedDicomFile& dicom,
656 unsigned int frame) 656 unsigned int frame)
657 { 657 {
658 if (dicom.GetDcmtkObject().getDataset() == NULL) 658 if (dicom.GetDcmtkObject().getDataset() == NULL)
659 { 659 {
660 throw OrthancException(ErrorCode_InternalError); 660 throw OrthancException(ErrorCode_InternalError);