diff OrthancServer/Internals/DicomImageDecoder.cpp @ 858:ebc41566f742 jpeg

removed unneeded check
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Jun 2014 15:25:31 +0200
parents ff530685e46a
children 610a9a1ed855
line wrap: on
line diff
--- 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