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

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

Multi-dimensional image iterator. More...

#include <itkImageReverseConstIterator.h>

Inheritance diagram for itk::ImageReverseConstIterator< TImage >:

Inheritance graph
[legend]
List of all members.

[NOHEADER]

Selfoperator= (const ImageConstIterator< TImage > &it)
unsigned int GetImageIteratorDimension ()

Public Types

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

Public Member Functions

 itkStaticConstMacro (ImageIteratorDimension, unsigned int, TImage::ImageDimension)
virtual ~ImageReverseConstIterator ()
 ImageReverseConstIterator (const Self &it)
const IndexType GetIndex ()
virtual void SetIndex (const IndexType &ind)
const RegionTypeGetRegion () const
const PixelTypeGet (void) const
void Set (const PixelType &value) const
const PixelTypeValue (void) const
PixelTypeValue (void)
Self Begin () const
void GoToBegin ()
Self End () const
void GoToEnd ()
bool IsAtBegin ()
bool IsAtEnd ()
 ImageReverseConstIterator ()
 ImageReverseConstIterator (ImageType *ptr, const RegionType &region)
 ImageReverseConstIterator (const ImageConstIterator< TImage > &it)
Selfoperator= (const Self &it)
bool operator!= (const Self &it) const
bool operator== (const Self &it) const

Protected Attributes

ImageType::ConstPointer m_Image
RegionType m_Region
unsigned long m_Offset
unsigned long m_BeginOffset
unsigned long m_EndOffset
const InternalPixelTypem_Buffer
AccessorType m_PixelAccessor

Detailed Description

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

Multi-dimensional image iterator.

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

ImageReverseConstIterator is a base class for all the reverse image iterators. It provides the basic construction and comparison operations. However, it does not provide mechanisms for moving the iterator. A subclass of ImageReverseConstIterator must be used to move the iterator.

ImageReverseConstIterator 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, ImageReverseConstIterator holds a reference to the image over which it is traversing.

ImageReverseConstIterator 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.

Definition at line 60 of file itkImageReverseConstIterator.h.


Member Typedef Documentation

template<typename TImage>
typedef TImage::AccessorType itk::ImageReverseConstIterator< TImage >::AccessorType
 

Accessor type that convert data between internal and external representations.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 105 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::IsAtEnd().

template<typename TImage>
typedef TImage itk::ImageReverseConstIterator< TImage >::ImageType
 

Image typedef support.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 89 of file itkImageReverseConstIterator.h.

template<typename TImage>
typedef TImage::IndexType itk::ImageReverseConstIterator< TImage >::IndexType
 

Index typedef support.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 74 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().

template<typename TImage>
typedef TImage::IndexValueType itk::ImageReverseConstIterator< TImage >::IndexValueType
 

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 75 of file itkImageReverseConstIterator.h.

template<typename TImage>
typedef TImage::InternalPixelType itk::ImageReverseConstIterator< TImage >::InternalPixelType
 

Internal Pixel Type

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 98 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::IsAtEnd().

template<typename TImage>
typedef TImage::OffsetType itk::ImageReverseConstIterator< TImage >::OffsetType
 

Offset typedef support.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 82 of file itkImageReverseConstIterator.h.

template<typename TImage>
typedef TImage::OffsetValueType itk::ImageReverseConstIterator< TImage >::OffsetValueType
 

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 83 of file itkImageReverseConstIterator.h.

template<typename TImage>
typedef TImage::PixelContainer itk::ImageReverseConstIterator< TImage >::PixelContainer
 

PixelContainer typedef support. Used to refer to the container for the pixel data. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 94 of file itkImageReverseConstIterator.h.

template<typename TImage>
typedef PixelContainer::Pointer itk::ImageReverseConstIterator< TImage >::PixelContainerPointer
 

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 95 of file itkImageReverseConstIterator.h.

template<typename TImage>
typedef TImage::PixelType itk::ImageReverseConstIterator< TImage >::PixelType
 

External Pixel Type

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 101 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::Get(), and itk::ImageReverseConstIterator< TImage >::SetIndex().

template<typename TImage>
typedef TImage::RegionType itk::ImageReverseConstIterator< TImage >::RegionType
 

Region typedef support.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 86 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().

template<typename TImage>
typedef ImageReverseConstIterator itk::ImageReverseConstIterator< TImage >::Self
 

Standard class typedefs.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 64 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::operator==(), and itk::ImageReverseConstIterator< TImage >::~ImageReverseConstIterator().

template<typename TImage>
typedef TImage::SizeType itk::ImageReverseConstIterator< TImage >::SizeType
 

Size typedef support.

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 78 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().

template<typename TImage>
typedef TImage::SizeValueType itk::ImageReverseConstIterator< TImage >::SizeValueType
 

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 79 of file itkImageReverseConstIterator.h.


Constructor & Destructor Documentation

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator  )  [inline]
 

Default Constructor. Need to provide a default constructor since we provide a copy constructor. Definition at line 109 of file itkImageReverseConstIterator.h.

template<typename TImage>
virtual itk::ImageReverseConstIterator< TImage >::~ImageReverseConstIterator  )  [inline, virtual]
 

Default Destructor. Definition at line 120 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::Self.

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator const Self it  )  [inline]
 

Copy Constructor. The copy constructor is provided to make sure the handle to the image is properly reference counted. Definition at line 124 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::m_BeginOffset, itk::ImageReverseConstIterator< TImage >::m_Buffer, itk::ImageReverseConstIterator< TImage >::m_EndOffset, itk::ImageReverseConstIterator< TImage >::m_Image, itk::ImageReverseConstIterator< TImage >::m_Offset, itk::ImageReverseConstIterator< TImage >::m_PixelAccessor, and itk::ImageReverseConstIterator< TImage >::m_Region.

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator ImageType ptr,
const RegionType region
[inline]
 

Constructor establishes an iterator to walk a particular image and a particular region of that image. Definition at line 139 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::IndexType, itk::ImageReverseConstIterator< TImage >::RegionType, and itk::ImageReverseConstIterator< TImage >::SizeType.

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator const ImageConstIterator< TImage > &  it  )  [inline]
 

Constructor that can be used to cast from an ImageConstIterator to an ImageRegionReverseIterator. Many routines return an ImageConstIterator but for a particular task, you may want an ImageRegionReverseIterator. Rather than provide overloaded APIs that return different types of Iterators, itk returns ImageConstIterators and uses constructors to cast from an ImageConstIterator to a ImageRegionReverseIterator. Definition at line 172 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::IndexType, and itk::ImageReverseConstIterator< TImage >::SizeType.


Member Function Documentation

template<typename TImage>
Self itk::ImageReverseConstIterator< TImage >::Begin  )  const
 

Return an iterator for the beginning of the region. "Begin" for a reverse iterator is the last pixel in the region.

Deprecated:
Use GoToBegin() instead

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, and itk::ImageRegionReverseIterator< TImage >.

template<typename TImage>
Self itk::ImageReverseConstIterator< TImage >::End  )  const
 

Return an iterator for the end of the region. "End" for a reverse iterator is one pixel before the first pixel in the region.

Deprecated:
Use GoToEnd() instead

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >, and itk::ImageRegionReverseIterator< TImage >.

template<typename TImage>
const PixelType& itk::ImageReverseConstIterator< TImage >::Get void   )  const [inline]
 

Get the pixel value Definition at line 337 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::PixelType.

template<typename TImage>
unsigned int itk::ImageReverseConstIterator< TImage >::GetImageIteratorDimension  )  [inline, static]
 

Get the dimension (size) of the index. Definition at line 244 of file itkImageReverseConstIterator.h.

template<typename TImage>
const IndexType itk::ImageReverseConstIterator< TImage >::GetIndex void   )  [inline]
 

Get the index. This provides a read only reference to the index. This causes the index to be calculated from pointer arithmetic and is therefore an expensive operation.

See also:
SetIndex
Definition at line 322 of file itkImageReverseConstIterator.h.

template<typename TImage>
const RegionType& itk::ImageReverseConstIterator< TImage >::GetRegion  )  const [inline]
 

Get the region that this iterator walks. ImageReverseConstIterators know the beginning and the end of the region of the image to iterate over. Definition at line 333 of file itkImageReverseConstIterator.h.

template<typename TImage>
void itk::ImageReverseConstIterator< TImage >::GoToBegin void   )  [inline]
 

Move an iterator to the beginning of the region. "Begin" for a reverse iterator is the last pixel in the region. Definition at line 363 of file itkImageReverseConstIterator.h.

template<typename TImage>
void itk::ImageReverseConstIterator< TImage >::GoToEnd void   )  [inline]
 

Move an iterator to the end of the region. "End" for a reverse iterator is defined as one pixel before the first pixel in the region. Definition at line 375 of file itkImageReverseConstIterator.h.

template<typename TImage>
bool itk::ImageReverseConstIterator< TImage >::IsAtBegin  )  [inline]
 

Is the iterator at the beginning of the (reverse) region? "Begin" for a reverse iterator is the last pixel in the region. Definition at line 382 of file itkImageReverseConstIterator.h.

template<typename TImage>
bool itk::ImageReverseConstIterator< TImage >::IsAtEnd void   )  [inline]
 

Is the iterator at the end of the (reverse) region? "End" for a reverse iterator is one pixel before the first pixel in the region. Definition at line 389 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::AccessorType, and itk::ImageReverseConstIterator< TImage >::InternalPixelType.

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::itkStaticConstMacro ImageIteratorDimension  ,
unsigned  int,
TImage::ImageDimension 
 

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.

template<typename TImage>
bool itk::ImageReverseConstIterator< 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 250 of file itkImageReverseConstIterator.h.

template<typename TImage>
Self& itk::ImageReverseConstIterator< TImage >::operator= const ImageConstIterator< TImage > &  it  )  [inline]
 

operator= is provided to make sure the handle to the image is properly reference counted. Definition at line 215 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::IndexType, and itk::ImageReverseConstIterator< TImage >::SizeType.

template<typename TImage>
Self& itk::ImageReverseConstIterator< TImage >::operator= const Self it  )  [inline]
 

operator= is provided to make sure the handle to the image is properly reference counted. Definition at line 200 of file itkImageReverseConstIterator.h.

template<typename TImage>
bool itk::ImageReverseConstIterator< 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 260 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::m_Buffer, itk::ImageReverseConstIterator< TImage >::m_Offset, and itk::ImageReverseConstIterator< TImage >::Self.

template<typename TImage>
void itk::ImageReverseConstIterator< TImage >::Set const PixelType value  )  const [inline]
 

Set the pixel value

Reimplemented in itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 341 of file itkImageReverseConstIterator.h.

template<typename TImage>
virtual void itk::ImageReverseConstIterator< TImage >::SetIndex const IndexType ind  )  [inline, virtual]
 

Set the index. No bounds checking is performed.

See also:
GetIndex

Reimplemented in itk::ImageRegionReverseConstIterator< TImage >.

Definition at line 327 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::PixelType.

template<typename TImage>
PixelType& itk::ImageReverseConstIterator< TImage >::Value void   )  [inline]
 

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

Reimplemented in itk::ImageRegionReverseIterator< TImage >, and itk::ImageReverseIterator< TImage >.

Definition at line 353 of file itkImageReverseConstIterator.h.

template<typename TImage>
const PixelType& itk::ImageReverseConstIterator< 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 347 of file itkImageReverseConstIterator.h.


Member Data Documentation

template<typename TImage>
unsigned long itk::ImageReverseConstIterator< TImage >::m_BeginOffset [protected]
 

Definition at line 399 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().

template<typename TImage>
const InternalPixelType* itk::ImageReverseConstIterator< TImage >::m_Buffer [protected]
 

Definition at line 402 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator==().

template<typename TImage>
unsigned long itk::ImageReverseConstIterator< TImage >::m_EndOffset [protected]
 

Definition at line 400 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().

template<typename TImage>
ImageType::ConstPointer itk::ImageReverseConstIterator< TImage >::m_Image [protected]
 

Definition at line 395 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().

template<typename TImage>
unsigned long itk::ImageReverseConstIterator< TImage >::m_Offset [protected]
 

Definition at line 398 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator==().

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

Definition at line 404 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().

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

Definition at line 396 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:07:50 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000