comparison Core/Images/ImageAccessor.h @ 1922:369897749653

ImageAccessor::GetRegion
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Mar 2016 17:53:19 +0100
parents b1291df2f780
children a89ca69ec1d1
comparison
equal deleted inserted replaced
1921:5e1ee8f4fc9e 1922:369897749653
33 #pragma once 33 #pragma once
34 34
35 #include "../Enumerations.h" 35 #include "../Enumerations.h"
36 36
37 #include <string> 37 #include <string>
38 #include <stdint.h>
38 39
39 namespace Orthanc 40 namespace Orthanc
40 { 41 {
41 class ImageAccessor 42 class ImageAccessor
42 { 43 {
44 bool readOnly_; 45 bool readOnly_;
45 PixelFormat format_; 46 PixelFormat format_;
46 unsigned int width_; 47 unsigned int width_;
47 unsigned int height_; 48 unsigned int height_;
48 unsigned int pitch_; 49 unsigned int pitch_;
49 void *buffer_; 50 uint8_t *buffer_;
50 51
51 public: 52 public:
52 ImageAccessor() 53 ImageAccessor()
53 { 54 {
54 AssignEmpty(PixelFormat_Grayscale8); 55 AssignEmpty(PixelFormat_Grayscale8);
117 unsigned int height, 118 unsigned int height,
118 unsigned int pitch, 119 unsigned int pitch,
119 void *buffer); 120 void *buffer);
120 121
121 void ToMatlabString(std::string& target) const; 122 void ToMatlabString(std::string& target) const;
123
124 ImageAccessor GetRegion(unsigned int x,
125 unsigned int y,
126 unsigned int width,
127 unsigned int height) const;
122 }; 128 };
123 } 129 }