Loading...
Searching...
No Matches
itk::NDImageBase< TPixel > Class Template Referenceabstract
Common » Miscellaneous

`#include <itkNDImageBase.h>`

## Detailed Description

template<class TPixel>
class itk::NDImageBase< TPixel >

An image whose dimension can be specified at runtime.

The NDImageBase class is needed for the FullSearch optimizer. It allows run-time construction of an N-dimensional image. It has most of the functionality of a normal itk::Image.

Todo
  not all! An internal writer and reader are included for convenience.

The NewNDImage function defines the dimension of the image. CreateNewImage creates an instance of an itk::Image, with dimension as specified by NewNDImage. Note: the NewNDImage does not return an itk::Image, but an elx::NDImageTemplate.

Suggested way of using this class:
NDImageBase<short> var1 = NDImageBase::NewNDImage(3);
var1->CreateNewImage();
The result is similar as:
itk::Image<short,3>::Pointer var1 = itk::Image<short,3>::New();
except that the actual itk::Image is stored as member variable in the NDImageTemplate.

See also
  FullSearchOptimizer, NDImageTemplate

Definition at line 58 of file itkNDImageBase.h.

Inheritance diagram for itk::NDImageBase< TPixel >:
[legend]

## Public Types

using | AccessorType = typename Image<TPixel, 2>::AccessorType
using | ConstPointer = SmartPointer<const Self>
using | DataObjectPointer = DataObject::Pointer
using | IndexType = Array<IndexValueType>
using | InternalPixelType = typename Image<TPixel, 2>::InternalPixelType
using | OffsetType = Array<OffsetValueType>
using | OffsetValueType = typename ImageBase<2>::OffsetValueType
using | PixelContainer = typename Image<TPixel, 2>::PixelContainer
using | PixelContainerConstPointer = typename Image<TPixel, 2>::PixelContainerConstPointer
using | PixelContainerPointer = typename Image<TPixel, 2>::PixelContainerPointer
using | Point2DType = typename ImageBase<2>::PointType
using | Pointer = SmartPointer<Self>
using | PointType = Array<PointValueType>
using | PointValueType = typename Point2DType::ValueType
using | Self = NDImageBase
using | SizeType = Array<SizeValueType>
using | Spacing2DType = typename ImageBase<2>::SpacingType
using | SpacingType = Array<SpacingValueType>
using | SpacingValueType = typename Spacing2DType::ValueType
using | Superclass = Object
using | ValueType = typename Image<TPixel, 2>::ValueType

## Public Member Functions

virtual void | Allocate ()=0
virtual IndexType | ComputeIndex (OffsetValueType offset) const =0
virtual OffsetValueType | ComputeOffset (const IndexType &ind) const =0
virtual void | CopyInformation (const DataObject *data)=0
virtual void | CreateNewImage ()=0
virtual void | FillBuffer (const TPixel &value)=0
virtual const TPixel * | GetBufferPointer () const =0
virtual TPixel * | GetBufferPointer ()=0
virtual const char * | GetClassName () const
virtual unsigned int | GetImageDimension ()=0
virtual ImageIOBase * | GetImageIOReader ()=0
virtual ImageIOBase * | GetImageIOWriter ()=0
virtual const char * | GetInputFileName ()=0
virtual const OffsetValueType * | GetOffsetTable () const =0
virtual PointType | GetOrigin ()=0
virtual const char * | GetOutputFileName ()=0
virtual const TPixel & | GetPixel (const IndexType &index) const =0
virtual TPixel & | GetPixel (const IndexType &index)=0
virtual const AccessorType | GetPixelAccessor () const =0
virtual AccessorType | GetPixelAccessor ()=0
virtual const PixelContainer * | GetPixelContainer () const =0
virtual PixelContainer * | GetPixelContainer ()=0
virtual SpacingType | GetSpacing ()=0
virtual unsigned int | ImageDimension ()=0
virtual void | Initialize ()=0
| ITK_DISALLOW_COPY_AND_MOVE (NDImageBase)
TPixel & | operator[] (const IndexType &index)
const TPixel & | operator[] (const IndexType &index) const
virtual void | Read ()=0
virtual void | SetImageIOReader (ImageIOBase *_arg)=0
virtual void | SetImageIOWriter (ImageIOBase *_arg)=0
virtual void | SetInputFileName (const char *)=0
virtual void | SetOrigin (const PointType &origin)=0
virtual void | SetOutputFileName (const char *)=0
virtual void | SetPixel (const IndexType &index, const TPixel &value)=0
virtual void | SetPixelContainer (PixelContainer *container)=0
virtual void | SetRegions (SizeType size)=0
virtual void | SetRequestedRegion (DataObject *data)=0
virtual void | SetSpacing (const SpacingType &spacing)=0
virtual void | Write ()=0

## Static Public Member Functions

static Pointer | NewNDImage (unsigned int dim)

## Protected Member Functions

| NDImageBase ()=default
| ~NDImageBase () override=default

## Member Typedef Documentation

## AccessorType

template<class TPixel>

using itk::NDImageBase< TPixel >::AccessorType = typename Image<TPixel, 2>::AccessorType

Definition at line 83 of file itkNDImageBase.h.

## ConstPointer

template<class TPixel>

using itk::NDImageBase< TPixel >::ConstPointer = SmartPointer<const Self>

Definition at line 67 of file itkNDImageBase.h.

## DataObjectPointer

template<class TPixel>

using itk::NDImageBase< TPixel >::DataObjectPointer = DataObject::Pointer

Definition at line 77 of file itkNDImageBase.h.

## IndexType

template<class TPixel>

using itk::NDImageBase< TPixel >::IndexType = Array<IndexValueType>

ND versions of the index and sizetypes. Unlike in their counterparts in the itk::Image, their size can be defined at runtime. The elx::NDImageTemplate takes care of converting from/to these types to to/from the corresponding types in itk::Image.

Definition at line 100 of file itkNDImageBase.h.

## InternalPixelType

template<class TPixel>

using itk::NDImageBase< TPixel >::InternalPixelType = typename Image<TPixel, 2>::InternalPixelType

Definition at line 82 of file itkNDImageBase.h.

## OffsetType

template<class TPixel>

using itk::NDImageBase< TPixel >::OffsetType = Array<OffsetValueType>

Definition at line 104 of file itkNDImageBase.h.

## OffsetValueType

template<class TPixel>

using itk::NDImageBase< TPixel >::OffsetValueType = typename ImageBase<2>::OffsetValueType

Definition at line 93 of file itkNDImageBase.h.

## PixelContainer

template<class TPixel>

using itk::NDImageBase< TPixel >::PixelContainer = typename Image<TPixel, 2>::PixelContainer

Definition at line 84 of file itkNDImageBase.h.

## PixelContainerConstPointer

template<class TPixel>

using itk::NDImageBase< TPixel >::PixelContainerConstPointer = typename Image<TPixel, 2>::PixelContainerConstPointer

Definition at line 86 of file itkNDImageBase.h.

## PixelContainerPointer

template<class TPixel>

using itk::NDImageBase< TPixel >::PixelContainerPointer = typename Image<TPixel, 2>::PixelContainerPointer

Definition at line 85 of file itkNDImageBase.h.

## Point2DType

template<class TPixel>

using itk::NDImageBase< TPixel >::Point2DType = typename ImageBase<2>::PointType

Definition at line 89 of file itkNDImageBase.h.

## Pointer

template<class TPixel>

using itk::NDImageBase< TPixel >::Pointer = SmartPointer<Self>

Definition at line 66 of file itkNDImageBase.h.

## PointType

template<class TPixel>

using itk::NDImageBase< TPixel >::PointType = Array<PointValueType>

Definition at line 103 of file itkNDImageBase.h.

## PointValueType

template<class TPixel>

using itk::NDImageBase< TPixel >::PointValueType = typename Point2DType::ValueType

Definition at line 92 of file itkNDImageBase.h.

## Self

template<class TPixel>

using itk::NDImageBase< TPixel >::Self = NDImageBase

Standard class typedefs.

Definition at line 64 of file itkNDImageBase.h.

## SizeType

template<class TPixel>

using itk::NDImageBase< TPixel >::SizeType = Array<SizeValueType>

Definition at line 101 of file itkNDImageBase.h.

## Spacing2DType

template<class TPixel>

using itk::NDImageBase< TPixel >::Spacing2DType = typename ImageBase<2>::SpacingType

Definition at line 88 of file itkNDImageBase.h.

## SpacingType

template<class TPixel>

using itk::NDImageBase< TPixel >::SpacingType = Array<SpacingValueType>

Definition at line 102 of file itkNDImageBase.h.

## SpacingValueType

template<class TPixel>

using itk::NDImageBase< TPixel >::SpacingValueType = typename Spacing2DType::ValueType

Definition at line 91 of file itkNDImageBase.h.

## Superclass

template<class TPixel>

using itk::NDImageBase< TPixel >::Superclass = Object

Definition at line 65 of file itkNDImageBase.h.

## ValueType

template<class TPixel>

using itk::NDImageBase< TPixel >::ValueType = typename Image<TPixel, 2>::ValueType

Definition at line 81 of file itkNDImageBase.h.

## Constructor & Destructor Documentation

## NDImageBase()

template<class TPixel>

itk::NDImageBase< TPixel >::NDImageBase | ( |  | ) |

protected default

## ~NDImageBase()

template<class TPixel>

itk::NDImageBase< TPixel >::~NDImageBase | ( |  | ) |

override protected default

## Member Function Documentation

## Allocate()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::Allocate | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## ComputeIndex()

template<class TPixel>

virtual IndexType itk::NDImageBase< TPixel >::ComputeIndex | ( | OffsetValueType | offset | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## ComputeOffset()

template<class TPixel>

virtual OffsetValueType itk::NDImageBase< TPixel >::ComputeOffset | ( | const IndexType & | ind | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## CopyInformation()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::CopyInformation | ( | const DataObject * | data | ) |

pure virtual

Todo
  Transform IndexToPoint methods.

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## CreateNewImage()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::CreateNewImage | ( |  | ) |

pure virtual

Use New method to create a new actual image

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## FillBuffer()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::FillBuffer | ( | const TPixel & | value | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetBufferPointer() [1/2]

template<class TPixel>

virtual const TPixel * itk::NDImageBase< TPixel >::GetBufferPointer | ( |  | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetBufferPointer() [2/2]

template<class TPixel>

virtual TPixel * itk::NDImageBase< TPixel >::GetBufferPointer | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetClassName()

template<class TPixel>

virtual const char * itk::NDImageBase< TPixel >::GetClassName | ( |  | ) | const

virtual

Method for creation through the object factory. Run-time type information (and related methods).

Reimplemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetImageDimension()

template<class TPixel>

virtual unsigned int itk::NDImageBase< TPixel >::GetImageDimension | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetImageIOReader()

template<class TPixel>

virtual ImageIOBase * itk::NDImageBase< TPixel >::GetImageIOReader | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetImageIOWriter()

template<class TPixel>

virtual ImageIOBase * itk::NDImageBase< TPixel >::GetImageIOWriter | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetInputFileName()

template<class TPixel>

virtual const char * itk::NDImageBase< TPixel >::GetInputFileName | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetOffsetTable()

template<class TPixel>

virtual const OffsetValueType * itk::NDImageBase< TPixel >::GetOffsetTable | ( |  | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetOrigin()

template<class TPixel>

virtual PointType itk::NDImageBase< TPixel >::GetOrigin | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetOutputFileName()

template<class TPixel>

virtual const char * itk::NDImageBase< TPixel >::GetOutputFileName | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetPixel() [1/2]

template<class TPixel>

virtual const TPixel & itk::NDImageBase< TPixel >::GetPixel | ( | const IndexType & | index | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetPixel() [2/2]

template<class TPixel>

virtual TPixel & itk::NDImageBase< TPixel >::GetPixel | ( | const IndexType & | index | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetPixelAccessor() [1/2]

template<class TPixel>

virtual const AccessorType itk::NDImageBase< TPixel >::GetPixelAccessor | ( |  | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetPixelAccessor() [2/2]

template<class TPixel>

virtual AccessorType itk::NDImageBase< TPixel >::GetPixelAccessor | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetPixelContainer() [1/2]

template<class TPixel>

virtual const PixelContainer * itk::NDImageBase< TPixel >::GetPixelContainer | ( |  | ) | const

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetPixelContainer() [2/2]

template<class TPixel>

virtual PixelContainer * itk::NDImageBase< TPixel >::GetPixelContainer | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## GetSpacing()

template<class TPixel>

virtual SpacingType itk::NDImageBase< TPixel >::GetSpacing | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## ImageDimension()

template<class TPixel>

virtual unsigned int itk::NDImageBase< TPixel >::ImageDimension | ( |  | ) |

pure virtual

Extra functions for NDImage. Get the Dimension.

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## Initialize()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::Initialize | ( |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## ITK_DISALLOW_COPY_AND_MOVE()

template<class TPixel>

itk::NDImageBase< TPixel >::ITK_DISALLOW_COPY_AND_MOVE | ( | NDImageBase< TPixel > |  | ) |

## NewNDImage()

template<class TPixel>

auto itk::NDImageBase< TPixel >::NewNDImage | ( | unsigned int | dim | ) |

static

Definition at line 261 of file itkNDImageBase.h.

## operator[]() [1/2]

template<class TPixel>

TPixel & itk::NDImageBase< TPixel >::operator[] | ( | const IndexType & | index | ) |

inline

Definition at line 144 of file itkNDImageBase.h.

## operator[]() [2/2]

template<class TPixel>

const TPixel & itk::NDImageBase< TPixel >::operator[] | ( | const IndexType & | index | ) | const

inline

Definition at line 145 of file itkNDImageBase.h.

## Read()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::Read | ( |  | ) |

pure virtual

Read image data from file into the actual image

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetImageIOReader()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetImageIOReader | ( | ImageIOBase * | _arg | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetImageIOWriter()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetImageIOWriter | ( | ImageIOBase * | _arg | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetInputFileName()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetInputFileName | ( | const char * |  | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetOrigin()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetOrigin | ( | const PointType & | origin | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetOutputFileName()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetOutputFileName | ( | const char * |  | ) |

pure virtual

Set/Get the Input/OutputFileName

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetPixel()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetPixel | ( | const IndexType & | index,
|  | const TPixel & | value )

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetPixelContainer()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetPixelContainer | ( | PixelContainer * | container | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetRegions()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetRegions | ( | SizeType | size | ) |

pure virtual

Todo
  : extend to direction cosines; but not needed for now in elastix

Region typedef support. A region is used to specify a subset of an image.

Todo
  an NDRegionType should first be declared, in the same way as NDImage use SetRegions(size) for now. then knowlegde of the RegionType is not necessary. alternative: forget about the regiontype and add the functions SetLargestPossibleRegion, SetRegions etc with arguments (index,size) or maybe: ImageIORegion

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetRequestedRegion()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetRequestedRegion | ( | DataObject * | data | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## SetSpacing()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::SetSpacing | ( | const SpacingType & | spacing | ) |

pure virtual

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

## Write()

template<class TPixel>

virtual void itk::NDImageBase< TPixel >::Write | ( |  | ) |

pure virtual

Write the actual image to file.

Implemented in itk::NDImageTemplate< TPixel, VDimension >.

Generated on 1768596610 for elastix by 1.15.0 |