Mercurial > hg > orthanc
comparison OrthancServer/Internals/DicomImageDecoder.cpp @ 2107:88831c3edd8f
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Oct 2016 17:22:09 +0200 |
parents | 1a5e070a21c3 |
children | b9bd52c72ba2 |
comparison
equal
deleted
inserted
replaced
2106:09cb73980740 | 2107:88831c3edd8f |
---|---|
338 << EnumerationToString(info.GetPhotometricInterpretation()) | 338 << EnumerationToString(info.GetPhotometricInterpretation()) |
339 << " photometric interpretation"; | 339 << " photometric interpretation"; |
340 throw OrthancException(ErrorCode_NotImplemented); | 340 throw OrthancException(ErrorCode_NotImplemented); |
341 } | 341 } |
342 | 342 |
343 return new Image(format, info.GetWidth(), info.GetHeight()); | 343 return new Image(format, info.GetWidth(), info.GetHeight(), false); |
344 } | 344 } |
345 | 345 |
346 | 346 |
347 template <typename PixelType> | 347 template <typename PixelType> |
348 static void CopyPixels(ImageAccessor& target, | 348 static void CopyPixels(ImageAccessor& target, |
672 } | 672 } |
673 | 673 |
674 if (image->GetFormat() != format) | 674 if (image->GetFormat() != format) |
675 { | 675 { |
676 // A conversion is required | 676 // A conversion is required |
677 std::auto_ptr<ImageAccessor> target(new Image(format, image->GetWidth(), image->GetHeight())); | 677 std::auto_ptr<ImageAccessor> target(new Image(format, image->GetWidth(), image->GetHeight(), false)); |
678 ImageProcessing::Convert(*target, *image); | 678 ImageProcessing::Convert(*target, *image); |
679 image = target; | 679 image = target; |
680 } | 680 } |
681 | 681 |
682 return true; | 682 return true; |
711 } | 711 } |
712 | 712 |
713 // If the source image is not grayscale 8bpp, convert it | 713 // If the source image is not grayscale 8bpp, convert it |
714 if (image->GetFormat() != PixelFormat_Grayscale8) | 714 if (image->GetFormat() != PixelFormat_Grayscale8) |
715 { | 715 { |
716 std::auto_ptr<ImageAccessor> target(new Image(PixelFormat_Grayscale8, image->GetWidth(), image->GetHeight())); | 716 std::auto_ptr<ImageAccessor> target(new Image(PixelFormat_Grayscale8, image->GetWidth(), image->GetHeight(), false)); |
717 ImageProcessing::Convert(*target, *image); | 717 ImageProcessing::Convert(*target, *image); |
718 image = target; | 718 image = target; |
719 } | 719 } |
720 | 720 |
721 return true; | 721 return true; |