Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ImageConstIteratorWithIndex< TImage > Class Template Reference
[Image Iterators]

A base class for multi-dimensional iterators templated over image type that are designed to efficiently keep track of the iterator position. More...

#include <itkImageConstIteratorWithIndex.h>

Inheritance diagram for itk::ImageConstIteratorWithIndex< TImage >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef TImage::AccessorFunctorType AccessorFunctorType
typedef TImage::AccessorType AccessorType
typedef TImage ImageType
typedef TImage::IndexType IndexType
typedef IndexType::IndexValueType IndexValueType
typedef TImage::InternalPixelType InternalPixelType
typedef TImage::OffsetType OffsetType
typedef OffsetType::OffsetValueType OffsetValueType
typedef TImage::PixelContainer PixelContainer
typedef PixelContainer::Pointer PixelContainerPointer
typedef TImage::PixelType PixelType
typedef TImage::RegionType RegionType
typedef ImageConstIteratorWithIndex Self
typedef TImage::SizeType SizeType
typedef SizeType::SizeValueType SizeValueType

Public Member Functions

Self Begin (void) const
Self End (void) const
PixelType Get (void) const
const IndexTypeGetIndex () const
const RegionTypeGetRegion () const
void GoToBegin (void)
void GoToReverseBegin (void)
 ImageConstIteratorWithIndex (const TImage *ptr, const RegionType &region)
 ImageConstIteratorWithIndex (const Self &it)
 ImageConstIteratorWithIndex ()
bool IsAtEnd (void) const
bool IsAtReverseEnd (void) const
bool operator!= (const Self &it) const
bool operator< (const Self &it) const
bool operator<= (const Self &it) const
Selfoperator= (const Self &it)
bool operator== (const Self &it) const
bool operator> (const Self &it) const
bool operator>= (const Self &it) const
bool Remaining ()
const PixelTypeValue (void) const



void SetIndex (const IndexType &ind)

Static Public Member Functions

static unsigned int GetImageDimension ()

Static Public Attributes

static const unsigned int ImageDimension = TImage::ImageDimension

Protected Attributes

const InternalPixelTypem_Begin
IndexType m_BeginIndex
const InternalPixelTypem_End
IndexType m_EndIndex
TImage::ConstWeakPointer m_Image
unsigned long m_OffsetTable [ImageDimension+1]
AccessorType m_PixelAccessor
AccessorFunctorType m_PixelAccessorFunctor
const InternalPixelTypem_Position
IndexType m_PositionIndex
RegionType m_Region
bool m_Remaining

Detailed Description

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

A base class for multi-dimensional iterators templated over image type that are designed to efficiently keep track of the iterator position.

ImageConstIteratorWithIndex is a templated class to represent a multi-dimensional iterator. ImageConstIteratorWithIndex is templated over the dimension of the image and the data type of the image.

ImageConstIteratorWithIndex is a base class for the "WithIndex" family of ITK image iterators, which are designed to effeciently keep track of the image index position of the iterator during increment and decrement operations. This iterator is a base class and provides only the basic construction and comparison operations. It does not provide mechanisms for moving the iterator. A subclass of ImageConstIteratorWithIndex must be used to move the iterator.

ImageConstIteratorWithIndex is a multi-dimensional iterator, requiring more information be specified before the iterator can be used than conventional iterators. Whereas the std::vector::iterator from the STL only needs to be passed a pointer to establish the iterator, the multi-dimensional image iterator needs a pointer, the size of the buffer, the size of the region, the start index of the buffer, and the start index of the region. To gain access to this information, ImageConstIteratorWithIndex holds a reference to the image over which it is traversing.

ImageConstIteratorWithIndex assumes a particular layout of the image data. In particular, the data is arranged in a 1D array as if it were [][][][slice][row][col] with Index[0] = col, Index[1] = row, Index[2] = slice, etc.

MORE INFORMATION
For a complete description of the ITK Image Iterators and their API, please see the Iterators chapter in the ITK Software Guide. The ITK Software Guide is available in print and as a free .pdf download from http://www.itk.org.
See also:
ImageConstIterator
ConditionalConstIterator
ConstNeighborhoodIterator
ConstShapedNeighborhoodIterator
ConstSliceIterator
CorrespondenceDataStructureIterator
FloodFilledFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalIterator
FloodFilledSpatialFunctionConditionalConstIterator
FloodFilledSpatialFunctionConditionalIterator
ImageConstIterator
ImageConstIteratorWithIndex
ImageIterator
ImageIteratorWithIndex
ImageLinearConstIteratorWithIndex
ImageLinearIteratorWithIndex
ImageRandomConstIteratorWithIndex
ImageRandomIteratorWithIndex
ImageRegionConstIterator
ImageRegionConstIteratorWithIndex
ImageRegionExclusionConstIteratorWithIndex
ImageRegionExclusionIteratorWithIndex
ImageRegionIterator
ImageRegionIteratorWithIndex
ImageRegionReverseConstIterator
ImageRegionReverseIterator
ImageReverseConstIterator
ImageReverseIterator
ImageSliceConstIteratorWithIndex
ImageSliceIteratorWithIndex
NeighborhoodIterator
PathConstIterator
PathIterator
ShapedNeighborhoodIterator
SliceIterator

Definition at line 91 of file itkImageConstIteratorWithIndex.h.


Member Typedef Documentation

template<typename TImage>
typedef TImage::AccessorFunctorType itk::ImageConstIteratorWithIndex< TImage >::AccessorFunctorType

Definition at line 132 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
typedef TImage::AccessorType itk::ImageConstIteratorWithIndex< TImage >::AccessorType
template<typename TImage>
typedef TImage itk::ImageConstIteratorWithIndex< TImage >::ImageType
template<typename TImage>
typedef TImage::IndexType itk::ImageConstIteratorWithIndex< TImage >::IndexType
template<typename TImage>
typedef IndexType::IndexValueType itk::ImageConstIteratorWithIndex< TImage >::IndexValueType
template<typename TImage>
typedef TImage::InternalPixelType itk::ImageConstIteratorWithIndex< TImage >::InternalPixelType
template<typename TImage>
typedef TImage::OffsetType itk::ImageConstIteratorWithIndex< TImage >::OffsetType
template<typename TImage>
typedef OffsetType::OffsetValueType itk::ImageConstIteratorWithIndex< TImage >::OffsetValueType
template<typename TImage>
typedef TImage::PixelContainer itk::ImageConstIteratorWithIndex< TImage >::PixelContainer
template<typename TImage>
typedef TImage::PixelType itk::ImageConstIteratorWithIndex< TImage >::PixelType
template<typename TImage>
typedef TImage::RegionType itk::ImageConstIteratorWithIndex< TImage >::RegionType
template<typename TImage>
typedef ImageConstIteratorWithIndex itk::ImageConstIteratorWithIndex< TImage >::Self
template<typename TImage>
typedef TImage::SizeType itk::ImageConstIteratorWithIndex< TImage >::SizeType
template<typename TImage>
typedef SizeType::SizeValueType itk::ImageConstIteratorWithIndex< TImage >::SizeValueType

Constructor & Destructor Documentation

template<typename TImage>
itk::ImageConstIteratorWithIndex< TImage >::ImageConstIteratorWithIndex (  ) 

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

template<typename TImage>
itk::ImageConstIteratorWithIndex< TImage >::ImageConstIteratorWithIndex ( const Self it  ) 

Copy Constructor. The copy constructor is provided to make sure the handle to the image is properly reference counted.

template<typename TImage>
itk::ImageConstIteratorWithIndex< TImage >::ImageConstIteratorWithIndex ( const TImage *  ptr,
const RegionType region 
)

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


Member Function Documentation

template<typename TImage>
Self itk::ImageConstIteratorWithIndex< TImage >::Begin ( void   )  const

Move an iterator to the beginning of the region.

Deprecated:
Use GoToBegin() instead
template<typename TImage>
Self itk::ImageConstIteratorWithIndex< TImage >::End ( void   )  const

Move an iterator to the End of the region.

Deprecated:
Use GoToReverseBegin() instead
template<typename TImage>
PixelType itk::ImageConstIteratorWithIndex< TImage >::Get ( void   )  const [inline]

Get the pixel value

Definition at line 237 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
static unsigned int itk::ImageConstIteratorWithIndex< TImage >::GetImageDimension (  )  [inline, static]

Get the dimension (size) of the index.

Definition at line 156 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
const IndexType& itk::ImageConstIteratorWithIndex< TImage >::GetIndex ( void   )  const [inline]
template<typename TImage>
const RegionType& itk::ImageConstIteratorWithIndex< TImage >::GetRegion (  )  const [inline]

Get the region that this iterator walks. ImageIterators know the beginning and the end of the region of the image to iterate over.

Definition at line 224 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
void itk::ImageConstIteratorWithIndex< TImage >::GoToBegin ( void   ) 
template<typename TImage>
void itk::ImageConstIteratorWithIndex< TImage >::GoToReverseBegin ( void   ) 

Move an iterator to the End of the region.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::IsAtEnd ( void   )  const [inline]
template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::IsAtReverseEnd ( void   )  const [inline]

Is the iterator at the beginning of the region?

Definition at line 261 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::operator!= ( const Self it  )  const [inline]

Comparison operator. Two iterators are the same if they "point to" the same memory location

Definition at line 162 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::operator< ( const Self it  )  const [inline]

Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.

Definition at line 190 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::operator<= ( const Self it  )  const [inline]

Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.

Definition at line 180 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
Self& itk::ImageConstIteratorWithIndex< TImage >::operator= ( const Self it  ) 

operator= is provided to make sure the handle to the image is properly reference counted.

Reimplemented in itk::ReflectiveImageRegionConstIterator< TImage >.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::operator== ( const Self it  )  const [inline]

Comparison operator. Two iterators are the same if they "point to" the same memory location

Definition at line 171 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::operator> ( const Self it  )  const [inline]

Comparison operator. An iterator is "greater than" another if it "points to" a higher location.

Definition at line 210 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::operator>= ( const Self it  )  const [inline]

Comparison operator. An iterator is "greater than" another if it "points to" a higher location.

Definition at line 200 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::Remaining (  )  [inline]

Are there data remainning in the region ?

Definition at line 273 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
void itk::ImageConstIteratorWithIndex< TImage >::SetIndex ( const IndexType ind  )  [inline]

Set the index. No bounds checking is performed.

See also:
GetIndex

Definition at line 229 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
const PixelType& itk::ImageConstIteratorWithIndex< TImage >::Value ( void   )  const [inline]

Return a const reference to the pixel This method will provide the fastest access to pixel data, but it will NOT support ImageAdaptors.

Definition at line 243 of file itkImageConstIteratorWithIndex.h.


Member Data Documentation

template<typename TImage>
const unsigned int itk::ImageConstIteratorWithIndex< TImage >::ImageDimension = TImage::ImageDimension [static]

Dimension of the image the iterator walks. This constant is needed so functions that are templated over image iterator type (as opposed to being templated over pixel type and dimension) can have compile time access to the dimension of the image that the iterator walks.

Reimplemented in itk::ImageRandomNonRepeatingConstIteratorWithIndex< TImage >.

Definition at line 101 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
const InternalPixelType* itk::ImageConstIteratorWithIndex< TImage >::m_Begin [protected]

Definition at line 292 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
IndexType itk::ImageConstIteratorWithIndex< TImage >::m_BeginIndex [protected]

Definition at line 282 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
const InternalPixelType* itk::ImageConstIteratorWithIndex< TImage >::m_End [protected]

Definition at line 293 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
IndexType itk::ImageConstIteratorWithIndex< TImage >::m_EndIndex [protected]

Definition at line 283 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
TImage::ConstWeakPointer itk::ImageConstIteratorWithIndex< TImage >::m_Image [protected]

Definition at line 279 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
unsigned long itk::ImageConstIteratorWithIndex< TImage >::m_OffsetTable[ImageDimension+1] [protected]

Definition at line 289 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
AccessorType itk::ImageConstIteratorWithIndex< TImage >::m_PixelAccessor [protected]

Definition at line 297 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
AccessorFunctorType itk::ImageConstIteratorWithIndex< TImage >::m_PixelAccessorFunctor [protected]

Definition at line 298 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
const InternalPixelType* itk::ImageConstIteratorWithIndex< TImage >::m_Position [protected]
template<typename TImage>
IndexType itk::ImageConstIteratorWithIndex< TImage >::m_PositionIndex [protected]

Definition at line 281 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
RegionType itk::ImageConstIteratorWithIndex< TImage >::m_Region [protected]

Definition at line 287 of file itkImageConstIteratorWithIndex.h.

template<typename TImage>
bool itk::ImageConstIteratorWithIndex< TImage >::m_Remaining [protected]

Definition at line 295 of file itkImageConstIteratorWithIndex.h.


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

Generated at Fri Apr 16 22:24:32 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000