comparison OrthancFramework/Sources/Images/ImageAccessor.h @ 4300:b30a8de92ad9

abi continued
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 19:33:18 +0100
parents 785a2713323e
children d9473bd5ed43
comparison
equal deleted inserted replaced
4299:3f85db78c441 4300:b30a8de92ad9
66 void* GetBuffer() const; 66 void* GetBuffer() const;
67 void* GetRow(unsigned int y) const; 67 void* GetRow(unsigned int y) const;
68 #endif 68 #endif
69 69
70 public: 70 public:
71 ImageAccessor() 71 ImageAccessor();
72 {
73 AssignEmpty(PixelFormat_Grayscale8);
74 }
75 72
76 virtual ~ImageAccessor() 73 virtual ~ImageAccessor();
77 {
78 }
79 74
80 bool IsReadOnly() const 75 bool IsReadOnly() const;
81 {
82 return readOnly_;
83 }
84 76
85 PixelFormat GetFormat() const 77 PixelFormat GetFormat() const;
86 {
87 return format_;
88 }
89 78
90 unsigned int GetBytesPerPixel() const 79 unsigned int GetBytesPerPixel() const;
91 {
92 return ::Orthanc::GetBytesPerPixel(format_);
93 }
94 80
95 unsigned int GetWidth() const 81 unsigned int GetWidth() const;
96 {
97 return width_;
98 }
99 82
100 unsigned int GetHeight() const 83 unsigned int GetHeight() const;
101 {
102 return height_;
103 }
104 84
105 unsigned int GetPitch() const 85 unsigned int GetPitch() const;
106 {
107 return pitch_;
108 }
109 86
110 unsigned int GetSize() const 87 unsigned int GetSize() const;
111 {
112 return GetHeight() * GetPitch();
113 }
114 88
115 const void* GetConstBuffer() const 89 const void* GetConstBuffer() const;
116 {
117 return buffer_;
118 }
119 90
120 void* GetBuffer(); 91 void* GetBuffer();
121 92
122 const void* GetConstRow(unsigned int y) const; 93 const void* GetConstRow(unsigned int y) const;
123 94
129 unsigned int width, 100 unsigned int width,
130 unsigned int height, 101 unsigned int height,
131 unsigned int pitch, 102 unsigned int pitch,
132 const void *buffer); 103 const void *buffer);
133 104
134 void GetReadOnlyAccessor(ImageAccessor& target) const 105 void GetReadOnlyAccessor(ImageAccessor& target) const;
135 {
136 target.AssignReadOnly(format_, width_, height_, pitch_, buffer_);
137 }
138 106
139 void AssignWritable(PixelFormat format, 107 void AssignWritable(PixelFormat format,
140 unsigned int width, 108 unsigned int width,
141 unsigned int height, 109 unsigned int height,
142 unsigned int pitch, 110 unsigned int pitch,