diff Plugin/ViewerToolbox.cpp @ 207:3d3d00e3e715

fix for new ImageAccessor API
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Oct 2018 11:44:44 +0200
parents 993dd140bd30
children 2f27287c047c
line wrap: on
line diff
--- a/Plugin/ViewerToolbox.cpp	Fri Jul 20 14:25:04 2018 +0200
+++ b/Plugin/ViewerToolbox.cpp	Mon Oct 08 11:44:44 2018 +0200
@@ -383,16 +383,12 @@
   }
 
 
-  Orthanc::ImageAccessor ImageReader::GetAccessor() const
+  void ImageReader::GetAccessor(Orthanc::ImageAccessor& target) const
   {
-    Orthanc::ImageAccessor accessor;
-
-    accessor.AssignReadOnly(Convert(OrthancPluginGetImagePixelFormat(context_, image_)),
-                            OrthancPluginGetImageWidth(context_, image_),
-                            OrthancPluginGetImageHeight(context_, image_),
-                            OrthancPluginGetImagePitch(context_, image_),
-                            OrthancPluginGetImageBuffer(context_, image_));
-
-    return accessor;
+    target.AssignReadOnly(Convert(OrthancPluginGetImagePixelFormat(context_, image_)),
+                          OrthancPluginGetImageWidth(context_, image_),
+                          OrthancPluginGetImageHeight(context_, image_),
+                          OrthancPluginGetImagePitch(context_, image_),
+                          OrthancPluginGetImageBuffer(context_, image_));
   }
 }