diff Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp @ 1840:859224214616

simplification of the sample plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Nov 2015 10:34:04 +0100
parents 2faa2abbf311
children 697ae8d0e287
line wrap: on
line diff
--- a/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp	Fri Nov 27 18:17:31 2015 +0100
+++ b/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp	Mon Nov 30 10:34:04 2015 +0100
@@ -28,11 +28,7 @@
                                            OrthancPluginPixelFormat format,
                                            uint32_t width,
                                            uint32_t height) :
-    context_(context),
-    slope_(1),
-    intercept_(0),
-    rowPixelSpacing_(1),
-    columnPixelSpacing_(1)
+    context_(context)
   {
     image_ = OrthancPluginCreateImage(context_, format, width, height);
     if (image_ == NULL)
@@ -43,14 +39,9 @@
 
 
   OrthancImageWrapper::OrthancImageWrapper(OrthancPluginContext* context,
-                                           GdcmImageDecoder& decoder,
-                                           unsigned int frameIndex) :
+                                           OrthancPluginImage* image) :
     context_(context),
-    image_(decoder.Decode(context, frameIndex)),
-    slope_(decoder.GetSlope()),
-    intercept_(decoder.GetIntercept()),
-    rowPixelSpacing_(decoder.GetRowPixelSpacing()),
-    columnPixelSpacing_(decoder.GetColumnPixelSpacing())
+    image_(image)
   {
   }