DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
itk::VectorImageRegionIteratorWithIndex< TImage > Class Template Reference

#include <itkVectorImageRegionIteratorWithIndex.h>

+ Inheritance diagram for itk::VectorImageRegionIteratorWithIndex< TImage >:
+ Collaboration diagram for itk::VectorImageRegionIteratorWithIndex< TImage >:

Detailed Description

template<typename TImage>
class itk::VectorImageRegionIteratorWithIndex< TImage >

A multi-dimensional iterator templated over image type. It provides the same interfaces for both itk::Image<T, N+1> and itk::VectorImage<T, N>

Author
Jian Cheng

If image4d is a itk::Image<double,4> or itk::VectorImage<double,3> object, and k is 0,1,2,3 axis, then the iterator could loop over axises except k-axis, and obtain a vector a long k-axis

itk::VectorImageRegionIteratorWithIndex<NDImageType> it(image4d, image4d->GetLargestPossibleRegion(),k);
int sizeVec = itk::GetVectorImageVectorSize(image4d); // number of components in t-axis
itk::VariableLengthVector<double> vec; // vector along k-axis
for (it.GoToBegin(); !it.IsAtEnd(); ++it)
{
// i means the coordinate in the last axis (t-axis)
for ( int i = 0; i < (k==3?1:sizeVec); ++i )
{
index = it.GetIndex();
it.GetVector(vec, i);
// do somthing for vec ...
it.SetVector(vec, i);
}
}
See also
itkVectorImageRegionIteratorWithIndexTest.cxx

Definition at line 63 of file itkVectorImageRegionIteratorWithIndex.h.

Public Types

typedef Superclass::AccessorType AccessorType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::IndexType IndexType
 
typedef Superclass::InternalPixelType InternalPixelType
 
typedef ImageRegion< TImage::ImageDimension+1 > NDImageRegionType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::PixelContainer PixelContainer
 
typedef Superclass::PixelContainerPointer PixelContainerPointer
 
typedef Superclass::PixelType PixelType
 
typedef VariableLengthVector< InternalPixelTypePixelVectorType
 
typedef Superclass::RegionType RegionType
 
typedef VectorImageRegionIteratorWithIndex Self
 
typedef Superclass::SizeType SizeType
 
typedef ImageRegionIteratorWithIndex< TImage > Superclass
 
typedef ImageRegion< TImage::ImageDimension > VectorImageRegionType
 

Public Member Functions

void GetVector (PixelVectorType &vec, const int offIndex=0) const
 
Selfoperator= (const Self &it)
 
void SetVector (const PixelVectorType &value, const int offIndex=0) const
 
 typedef (itk::Concept::SameType< ImageType, VectorImage< InternalPixelType, ImageIteratorDimension > >) SameTypeCheck
 
 typedef (itk::Concept::SameType< PixelType, PixelVectorType >) SameTypeCheck2
 
 VectorImageRegionIteratorWithIndex ()
 
 VectorImageRegionIteratorWithIndex (const Self &it)
 
 VectorImageRegionIteratorWithIndex (TImage *ptr, const RegionType &regionInput, int vectorAxis=-1)
 
 ~VectorImageRegionIteratorWithIndex ()
 

Static Public Attributes

static const unsigned int ImageIteratorDimension = TImage::ImageDimension
 

Protected Member Functions

void Initialize (TImage *ptr, const RegionType &regionInput, int vectorAxis=-1)
 
Selfoperator= (const ImageRegionIteratorWithIndex< TImage > &it)
 
 VectorImageRegionIteratorWithIndex (const ImageRegionIteratorWithIndex< TImage > &it)
 

Protected Attributes

const InternalPixelTypem_BeginBuffer
 
int m_VectorAxis
 
int m_VectorSize
 
OffsetValueType m_VectorStride
 

Member Typedef Documentation

template<typename TImage>
typedef Superclass::AccessorType itk::VectorImageRegionIteratorWithIndex< TImage >::AccessorType

Definition at line 90 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::ImageType itk::VectorImageRegionIteratorWithIndex< TImage >::ImageType

Definition at line 85 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::IndexType itk::VectorImageRegionIteratorWithIndex< TImage >::IndexType

Inherit types from the superclass

Definition at line 81 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::InternalPixelType itk::VectorImageRegionIteratorWithIndex< TImage >::InternalPixelType

Definition at line 88 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef ImageRegion<TImage::ImageDimension+1> itk::VectorImageRegionIteratorWithIndex< TImage >::NDImageRegionType

Definition at line 92 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::OffsetType itk::VectorImageRegionIteratorWithIndex< TImage >::OffsetType

Definition at line 83 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::PixelContainer itk::VectorImageRegionIteratorWithIndex< TImage >::PixelContainer

Definition at line 86 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::PixelContainerPointer itk::VectorImageRegionIteratorWithIndex< TImage >::PixelContainerPointer

Definition at line 87 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::PixelType itk::VectorImageRegionIteratorWithIndex< TImage >::PixelType

Definition at line 89 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef VariableLengthVector< InternalPixelType > itk::VectorImageRegionIteratorWithIndex< TImage >::PixelVectorType

Definition at line 95 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::RegionType itk::VectorImageRegionIteratorWithIndex< TImage >::RegionType

Definition at line 84 of file itkVectorImageRegionIteratorWithIndex.h.

Standard class typedefs.

Definition at line 67 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef Superclass::SizeType itk::VectorImageRegionIteratorWithIndex< TImage >::SizeType

Definition at line 82 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef ImageRegionIteratorWithIndex< TImage > itk::VectorImageRegionIteratorWithIndex< TImage >::Superclass

Define the superclass

Definition at line 77 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
typedef ImageRegion<TImage::ImageDimension> itk::VectorImageRegionIteratorWithIndex< TImage >::VectorImageRegionType

Definition at line 93 of file itkVectorImageRegionIteratorWithIndex.h.

Constructor & Destructor Documentation

template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::VectorImageRegionIteratorWithIndex ( )
inline
template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::~VectorImageRegionIteratorWithIndex ( )
inline

Default Destructor

Definition at line 116 of file itkVectorImageRegionIteratorWithIndex.h.

template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::VectorImageRegionIteratorWithIndex ( const Self it)
inline
template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::VectorImageRegionIteratorWithIndex ( TImage *  ptr,
const RegionType regionInput,
int  vectorAxis = -1 
)
inline

Constructor establishes an iterator to walk a particular image and a particular region of that image.

Definition at line 130 of file itkVectorImageRegionIteratorWithIndex.h.

References itk::VectorImageRegionIteratorWithIndex< TImage >::Initialize().

+ Here is the call graph for this function:

template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::VectorImageRegionIteratorWithIndex ( const ImageRegionIteratorWithIndex< TImage > &  it)
protected

This constructor is declared protected in order to enforce const-correctness

Member Function Documentation

template<typename TImage>
void itk::VectorImageRegionIteratorWithIndex< TImage >::GetVector ( PixelVectorType vec,
const int  offIndex = 0 
) const
inline
template<typename TImage>
void itk::VectorImageRegionIteratorWithIndex< TImage >::Initialize ( TImage *  ptr,
const RegionType regionInput,
int  vectorAxis = -1 
)
inlineprotected
template<typename TImage>
Self& itk::VectorImageRegionIteratorWithIndex< TImage >::operator= ( const Self it)
inline
template<typename TImage>
Self& itk::VectorImageRegionIteratorWithIndex< TImage >::operator= ( const ImageRegionIteratorWithIndex< TImage > &  it)
protected
template<typename TImage>
void itk::VectorImageRegionIteratorWithIndex< TImage >::SetVector ( const PixelVectorType value,
const int  offIndex = 0 
) const
inline
template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::typedef ( itk::Concept::SameType< ImageType, VectorImage< InternalPixelType, ImageIteratorDimension > >  )

This class requires SameTypeCheck in the form of ( itk::Concept::SameType< ImageType, VectorImage<InternalPixelType, ImageIteratorDimension> > )

template<typename TImage>
itk::VectorImageRegionIteratorWithIndex< TImage >::typedef ( itk::Concept::SameType< PixelType, PixelVectorType )

This class requires SameTypeCheck2 in the form of ( itk::Concept::SameType< PixelType, PixelVectorType> )

Member Data Documentation

template<typename TImage>
const unsigned int itk::VectorImageRegionIteratorWithIndex< TImage >::ImageIteratorDimension = TImage::ImageDimension
static
template<typename TImage>
const InternalPixelType* itk::VectorImageRegionIteratorWithIndex< TImage >::m_BeginBuffer
protected
template<typename TImage>
int itk::VectorImageRegionIteratorWithIndex< TImage >::m_VectorAxis
protected
template<typename TImage>
int itk::VectorImageRegionIteratorWithIndex< TImage >::m_VectorSize
protected
template<typename TImage>
OffsetValueType itk::VectorImageRegionIteratorWithIndex< TImage >::m_VectorStride
protected

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