changeset 858:ebc41566f742 jpeg

removed unneeded check
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Jun 2014 15:25:31 +0200
parents f53358c70c05
children 610a9a1ed855
files OrthancServer/Internals/DicomImageDecoder.cpp
diffstat 1 files changed, 2 insertions(+), 28 deletions(-) [+]
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