Public Member Functions | List of all members
mirtk::GenericImageIterator< VoxelType > Class Template Reference

#include <GenericImageIterator.h>

Inheritance diagram for mirtk::GenericImageIterator< VoxelType >:
Inheritance graph
Collaboration diagram for mirtk::GenericImageIterator< VoxelType >:
Collaboration graph

Public Member Functions

VoxelType * Current () const
 
VoxelType * Current (int) const
 
 GenericImageIterator (const ImageAttributes &, VoxelType *=NULL)
 Constructor.
 
 GenericImageIterator (GenericImage< VoxelType > &)
 Constructor.
 
 GenericImageIterator (GenericImage< VoxelType > *)
 Constructor.
 
 GenericImageIterator (const ConstImageIterator &)
 Copy constructor.
 
VoxelType * Next ()
 
VoxelType * Next (int)
 
GenericImageIteratoroperator= (const GenericImageIterator &)
 Assignment operator.
 
VoxelType & Value () const
 
VoxelType & Value (int t) const
 
double ValueAsDouble () const
 Get current voxel value casted to double.
 
double ValueAsDouble (int) const
 
 ~GenericImageIterator ()
 Destructor.
 
- Public Member Functions inherited from mirtk::ImageIterator
template<class VoxelType >
VoxelType * Current () const
 
template<class VoxelType >
VoxelType * Current (int) const
 
 ImageIterator (const ImageAttributes &, int)
 Constructor.
 
 ImageIterator (const ImageAttributes &, void *=NULL, int=MIRTK_VOXEL_UNKNOWN)
 Constructor.
 
 ImageIterator (BaseImage &)
 Constructor.
 
 ImageIterator (BaseImage *)
 Constructor.
 
 ImageIterator (const ConstImageIterator &)
 Copy constructor.
 
template<class VoxelType >
VoxelType * Next ()
 
template<class VoxelType >
VoxelType * Next (int)
 
ImageIteratoroperator= (const ImageIterator &)
 Assignment operator.
 
template<class VoxelType >
VoxelType & Value () const
 
template<class VoxelType >
VoxelType & Value (int t) const
 
virtual ~ImageIterator ()
 Destructor.
 
- Public Member Functions inherited from mirtk::ConstImageIterator
int ColumnStride () const
 Get stride between columns in number of voxels.
 
 ConstImageIterator (const ImageAttributes &, int)
 Constructor.
 
 ConstImageIterator (const ImageAttributes &, const void *=NULL, int=MIRTK_VOXEL_UNKNOWN)
 Constructor.
 
 ConstImageIterator (const BaseImage &)
 Constructor.
 
 ConstImageIterator (const BaseImage *)
 Constructor.
 
 ConstImageIterator (const ConstImageIterator &)
 Copy constructor.
 
template<class VoxelType >
const VoxelType * Current () const
 
template<class VoxelType >
const VoxelType * Current (int) const
 
int FrameStride () const
 Get stride between frames in number of voxels.
 
void GoToBegin ()
 Go to begin of region.
 
void GoToCenter ()
 Go to center of region.
 
void GoToEnd ()
 Go to end of region.
 
void GoToIndex (int)
 Go to voxel with specified index relative to entire image.
 
void GoToPos (int)
 Go to specified position within image region.
 
void GoToVoxel (int, int, int=-1, int=-1)
 Go to voxel with specified coordinates relative to entire image.
 
void GoToVoxel (const Vector4D< int > &)
 Go to voxel with specified coordinates relative to entire image.
 
int Index () const
 Index of voxel at current iterator position.
 
int IndexToPos (int) const
 Convert voxel index to iterator position.
 
void IndexToVoxel (int, int &, int &) const
 Convert iterator position to voxel coordinates.
 
void IndexToVoxel (int, int &, int &, int &) const
 Convert iterator position to voxel coordinates.
 
void IndexToVoxel (int, int &, int &, int &, int &) const
 Convert iterator position to voxel coordinates.
 
void IndexToVoxel (int, Vector4D< int > &) const
 Convert iterator position to voxel coordinates.
 
bool IsAtBegin () const
 Whether iterator reached the start of the region and is invalid now.
 
bool IsAtEnd () const
 Whether iterator reached the end of the region and is invalid now.
 
bool IsImageSequence () const
 
bool IsScalar () const
 
bool IsScalarImage () const
 
bool IsSequence () const
 
int LineStride () const
 Get stride between rows/lines in number of voxels.
 
template<class VoxelType >
void Move (const VoxelType *&) const
 
template<class VoxelType >
void Move (VoxelType *&) const
 
template<class VoxelType >
const VoxelType * Next ()
 
template<class VoxelType >
const VoxelType * Next (int)
 
int NumberOfChannels () const
 Get number of channels in image region.
 
int NumberOfComponents () const
 Get number of vector components considered.
 
int NumberOfFrames () const
 Get number of frames in image region.
 
int NumberOfImageChannels () const
 
int NumberOfImageVoxels () const
 Number of voxels in the entire image.
 
int NumberOfSequenceFrames () const
 
int NumberOfVectorComponents () const
 
int NumberOfVoxels () const
 Number of voxels in image region.
 
 operator bool () const
 Whether iterator is valid and not yet at end of region.
 
void operator++ ()
 Pre-increment operator.
 
void operator-- ()
 Pre-decrement operator.
 
ConstImageIteratoroperator= (const ConstImageIterator &)
 Assignment operator.
 
int Pos () const
 Current iterator position within image region.
 
int PosToIndex (int) const
 Convert iterator position to voxel index.
 
void PosToVoxel (int, int &, int &) const
 Convert iterator position to voxel coordinates.
 
void PosToVoxel (int, int &, int &, int &) const
 Convert iterator position to voxel coordinates.
 
void PosToVoxel (int, int &, int &, int &, int &) const
 Convert iterator position to voxel coordinates.
 
void PosToVoxel (int, Vector4D< int > &) const
 Convert iterator position to voxel coordinates.
 
void SetChannel (int, int=1)
 Set temporal region (start and size)
 
void SetChannel (const blocked_range< int > &)
 Set temporal region (start and end)
 
void SetComponent (int, int=1)
 Set temporal region (start and size)
 
void SetComponent (const blocked_range< int > &)
 Set temporal region (start and end)
 
void SetData (const void *, int=MIRTK_VOXEL_UNKNOWN)
 Set raw data pointer to start of entire image.
 
void SetDataType (int)
 Set data type - defines number of bytes per voxel.
 
void SetFrame (int, int=1)
 Set temporal region (start and size)
 
void SetFrame (const blocked_range< int > &)
 Set temporal region (start and end)
 
void SetNeighborhood (int, int, int, int)
 Set 2D neighborhood (center and radius)
 
void SetNeighborhood (int, int, int, int, int, int)
 Set 3D neighborhood (center and radius)
 
void SetNeighborhood (int, int, int, int, int, int, int, int)
 Set 4D neighborhood (center and radius)
 
void SetRegion (int, int, int, int)
 Set 2D image region (start and size)
 
void SetRegion (const blocked_range2d< int > &)
 Set 2D image region (start and end)
 
void SetRegion (int, int, int, int, int, int)
 Set 3D image region (start and size)
 
void SetRegion (const blocked_range3d< int > &)
 Set 3D image region (start and end)
 
void SetRegion (int, int, int, int, int, int, int, int)
 Set 4D image region (start and size)
 
int SliceStride () const
 Get stride between slices in number of voxels.
 
template<class VoxelType >
const VoxelType & Value () const
 
template<class VoxelType >
const VoxelType & Value (int t) const
 
void Voxel (int &, int &) const
 Coordinates of voxel at current iterator position.
 
void Voxel (int &, int &, int &) const
 Coordinates of voxel at current iterator position.
 
void Voxel (int &, int &, int &, int &) const
 Coordinates of voxel at current iterator position.
 
int VoxelToIndex (int, int, int=0, int=0) const
 Convert voxel coordinates to index.
 
int VoxelToIndex (const Vector4D< int > &) const
 Convert voxel coordinates to index.
 
int VoxelToPos (int, int, int=0, int=0) const
 Convert voxel cooridnates to iterator position.
 
int VoxelToPos (const Vector4D< int > &) const
 Convert voxel cooridnates to iterator position.
 
virtual ~ConstImageIterator ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from mirtk::ConstImageIterator
void CalculateStride ()
 Calculate pointer increments.
 
void Initialize ()
 Initialize iterator, called by first GoTo command.
 
- Protected Attributes inherited from mirtk::ConstImageIterator
Vector4D< int > _Begin
 First index of the image region.
 
int _ColumnStride
 Increment in number of bytes (size of voxel type)
 
const char * _Data
 Pointer to begin of entire image.
 
Vector4D< int > _DataSize
 Size of the entire image.
 
Vector4D< int > _End
 Last index of the image region.
 
int _FrameStride
 Increment at end of frame in number of bytes.
 
int _Inc
 Previous pointer increment in number of bytes.
 
Vector4D< int > _Index
 Start index of the image region.
 
bool _IsImageSequence
 Whether the image is a sequence.
 
int _LineStride
 Increment at end of line in number of bytes.
 
const char * _Next
 Pointer to next image voxel.
 
Vector4D< int > _Size
 Size of image region.
 
int _SliceStride
 Increment at end of slice in number of bytes.
 
int _XYZ
 Number of voxels per frame of the image.
 

Detailed Description

template<class VoxelType>
class mirtk::GenericImageIterator< VoxelType >

Non-const image iterator

Definition at line 35 of file GenericImageIterator.h.

Member Function Documentation

§ Current() [1/2]

template<class VoxelType >
VoxelType * mirtk::GenericImageIterator< VoxelType >::Current ( ) const
inline

Get pointer to current iterator position

The VoxelType template argument must match the actual scalar type of the image.

Definition at line 165 of file GenericImageIterator.h.

§ Current() [2/2]

template<class VoxelType >
VoxelType * mirtk::GenericImageIterator< VoxelType >::Current ( int  t) const
inline

Get pointer to current iterator position

The VoxelType template argument must match the actual scalar type of the image.

Parameters
[in]tChannel/Component/Frame offset relative to current iterator position. For example, set iterator region to only the first channel/frame and then access other channels/vector components/frames using this method.

Definition at line 172 of file GenericImageIterator.h.

§ Next() [1/2]

template<class VoxelType >
VoxelType * mirtk::GenericImageIterator< VoxelType >::Next ( )
inline

Get pointer to current iterator position and post-increment iterator

The VoxelType template argument must match the actual scalar type of the image.

Definition at line 179 of file GenericImageIterator.h.

§ Next() [2/2]

template<class VoxelType >
VoxelType * mirtk::GenericImageIterator< VoxelType >::Next ( int  t)
inline

Get pointer to current iterator position and post-increment iterator

The VoxelType template argument must match the actual scalar type of the image.

Parameters
[in]tChannel/Component/Frame offset relative to current iterator position. For example, set iterator region to only the first channel/frame and then access other channels/vector components/frames using this method.

Definition at line 186 of file GenericImageIterator.h.

§ Value() [1/2]

template<class VoxelType >
VoxelType & mirtk::GenericImageIterator< VoxelType >::Value ( ) const
inline

Get reference to voxel value at current iterator position

The VoxelType template argument must match the actual scalar type of the image.

Definition at line 193 of file GenericImageIterator.h.

§ Value() [2/2]

template<class VoxelType >
VoxelType & mirtk::GenericImageIterator< VoxelType >::Value ( int  t) const
inline

Get reference to voxel value at current iterator position

The VoxelType template argument must match the actual scalar type of the image.

Parameters
[in]tChannel/Component/Frame offset relative to current iterator position. For example, set iterator region to only the first channel/frame and then access other channels/vector components/frames using this method.

Definition at line 200 of file GenericImageIterator.h.

§ ValueAsDouble()

template<class VoxelType >
double mirtk::GenericImageIterator< VoxelType >::ValueAsDouble ( int  t) const
inlinevirtual

Get current voxel value casted to double

Parameters
[in]tChannel/Component/Frame offset relative to current iterator position. For example, set iterator region to only the first channel/frame and then access other channels/vector components/frames using this method.

Reimplemented from mirtk::ConstImageIterator.

Definition at line 214 of file GenericImageIterator.h.


The documentation for this class was generated from the following file: