49 class PimpleImageBase;
109 Image(
const std::vector< unsigned int > &size,
PixelIDValueEnum valueEnum,
unsigned int numberOfComponents = 0 );
129 template <
typename TImageType>
134 "invalid pixel type" );
135 this->InternalInitialization<ImageTypeToPixelIDValue<TImageType>::Result, TImageType::ImageDimension>( image.
GetPointer() );
137 template <
typename TImageType>
142 "invalid pixel type" );
143 this->InternalInitialization<ImageTypeToPixelIDValue<TImageType>::Result, TImageType::ImageDimension>( image );
173 std::string GetPixelIDTypeAsString(
void )
const;
182 unsigned int GetDimension(
void )
const;
189 unsigned int GetNumberOfComponentsPerPixel(
void )
const;
199 uint64_t GetNumberOfPixels(
void )
const;
204 std::vector< double > GetOrigin(
void )
const;
205 void SetOrigin(
const std::vector< double > &origin );
214 std::vector< double > GetSpacing(
void )
const;
215 void SetSpacing(
const std::vector< double > &spacing );
225 std::vector< double > GetDirection()
const;
226 void SetDirection (
const std::vector< double > &direction );
230 std::vector< double > TransformIndexToPhysicalPoint(
const std::vector< int64_t > &index )
const;
233 std::vector< int64_t > TransformPhysicalPointToIndex(
const std::vector< double >& point )
const;
236 std::vector< double > TransformPhysicalPointToContinuousIndex(
const std::vector< double >& point )
const;
239 std::vector< double > TransformContinuousIndexToPhysicalPoint(
const std::vector< double > &index)
const;
244 std::vector< unsigned int > GetSize(
void )
const;
247 unsigned int GetWidth(
void )
const;
250 unsigned int GetHeight(
void )
const;
254 unsigned int GetDepth(
void )
const;
267 void CopyInformation(
const Image &srcImage );
275 std::vector<std::string> GetMetaDataKeys(
void )
const;
279 bool HasMetaDataKey(
const std::string &key )
const;
289 std::string GetMetaData(
const std::string &key )
const;
295 void SetMetaData(
const std::string &key,
const std::string &value);
302 bool EraseMetaData(
const std::string &key );
304 std::string ToString(
void )
const;
321 int8_t GetPixelAsInt8(
const std::vector<uint32_t> &idx)
const;
322 uint8_t GetPixelAsUInt8(
const std::vector<uint32_t> &idx)
const;
323 int16_t GetPixelAsInt16(
const std::vector<uint32_t> &idx )
const;
324 uint16_t GetPixelAsUInt16(
const std::vector<uint32_t> &idx )
const;
325 int32_t GetPixelAsInt32(
const std::vector<uint32_t> &idx )
const;
326 uint32_t GetPixelAsUInt32(
const std::vector<uint32_t> &idx )
const;
327 int64_t GetPixelAsInt64(
const std::vector<uint32_t> &idx )
const;
328 uint64_t GetPixelAsUInt64(
const std::vector<uint32_t> &idx )
const;
329 float GetPixelAsFloat(
const std::vector<uint32_t> &idx )
const;
330 double GetPixelAsDouble(
const std::vector<uint32_t> &idx )
const;
332 std::vector<int8_t> GetPixelAsVectorInt8(
const std::vector<uint32_t> &idx)
const;
333 std::vector<uint8_t> GetPixelAsVectorUInt8(
const std::vector<uint32_t> &idx)
const;
334 std::vector<int16_t> GetPixelAsVectorInt16(
const std::vector<uint32_t> &idx )
const;
335 std::vector<uint16_t> GetPixelAsVectorUInt16(
const std::vector<uint32_t> &idx )
const;
336 std::vector<int32_t> GetPixelAsVectorInt32(
const std::vector<uint32_t> &idx )
const;
337 std::vector<uint32_t> GetPixelAsVectorUInt32(
const std::vector<uint32_t> &idx )
const;
338 std::vector<int64_t> GetPixelAsVectorInt64(
const std::vector<uint32_t> &idx )
const;
339 std::vector<uint64_t> GetPixelAsVectorUInt64(
const std::vector<uint32_t> &idx )
const;
340 std::vector<float> GetPixelAsVectorFloat32(
const std::vector<uint32_t> &idx )
const;
341 std::vector<double> GetPixelAsVectorFloat64(
const std::vector<uint32_t> &idx )
const;
343 std::complex<float> GetPixelAsComplexFloat32(
const std::vector<uint32_t> &idx )
const;
344 std::complex<double> GetPixelAsComplexFloat64(
const std::vector<uint32_t> &idx )
const;
363 void SetPixelAsInt8(
const std::vector<uint32_t> &idx,
int8_t v );
364 void SetPixelAsUInt8(
const std::vector<uint32_t> &idx,
uint8_t v );
365 void SetPixelAsInt16(
const std::vector<uint32_t> &idx,
int16_t v );
366 void SetPixelAsUInt16(
const std::vector<uint32_t> &idx,
uint16_t v );
367 void SetPixelAsInt32(
const std::vector<uint32_t> &idx,
int32_t v );
368 void SetPixelAsUInt32(
const std::vector<uint32_t> &idx,
uint32_t v );
369 void SetPixelAsInt64(
const std::vector<uint32_t> &idx,
int64_t v );
370 void SetPixelAsUInt64(
const std::vector<uint32_t> &idx,
uint64_t v );
371 void SetPixelAsFloat(
const std::vector<uint32_t> &idx,
float v );
372 void SetPixelAsDouble(
const std::vector<uint32_t> &idx,
double v );
374 void SetPixelAsVectorInt8(
const std::vector<uint32_t> &idx,
const std::vector<int8_t> &v );
375 void SetPixelAsVectorUInt8(
const std::vector<uint32_t> &idx,
const std::vector<uint8_t> &v );
376 void SetPixelAsVectorInt16(
const std::vector<uint32_t> &idx,
const std::vector<int16_t> &v );
377 void SetPixelAsVectorUInt16(
const std::vector<uint32_t> &idx,
const std::vector<uint16_t> &v );
378 void SetPixelAsVectorInt32(
const std::vector<uint32_t> &idx,
const std::vector<int32_t> &v );
379 void SetPixelAsVectorUInt32(
const std::vector<uint32_t> &idx,
const std::vector<uint32_t> &v );
380 void SetPixelAsVectorInt64(
const std::vector<uint32_t> &idx,
const std::vector<int64_t> &v );
381 void SetPixelAsVectorUInt64(
const std::vector<uint32_t> &idx,
const std::vector<uint64_t> &v );
382 void SetPixelAsVectorFloat32(
const std::vector<uint32_t> &idx,
const std::vector<float> &v );
383 void SetPixelAsVectorFloat64(
const std::vector<uint32_t> &idx,
const std::vector<double> &v );
385 void SetPixelAsComplexFloat32(
const std::vector<uint32_t> &idx,
const std::complex<float> v );
386 void SetPixelAsComplexFloat64(
const std::vector<uint32_t> &idx,
const std::complex<double> v );
413 int8_t *GetBufferAsInt8( );
421 float *GetBufferAsFloat( );
422 double *GetBufferAsDouble( );
424 const int8_t *GetBufferAsInt8( )
const;
425 const uint8_t *GetBufferAsUInt8( )
const;
426 const int16_t *GetBufferAsInt16( )
const;
427 const uint16_t *GetBufferAsUInt16( )
const;
428 const int32_t *GetBufferAsInt32( )
const;
429 const uint32_t *GetBufferAsUInt32( )
const;
430 const int64_t *GetBufferAsInt64( )
const;
431 const uint64_t *GetBufferAsUInt64( )
const;
432 const float *GetBufferAsFloat( )
const;
433 const double *GetBufferAsDouble( )
const;
443 void MakeUnique(
void );
453 void Allocate (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
PixelIDValueEnum valueEnum,
unsigned int numberOfComponents );
462 template<
class TImageType>
464 AllocateInternal (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
unsigned int numberOfComponents );
466 template<
class TImageType>
468 AllocateInternal (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
unsigned int numberOfComponents );
470 template<
class TImageType>
472 AllocateInternal (
unsigned int width,
unsigned int height,
unsigned int depth,
unsigned int dim4,
unsigned int numberOfComponents );
486 template <
int VPixelIDValue,
unsigned int VImageDimension>
488 VPixelIDValue>::Result,
489 VImageDimension>::ImageType *i );
498 template<
int VPixelIDValue,
typename TImageType>
500 ConditionalInternalInitialization( TImageType *i);
502 template<
int VPixelIDValue,
typename TImageType>
510 template <
class TMemberFunctionPo
inter >
513 typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType
ObjectType;
515 template<
typename TImageType >
516 TMemberFunctionPointer operator() (
void )
const
518 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 Image class for SimpleITK.
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Private implementation idiom image base class.
#define sitkStaticAssert(expr, str)