# HG changeset patch # User Sebastien Jodogne # Date 1402061131 -7200 # Node ID ebc41566f742f8c0b3486c0532bad2d6a8cadd7b # Parent f53358c70c05bae6f19fb7f6dbefac3fe2313661 removed unneeded check diff -r f53358c70c05 -r ebc41566f742 OrthancServer/Internals/DicomImageDecoder.cpp --- a/OrthancServer/Internals/DicomImageDecoder.cpp Fri Jun 06 15:01:19 2014 +0200 +++ b/OrthancServer/Internals/DicomImageDecoder.cpp Fri Jun 06 15:25:31 2014 +0200 @@ -406,8 +406,9 @@ ImageSource source; source.Setup(dataset, frame); + /** - * Resize the target image, with some sanity checks. + * Resize the target image. **/ SetupImageBuffer(target, dataset); @@ -418,33 +419,6 @@ throw OrthancException(ErrorCode_InternalError); } - bool ok; - switch (target.GetFormat()) - { - case PixelFormat_RGB24: - ok = source.GetChannelCount() == 3; - break; - - case PixelFormat_RGBA32: - ok = source.GetChannelCount() == 4; - break; - - case PixelFormat_Grayscale8: - case PixelFormat_Grayscale16: - case PixelFormat_SignedGrayscale16: - ok = source.GetChannelCount() == 1; - break; - - default: - ok = false; - break; - } - - if (!ok) - { - throw OrthancException(ErrorCode_InternalError); - } - /** * If the format of the DICOM buffer is natively supported, use a