diff Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp @ 1842:697ae8d0e287

better handling of ordered-slices
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Nov 2015 13:16:52 +0100
parents 859224214616
children b1291df2f780
line wrap: on
line diff
--- a/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp	Mon Nov 30 12:05:55 2015 +0100
+++ b/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp	Mon Nov 30 13:16:52 2015 +0100
@@ -43,6 +43,10 @@
     context_(context),
     image_(image)
   {
+    if (image_ == NULL)
+    {
+      throw std::runtime_error("Invalid image returned by the core of Orthanc");
+    }
   }