diff Plugins/Samples/GdcmDecoder/GdcmDecoderCache.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 fbc5522023aa
children b1291df2f780
line wrap: on
line diff
--- a/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp	Fri Nov 27 18:17:31 2015 +0100
+++ b/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp	Mon Nov 30 10:34:04 2015 +0100
@@ -77,13 +77,13 @@
           md5_ == md5)
       {
         // This is the same image: Reuse the previous decoding
-        return new OrthancImageWrapper(context, *decoder_, frameIndex);
+        return new OrthancImageWrapper(context, decoder_->Decode(context, frameIndex));
       }
     }
 
     // This is not the same image
     std::auto_ptr<GdcmImageDecoder> decoder(new GdcmImageDecoder(dicom, size));
-    std::auto_ptr<OrthancImageWrapper> image(new OrthancImageWrapper(context, *decoder, frameIndex));
+    std::auto_ptr<OrthancImageWrapper> image(new OrthancImageWrapper(context, decoder->Decode(context, frameIndex)));
 
     {
       // Cache the newly created decoder for further use