18 #ifndef sitkPimpleImageBase_h
19 #define sitkPimpleImageBase_h
46 virtual unsigned int GetDimension(
void )
const = 0;
47 virtual uint64_t GetNumberOfPixels(
void )
const = 0;
48 virtual unsigned int GetNumberOfComponentsPerPixel(
void )
const = 0;
55 virtual unsigned int GetWidth(
void )
const {
return this->GetSize( 0 ); }
56 virtual unsigned int GetHeight(
void )
const {
return this->GetSize( 1 ); }
57 virtual unsigned int GetDepth(
void )
const {
return this->GetSize( 2 ); }
59 virtual std::vector< unsigned int > GetSize(
void )
const = 0;
60 virtual unsigned int GetSize(
unsigned int dimension )
const = 0;
63 virtual std::vector<double> GetOrigin(
void )
const = 0;
64 virtual void SetOrigin(
const std::vector<double> &orgn ) = 0;
65 virtual std::vector<double> GetSpacing(
void )
const = 0;
66 virtual void SetSpacing(
const std::vector<double> &spc ) = 0;
68 virtual std::vector< double > GetDirection(
void )
const = 0;
69 virtual void SetDirection(
const std::vector< double > &direction ) = 0;
71 virtual std::vector<int64_t> TransformPhysicalPointToIndex(
const std::vector<double> &pt)
const = 0;
72 virtual std::vector<double> TransformIndexToPhysicalPoint(
const std::vector<int64_t> &idx)
const = 0;
73 virtual std::vector<double> TransformPhysicalPointToContinuousIndex(
const std::vector<double> &pt)
const = 0;
74 virtual std::vector<double> TransformContinuousIndexToPhysicalPoint(
const std::vector<double> &idx)
const = 0;
76 virtual std::string ToString()
const = 0;
79 virtual int GetReferenceCountOfImage()
const = 0;
81 virtual int8_t GetPixelAsInt8(
const std::vector<uint32_t> &idx)
const = 0;
82 virtual uint8_t GetPixelAsUInt8(
const std::vector<uint32_t> &idx)
const = 0;
83 virtual int16_t GetPixelAsInt16(
const std::vector<uint32_t> &idx )
const = 0;
84 virtual uint16_t GetPixelAsUInt16(
const std::vector<uint32_t> &idx )
const = 0;
85 virtual int32_t GetPixelAsInt32(
const std::vector<uint32_t> &idx )
const = 0;
86 virtual uint32_t GetPixelAsUInt32(
const std::vector<uint32_t> &idx )
const = 0;
87 virtual int64_t GetPixelAsInt64(
const std::vector<uint32_t> &idx )
const = 0;
88 virtual uint64_t GetPixelAsUInt64(
const std::vector<uint32_t> &idx )
const = 0;
89 virtual float GetPixelAsFloat(
const std::vector<uint32_t> &idx )
const = 0;
90 virtual double GetPixelAsDouble(
const std::vector<uint32_t> &idx )
const = 0;
92 virtual std::vector<int8_t> GetPixelAsVectorInt8(
const std::vector<uint32_t> &idx)
const = 0;
93 virtual std::vector<uint8_t> GetPixelAsVectorUInt8(
const std::vector<uint32_t> &idx)
const = 0;
94 virtual std::vector<int16_t> GetPixelAsVectorInt16(
const std::vector<uint32_t> &idx )
const = 0;
95 virtual std::vector<uint16_t> GetPixelAsVectorUInt16(
const std::vector<uint32_t> &idx )
const = 0;
96 virtual std::vector<int32_t> GetPixelAsVectorInt32(
const std::vector<uint32_t> &idx )
const = 0;
97 virtual std::vector<uint32_t> GetPixelAsVectorUInt32(
const std::vector<uint32_t> &idx )
const = 0;
98 virtual std::vector<int64_t> GetPixelAsVectorInt64(
const std::vector<uint32_t> &idx )
const = 0;
99 virtual std::vector<uint64_t> GetPixelAsVectorUInt64(
const std::vector<uint32_t> &idx )
const = 0;
100 virtual std::vector<float> GetPixelAsVectorFloat32(
const std::vector<uint32_t> &idx )
const = 0;
101 virtual std::vector<double> GetPixelAsVectorFloat64(
const std::vector<uint32_t> &idx )
const = 0;
103 virtual std::complex<float> GetPixelAsComplexFloat32(
const std::vector<uint32_t> &idx )
const = 0;
104 virtual std::complex<double> GetPixelAsComplexFloat64(
const std::vector<uint32_t> &idx )
const = 0;
106 virtual void SetPixelAsInt8(
const std::vector<uint32_t> &idx,
int8_t v ) = 0;
107 virtual void SetPixelAsUInt8(
const std::vector<uint32_t> &idx,
uint8_t v ) = 0;
108 virtual void SetPixelAsInt16(
const std::vector<uint32_t> &idx,
int16_t v ) = 0;
109 virtual void SetPixelAsUInt16(
const std::vector<uint32_t> &idx,
uint16_t v ) = 0;
110 virtual void SetPixelAsInt32(
const std::vector<uint32_t> &idx,
int32_t v ) = 0;
111 virtual void SetPixelAsUInt32(
const std::vector<uint32_t> &idx,
uint32_t v ) = 0;
112 virtual void SetPixelAsInt64(
const std::vector<uint32_t> &idx,
int64_t v ) = 0;
113 virtual void SetPixelAsUInt64(
const std::vector<uint32_t> &idx,
uint64_t v ) = 0;
114 virtual void SetPixelAsFloat(
const std::vector<uint32_t> &idx,
float v ) = 0;
115 virtual void SetPixelAsDouble(
const std::vector<uint32_t> &idx,
double v ) = 0;
117 virtual void SetPixelAsVectorInt8(
const std::vector<uint32_t> &idx,
const std::vector<int8_t> &v ) = 0;
118 virtual void SetPixelAsVectorUInt8(
const std::vector<uint32_t> &idx,
const std::vector<uint8_t> &v ) = 0;
119 virtual void SetPixelAsVectorInt16(
const std::vector<uint32_t> &idx,
const std::vector<int16_t> &v ) = 0;
120 virtual void SetPixelAsVectorUInt16(
const std::vector<uint32_t> &idx,
const std::vector<uint16_t> &v ) = 0;
121 virtual void SetPixelAsVectorInt32(
const std::vector<uint32_t> &idx,
const std::vector<int32_t> &v ) = 0;
122 virtual void SetPixelAsVectorUInt32(
const std::vector<uint32_t> &idx,
const std::vector<uint32_t> &v ) = 0;
123 virtual void SetPixelAsVectorInt64(
const std::vector<uint32_t> &idx,
const std::vector<int64_t> &v ) = 0;
124 virtual void SetPixelAsVectorUInt64(
const std::vector<uint32_t> &idx,
const std::vector<uint64_t> &v ) = 0;
125 virtual void SetPixelAsVectorFloat32(
const std::vector<uint32_t> &idx,
const std::vector<float> &v ) = 0;
126 virtual void SetPixelAsVectorFloat64(
const std::vector<uint32_t> &idx,
const std::vector<double> &v ) = 0;
128 virtual void SetPixelAsComplexFloat32(
const std::vector<uint32_t> &idx,
const std::complex<float> v ) = 0;
129 virtual void SetPixelAsComplexFloat64(
const std::vector<uint32_t> &idx,
const std::complex<double> v ) = 0;
132 virtual int8_t *GetBufferAsInt8( ) = 0;
133 virtual uint8_t *GetBufferAsUInt8( ) = 0;
134 virtual int16_t *GetBufferAsInt16( ) = 0;
135 virtual uint16_t *GetBufferAsUInt16( ) = 0;
136 virtual int32_t *GetBufferAsInt32( ) = 0;
137 virtual uint32_t *GetBufferAsUInt32( ) = 0;
138 virtual int64_t *GetBufferAsInt64( ) = 0;
139 virtual uint64_t *GetBufferAsUInt64( ) = 0;
140 virtual float *GetBufferAsFloat( ) = 0;
141 virtual double *GetBufferAsDouble( ) = 0;
143 virtual const int8_t *GetBufferAsInt8( )
const = 0;
144 virtual const uint8_t *GetBufferAsUInt8( )
const = 0;
145 virtual const int16_t *GetBufferAsInt16( )
const = 0;
146 virtual const uint16_t *GetBufferAsUInt16( )
const = 0;
147 virtual const int32_t *GetBufferAsInt32( )
const = 0;
148 virtual const uint32_t *GetBufferAsUInt32( )
const = 0;
149 virtual const int64_t *GetBufferAsInt64( )
const = 0;
150 virtual const uint64_t *GetBufferAsUInt64( )
const = 0;
151 virtual const float *GetBufferAsFloat( )
const = 0;
152 virtual const double *GetBufferAsDouble( )
const = 0;
159 #endif // sitkPimpleImageBase_h
virtual unsigned int GetHeight(void) const
virtual ~PimpleImageBase(void)
virtual unsigned int GetDepth(void) const
PixelIDValueEnum
Enumerated values of pixelIDs.
virtual unsigned int GetWidth(void) const
Private implementation idiom image base class.
#define SITKCommon_HIDDEN