49 class PimpleImageBase;
85 Image(
const std::vector< unsigned int > &size,
PixelIDValueEnum valueEnum,
unsigned int numberOfComponents = 0 );
105 template <
typename TImageType>
107 : m_PimpleImage( NULL )
110 "invalid pixel type" );
111 this->InternalInitialization<ImageTypeToPixelIDValue<TImageType>::Result, TImageType::ImageDimension>( image.
GetPointer() );
113 template <
typename TImageType>
115 : m_PimpleImage( NULL )
118 "invalid pixel type" );
119 this->InternalInitialization<ImageTypeToPixelIDValue<TImageType>::Result, TImageType::ImageDimension>( image );
143 unsigned int GetDimension(
void )
const;
150 unsigned int GetNumberOfComponentsPerPixel(
void )
const;
160 uint64_t GetNumberOfPixels(
void )
const;
165 std::vector< double > GetOrigin(
void )
const;
166 void SetOrigin(
const std::vector< double > &origin );
172 std::vector< double > GetSpacing(
void )
const;
173 void SetSpacing(
const std::vector< double > &spacing );
183 std::vector< double > GetDirection()
const;
184 void SetDirection (
const std::vector< double > &direction );
188 std::vector< double > TransformIndexToPhysicalPoint(
const std::vector< int64_t > &index )
const;
191 std::vector< int64_t > TransformPhysicalPointToIndex(
const std::vector< double >& point )
const;
194 std::vector< double > TransformPhysicalPointToContinuousIndex(
const std::vector< double >& point )
const;
197 std::vector< double > TransformContinuousIndexToPhysicalPoint(
const std::vector< double > &index)
const;
199 std::vector< unsigned int > GetSize(
void )
const;
201 unsigned int GetHeight(
void )
const;
202 unsigned int GetWidth(
void )
const;
203 unsigned int GetDepth(
void )
const;
216 void CopyInformation(
const Image &srcImage );
224 std::vector<std::string> GetMetaDataKeys(
void )
const;
228 bool HasMetaDataKey(
const std::string &key )
const;
238 std::string GetMetaData(
const std::string &key )
const;
244 void SetMetaData(
const std::string &key,
const std::string &value);
251 bool EraseMetaData(
const std::string &key );
253 std::string GetPixelIDTypeAsString(
void )
const;
255 std::string ToString(
void )
const;
272 int8_t GetPixelAsInt8(
const std::vector<uint32_t> &idx)
const;
273 uint8_t GetPixelAsUInt8(
const std::vector<uint32_t> &idx)
const;
274 int16_t GetPixelAsInt16(
const std::vector<uint32_t> &idx )
const;
275 uint16_t GetPixelAsUInt16(
const std::vector<uint32_t> &idx )
const;
276 int32_t GetPixelAsInt32(
const std::vector<uint32_t> &idx )
const;
277 uint32_t GetPixelAsUInt32(
const std::vector<uint32_t> &idx )
const;
278 int64_t GetPixelAsInt64(
const std::vector<uint32_t> &idx )
const;
279 uint64_t GetPixelAsUInt64(
const std::vector<uint32_t> &idx )
const;
280 float GetPixelAsFloat(
const std::vector<uint32_t> &idx )
const;
281 double GetPixelAsDouble(
const std::vector<uint32_t> &idx )
const;
283 std::vector<int8_t> GetPixelAsVectorInt8(
const std::vector<uint32_t> &idx)
const;
284 std::vector<uint8_t> GetPixelAsVectorUInt8(
const std::vector<uint32_t> &idx)
const;
285 std::vector<int16_t> GetPixelAsVectorInt16(
const std::vector<uint32_t> &idx )
const;
286 std::vector<uint16_t> GetPixelAsVectorUInt16(
const std::vector<uint32_t> &idx )
const;
287 std::vector<int32_t> GetPixelAsVectorInt32(
const std::vector<uint32_t> &idx )
const;
288 std::vector<uint32_t> GetPixelAsVectorUInt32(
const std::vector<uint32_t> &idx )
const;
289 std::vector<int64_t> GetPixelAsVectorInt64(
const std::vector<uint32_t> &idx )
const;
290 std::vector<uint64_t> GetPixelAsVectorUInt64(
const std::vector<uint32_t> &idx )
const;
291 std::vector<float> GetPixelAsVectorFloat32(
const std::vector<uint32_t> &idx )
const;
292 std::vector<double> GetPixelAsVectorFloat64(
const std::vector<uint32_t> &idx )
const;
294 std::complex<float> GetPixelAsComplexFloat32(
const std::vector<uint32_t> &idx )
const;
295 std::complex<double> GetPixelAsComplexFloat64(
const std::vector<uint32_t> &idx )
const;
314 void SetPixelAsInt8(
const std::vector<uint32_t> &idx,
int8_t v );
315 void SetPixelAsUInt8(
const std::vector<uint32_t> &idx,
uint8_t v );
316 void SetPixelAsInt16(
const std::vector<uint32_t> &idx,
int16_t v );
317 void SetPixelAsUInt16(
const std::vector<uint32_t> &idx,
uint16_t v );
318 void SetPixelAsInt32(
const std::vector<uint32_t> &idx,
int32_t v );
319 void SetPixelAsUInt32(
const std::vector<uint32_t> &idx,
uint32_t v );
320 void SetPixelAsInt64(
const std::vector<uint32_t> &idx,
int64_t v );
321 void SetPixelAsUInt64(
const std::vector<uint32_t> &idx,
uint64_t v );
322 void SetPixelAsFloat(
const std::vector<uint32_t> &idx,
float v );
323 void SetPixelAsDouble(
const std::vector<uint32_t> &idx,
double v );
325 void SetPixelAsVectorInt8(
const std::vector<uint32_t> &idx,
const std::vector<int8_t> &v );
326 void SetPixelAsVectorUInt8(
const std::vector<uint32_t> &idx,
const std::vector<uint8_t> &v );
327 void SetPixelAsVectorInt16(
const std::vector<uint32_t> &idx,
const std::vector<int16_t> &v );
328 void SetPixelAsVectorUInt16(
const std::vector<uint32_t> &idx,
const std::vector<uint16_t> &v );
329 void SetPixelAsVectorInt32(
const std::vector<uint32_t> &idx,
const std::vector<int32_t> &v );
330 void SetPixelAsVectorUInt32(
const std::vector<uint32_t> &idx,
const std::vector<uint32_t> &v );
331 void SetPixelAsVectorInt64(
const std::vector<uint32_t> &idx,
const std::vector<int64_t> &v );
332 void SetPixelAsVectorUInt64(
const std::vector<uint32_t> &idx,
const std::vector<uint64_t> &v );
333 void SetPixelAsVectorFloat32(
const std::vector<uint32_t> &idx,
const std::vector<float> &v );
334 void SetPixelAsVectorFloat64(
const std::vector<uint32_t> &idx,
const std::vector<double> &v );
336 void SetPixelAsComplexFloat32(
const std::vector<uint32_t> &idx,
const std::complex<float> v );
337 void SetPixelAsComplexFloat64(
const std::vector<uint32_t> &idx,
const std::complex<double> v );
364 int8_t *GetBufferAsInt8( );
372 float *GetBufferAsFloat( );
373 double *GetBufferAsDouble( );
375 const int8_t *GetBufferAsInt8( )
const;
376 const uint8_t *GetBufferAsUInt8( )
const;
377 const int16_t *GetBufferAsInt16( )
const;
378 const uint16_t *GetBufferAsUInt16( )
const;
379 const int32_t *GetBufferAsInt32( )
const;
380 const uint32_t *GetBufferAsUInt32( )
const;
381 const int64_t *GetBufferAsInt64( )
const;
382 const uint64_t *GetBufferAsUInt64( )
const;
383 const float *GetBufferAsFloat( )
const;
384 const double *GetBufferAsDouble( )
const;
394 void MakeUnique(
void );
404 void Allocate (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
PixelIDValueEnum valueEnum,
unsigned int numberOfComponents );
413 template<
class TImageType>
415 AllocateInternal (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
unsigned int numberOfComponents );
417 template<
class TImageType>
419 AllocateInternal (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
unsigned int numberOfComponents );
421 template<
class TImageType>
423 AllocateInternal (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
unsigned int numberOfComponents );
437 template <
int VPixelIDValue,
unsigned int VImageDimension>
439 VPixelIDValue>::Result,
440 VImageDimension>::ImageType *i );
449 template<
int VPixelIDValue,
typename TImageType>
451 ConditionalInternalInitialization( TImageType *i);
453 template<
int VPixelIDValue,
typename TImageType>
461 template <
class TMemberFunctionPo
inter >
464 typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType
ObjectType;
466 template<
typename TImageType >
467 TMemberFunctionPointer operator() (
void )
const
469 return &ObjectType::template AllocateInternal< TImageType >;
AllPixelIDTypeList InstantiatedPixelIDTypeList
PimpleImageBase * m_PimpleImage
ObjectType * GetPointer() const noexcept
PixelIDValueEnum
Enumerated values of pixelIDs.
class ITK_FORWARD_EXPORT DataObject
EnableIf< nsstd::is_same< TImageType, void >::value >::Type ConditionalInternalInitialization(TImageType *)
Image(itk::SmartPointer< TImageType > image)
Construct an SimpleITK Image from an pointer to an ITK image.
Image(TImageType *image)
Construct an SimpleITK Image from an pointer to an ITK image.
#define SITKCommon_EXPORT
The main Image class for SimpleITK.
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Private implementation idiom image base class.
#define sitkStaticAssert(expr, str)