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

#include <ConstGenericImageIterator.h>

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

Public Member Functions

 ConstGenericImageIterator (const ImageAttributes &, const VoxelType *=NULL)
 Constructor.
 
 ConstGenericImageIterator (GenericImage< VoxelType > &)
 Constructor.
 
 ConstGenericImageIterator (GenericImage< VoxelType > *)
 Constructor.
 
 ConstGenericImageIterator (const ConstImageIterator &)
 Copy constructor.
 
const VoxelType * Current () const
 
const VoxelType * Current (int) const
 
const VoxelType * Next ()
 
const VoxelType * Next (int)
 
ConstGenericImageIteratoroperator= (const ConstGenericImageIterator &)
 Assignment operator.
 
const VoxelType & Value () const
 
const VoxelType & Value (int t) const
 
double ValueAsDouble () const
 Get current voxel value casted to double.
 
double ValueAsDouble (int) const
 
 ~ConstGenericImageIterator ()
 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::ConstGenericImageIterator< VoxelType >

Const image iterator

Definition at line 36 of file ConstGenericImageIterator.h.

Member Function Documentation

§ Current() [1/2]

template<class VoxelType >
const VoxelType * mirtk::ConstGenericImageIterator< 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 166 of file ConstGenericImageIterator.h.

§ Current() [2/2]

template<class VoxelType >
const VoxelType * mirtk::ConstGenericImageIterator< 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 173 of file ConstGenericImageIterator.h.

§ Next() [1/2]

template<class VoxelType >
const VoxelType * mirtk::ConstGenericImageIterator< 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 180 of file ConstGenericImageIterator.h.

§ Next() [2/2]

template<class VoxelType >
const VoxelType * mirtk::ConstGenericImageIterator< 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 187 of file ConstGenericImageIterator.h.

§ Value() [1/2]

template<class VoxelType >
const VoxelType & mirtk::ConstGenericImageIterator< 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 194 of file ConstGenericImageIterator.h.

§ Value() [2/2]

template<class VoxelType >
const VoxelType & mirtk::ConstGenericImageIterator< 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 201 of file ConstGenericImageIterator.h.

§ ValueAsDouble()

template<class VoxelType >
double mirtk::ConstGenericImageIterator< 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 215 of file ConstGenericImageIterator.h.


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