diff Core/Images/ImageAccessor.h @ 2861:9b4251721f22

ImageAccessor now non-copyable
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Oct 2018 17:46:02 +0200
parents be1dbb1dcdd6
children 0f07bdae0805
line wrap: on
line diff
--- a/Core/Images/ImageAccessor.h	Wed Oct 03 16:13:19 2018 +0200
+++ b/Core/Images/ImageAccessor.h	Fri Oct 05 17:46:02 2018 +0200
@@ -37,10 +37,11 @@
 
 #include <string>
 #include <stdint.h>
+#include <boost/noncopyable.hpp>
 
 namespace Orthanc
 {
-  class ImageAccessor
+  class ImageAccessor : public boost::noncopyable
   {
   private:
     template <Orthanc::PixelFormat Format>
@@ -142,10 +143,11 @@
 
     void ToMatlabString(std::string& target) const; 
 
-    ImageAccessor GetRegion(unsigned int x,
-                            unsigned int y,
-                            unsigned int width,
-                            unsigned int height) const;
+    void GetRegion(ImageAccessor& accessor,
+                   unsigned int x,
+                   unsigned int y,
+                   unsigned int width,
+                   unsigned int height) const;
 
     void SetFormat(PixelFormat format);
   };