18 #ifndef sitkPimpleImageBase_h
19 #define sitkPimpleImageBase_h
43 virtual std::unique_ptr<PimpleImageBase>
47 GetPixelID()
const = 0;
49 GetDimension()
const = 0;
51 GetNumberOfPixels()
const = 0;
53 GetNumberOfComponentsPerPixel()
const = 0;
55 virtual std::unique_ptr<PimpleImageBase>
56 ShallowCopy()
const = 0;
57 virtual std::unique_ptr<PimpleImageBase>
62 GetDataBase()
const = 0;
67 return this->GetSize(0);
72 return this->GetSize(1);
77 return this->GetSize(2);
80 virtual std::vector<unsigned int>
83 GetSize(
unsigned int dimension)
const = 0;
87 double coordinateTolerance,
88 double directionTolerance)
const = 0;
92 double coordinateTolerance,
93 double directionTolerance)
const = 0;
95 virtual std::vector<double>
96 GetOrigin()
const = 0;
98 SetOrigin(
const std::vector<double> & orgn) = 0;
99 virtual std::vector<double>
100 GetSpacing()
const = 0;
102 SetSpacing(
const std::vector<double> & spc) = 0;
104 virtual std::vector<double>
105 GetDirection()
const = 0;
107 SetDirection(
const std::vector<double> & direction) = 0;
109 virtual std::vector<int64_t>
110 TransformPhysicalPointToIndex(
const std::vector<double> & pt)
const = 0;
111 virtual std::vector<double>
112 TransformIndexToPhysicalPoint(
const std::vector<int64_t> & idx)
const = 0;
113 virtual std::vector<double>
114 TransformPhysicalPointToContinuousIndex(
const std::vector<double> & pt)
const = 0;
115 virtual std::vector<double>
116 TransformContinuousIndexToPhysicalPoint(
const std::vector<double> & idx)
const = 0;
118 virtual std::vector<double>
119 EvaluateAtContinuousIndex(
const std::vector<double> & index,
InterpolatorEnum interp)
const = 0;
122 ToString()
const = 0;
125 GetReferenceCountOfImage()
const = 0;
128 GetPixelAsInt8(
const std::vector<uint32_t> & idx)
const = 0;
130 GetPixelAsUInt8(
const std::vector<uint32_t> & idx)
const = 0;
132 GetPixelAsInt16(
const std::vector<uint32_t> & idx)
const = 0;
134 GetPixelAsUInt16(
const std::vector<uint32_t> & idx)
const = 0;
136 GetPixelAsInt32(
const std::vector<uint32_t> & idx)
const = 0;
138 GetPixelAsUInt32(
const std::vector<uint32_t> & idx)
const = 0;
140 GetPixelAsInt64(
const std::vector<uint32_t> & idx)
const = 0;
142 GetPixelAsUInt64(
const std::vector<uint32_t> & idx)
const = 0;
144 GetPixelAsFloat(
const std::vector<uint32_t> & idx)
const = 0;
146 GetPixelAsDouble(
const std::vector<uint32_t> & idx)
const = 0;
148 virtual std::vector<int8_t>
149 GetPixelAsVectorInt8(
const std::vector<uint32_t> & idx)
const = 0;
150 virtual std::vector<uint8_t>
151 GetPixelAsVectorUInt8(
const std::vector<uint32_t> & idx)
const = 0;
152 virtual std::vector<int16_t>
153 GetPixelAsVectorInt16(
const std::vector<uint32_t> & idx)
const = 0;
154 virtual std::vector<uint16_t>
155 GetPixelAsVectorUInt16(
const std::vector<uint32_t> & idx)
const = 0;
156 virtual std::vector<int32_t>
157 GetPixelAsVectorInt32(
const std::vector<uint32_t> & idx)
const = 0;
158 virtual std::vector<uint32_t>
159 GetPixelAsVectorUInt32(
const std::vector<uint32_t> & idx)
const = 0;
160 virtual std::vector<int64_t>
161 GetPixelAsVectorInt64(
const std::vector<uint32_t> & idx)
const = 0;
162 virtual std::vector<uint64_t>
163 GetPixelAsVectorUInt64(
const std::vector<uint32_t> & idx)
const = 0;
164 virtual std::vector<float>
165 GetPixelAsVectorFloat32(
const std::vector<uint32_t> & idx)
const = 0;
166 virtual std::vector<double>
167 GetPixelAsVectorFloat64(
const std::vector<uint32_t> & idx)
const = 0;
169 virtual std::complex<float>
170 GetPixelAsComplexFloat32(
const std::vector<uint32_t> & idx)
const = 0;
171 virtual std::complex<double>
172 GetPixelAsComplexFloat64(
const std::vector<uint32_t> & idx)
const = 0;
175 SetPixelAsInt8(
const std::vector<uint32_t> & idx, int8_t v) = 0;
177 SetPixelAsUInt8(
const std::vector<uint32_t> & idx, uint8_t v) = 0;
179 SetPixelAsInt16(
const std::vector<uint32_t> & idx, int16_t v) = 0;
181 SetPixelAsUInt16(
const std::vector<uint32_t> & idx, uint16_t v) = 0;
183 SetPixelAsInt32(
const std::vector<uint32_t> & idx, int32_t v) = 0;
185 SetPixelAsUInt32(
const std::vector<uint32_t> & idx, uint32_t v) = 0;
187 SetPixelAsInt64(
const std::vector<uint32_t> & idx, int64_t v) = 0;
189 SetPixelAsUInt64(
const std::vector<uint32_t> & idx, uint64_t v) = 0;
191 SetPixelAsFloat(
const std::vector<uint32_t> & idx,
float v) = 0;
193 SetPixelAsDouble(
const std::vector<uint32_t> & idx,
double v) = 0;
196 SetPixelAsVectorInt8(
const std::vector<uint32_t> & idx,
const std::vector<int8_t> & v) = 0;
198 SetPixelAsVectorUInt8(
const std::vector<uint32_t> & idx,
const std::vector<uint8_t> & v) = 0;
200 SetPixelAsVectorInt16(
const std::vector<uint32_t> & idx,
const std::vector<int16_t> & v) = 0;
202 SetPixelAsVectorUInt16(
const std::vector<uint32_t> & idx,
const std::vector<uint16_t> & v) = 0;
204 SetPixelAsVectorInt32(
const std::vector<uint32_t> & idx,
const std::vector<int32_t> & v) = 0;
206 SetPixelAsVectorUInt32(
const std::vector<uint32_t> & idx,
const std::vector<uint32_t> & v) = 0;
208 SetPixelAsVectorInt64(
const std::vector<uint32_t> & idx,
const std::vector<int64_t> & v) = 0;
210 SetPixelAsVectorUInt64(
const std::vector<uint32_t> & idx,
const std::vector<uint64_t> & v) = 0;
212 SetPixelAsVectorFloat32(
const std::vector<uint32_t> & idx,
const std::vector<float> & v) = 0;
214 SetPixelAsVectorFloat64(
const std::vector<uint32_t> & idx,
const std::vector<double> & v) = 0;
217 SetPixelAsComplexFloat32(
const std::vector<uint32_t> & idx,
const std::complex<float> v) = 0;
219 SetPixelAsComplexFloat64(
const std::vector<uint32_t> & idx,
const std::complex<double> v) = 0;
223 GetBufferAsInt8() = 0;
225 GetBufferAsUInt8() = 0;
227 GetBufferAsInt16() = 0;
229 GetBufferAsUInt16() = 0;
231 GetBufferAsInt32() = 0;
233 GetBufferAsUInt32() = 0;
235 GetBufferAsInt64() = 0;
237 GetBufferAsUInt64() = 0;
239 GetBufferAsFloat() = 0;
241 GetBufferAsDouble() = 0;
243 GetBufferAsVoid() = 0;
245 virtual const int8_t *
246 GetBufferAsInt8()
const = 0;
247 virtual const uint8_t *
248 GetBufferAsUInt8()
const = 0;
249 virtual const int16_t *
250 GetBufferAsInt16()
const = 0;
251 virtual const uint16_t *
252 GetBufferAsUInt16()
const = 0;
253 virtual const int32_t *
254 GetBufferAsInt32()
const = 0;
255 virtual const uint32_t *
256 GetBufferAsUInt32()
const = 0;
257 virtual const int64_t *
258 GetBufferAsInt64()
const = 0;
259 virtual const uint64_t *
260 GetBufferAsUInt64()
const = 0;
261 virtual const float *
262 GetBufferAsFloat()
const = 0;
263 virtual const double *
264 GetBufferAsDouble()
const = 0;
266 GetBufferAsVoid()
const = 0;
272 #endif // sitkPimpleImageBase_h