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

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

Multi-dimensional image iterator which only walks a region. More...

#include <itkImageSliceConstIteratorWithIndex.h>

Inheritance diagram for itk::ImageSliceConstIteratorWithIndex:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef ImageSliceConstIteratorWithIndex Self
typedef ImageConstIteratorWithIndex<
TImage > 
Superclass
typedef TImage::IndexType IndexType
typedef TImage ImageType
typedef TImage::RegionType RegionType
typedef TImage::PixelContainer PixelContainer
typedef PixelContainer::Pointer PixelContainerPointer

Public Methods

 ImageSliceConstIteratorWithIndex ()
 ImageSliceConstIteratorWithIndex (const ImageConstIteratorWithIndex< TImage > &it)
void NextLine (void)
void NextSlice (void)
void PreviousLine (void)
void PreviousSlice (void)
bool IsAtEndOfLine (void)
bool IsAtEndOfSlice (void)
bool IsAtBeginOfLine (void)
bool IsAtBeginOfSlice (void)
void SetFirstDirection (unsigned int direction)
void SetSecondDirection (unsigned int direction)
Selfoperator++ ()
Selfoperator-- ()
 ImageSliceConstIteratorWithIndex (const ImageType *ptr, const RegionType &region)

Detailed Description

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

Multi-dimensional image iterator which only walks a region.

This is the typical use of this iterator in a loop:

 ImageSliceConstIteratorWithIndex<ImageType> it( image, image->GetRequestedRegion() );
 
 it.SetFirstDirection(2);
 it.SetSecondDirection(0);

 it.GoToBegin();
 while( !it.IsAtEnd() )
 {
   while( !it.IsAtEndOfSlice() )
   {
     while( !it.IsAtEndOfLine() )
     {
        value = it.Get();  // it.Set() doesn't exist in the Const Iterator
        ++it;
     }
     it.NextLine();
   }
   it.NextSlice();
  } 

\example Common/itkImageSliceIterator.cxx

Definition at line 59 of file itkImageSliceConstIteratorWithIndex.h.


Member Typedef Documentation

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

Image typedef support. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc. Note that we have to rescope Index back to itk::Index to that is it not confused with ImageIterator::Index.

Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 76 of file itkImageSliceConstIteratorWithIndex.h.

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

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

Index typedef support. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc. Note that we have to rescope Index back to itk::Index to that is it not confused with ImageIterator::Index.

Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 70 of file itkImageSliceConstIteratorWithIndex.h.

template<typename TImage>
typedef TImage::PixelContainer itk::ImageSliceConstIteratorWithIndex< 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 from itk::ImageConstIteratorWithIndex< TImage >.

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 84 of file itkImageSliceConstIteratorWithIndex.h.

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

Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 85 of file itkImageSliceConstIteratorWithIndex.h.

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

Region typedef support.

Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 79 of file itkImageSliceConstIteratorWithIndex.h.

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

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

Standard class typedefs.

Reimplemented from itk::ImageConstIteratorWithIndex< TImage >.

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 63 of file itkImageSliceConstIteratorWithIndex.h.

template<typename TImage>
typedef ImageConstIteratorWithIndex<TImage> itk::ImageSliceConstIteratorWithIndex< TImage >::Superclass
 

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 64 of file itkImageSliceConstIteratorWithIndex.h.


Constructor & Destructor Documentation

template<typename TImage>
itk::ImageSliceConstIteratorWithIndex< TImage >::ImageSliceConstIteratorWithIndex   [inline]
 

Default constructor. Needed since we provide a cast constructor.

Definition at line 88 of file itkImageSliceConstIteratorWithIndex.h.

template<typename TImage>
itk::ImageSliceConstIteratorWithIndex< TImage >::ImageSliceConstIteratorWithIndex const 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 92 of file itkImageSliceConstIteratorWithIndex.h.

References itk::ImageSliceConstIteratorWithIndex< TImage >::ImageType, and itk::ImageSliceConstIteratorWithIndex< TImage >::RegionType.

template<typename TImage>
itk::ImageSliceConstIteratorWithIndex< TImage >::ImageSliceConstIteratorWithIndex const ImageConstIteratorWithIndex< TImage > &    it [inline]
 

Constructor that can be used to cast from an ImageIterator to an ImageSliceConstIteratorWithIndex. Many routines return an ImageIterator but for a particular task, you may want an ImageSliceConstIteratorWithIndex. Rather than provide overloaded APIs that return different types of Iterators, itk returns ImageIterators and uses constructors to cast from an ImageIterator to a ImageSliceConstIteratorWithIndex.

Definition at line 107 of file itkImageSliceConstIteratorWithIndex.h.


Member Function Documentation

template<typename TImage>
bool itk::ImageSliceConstIteratorWithIndex< TImage >::IsAtBeginOfLine void   
 

Test if the index is at the begin of line

template<typename TImage>
bool itk::ImageSliceConstIteratorWithIndex< TImage >::IsAtBeginOfSlice void   
 

Test if the index is at the begin of the slice

template<typename TImage>
bool itk::ImageSliceConstIteratorWithIndex< TImage >::IsAtEndOfLine void   
 

Test if the index is at the end of line

template<typename TImage>
bool itk::ImageSliceConstIteratorWithIndex< TImage >::IsAtEndOfSlice void   
 

Test if the index is at the end of the slice

template<typename TImage>
void itk::ImageSliceConstIteratorWithIndex< TImage >::NextLine void   
 

Go to the next line

See also:
operator++ , EndOfLine , End , NextSlice

template<typename TImage>
void itk::ImageSliceConstIteratorWithIndex< TImage >::NextSlice void   
 

Go to the next slice

See also:
operator++ , EndOfLine , End

template<typename TImage>
Self& itk::ImageSliceConstIteratorWithIndex< TImage >::operator++  
 

Increment (prefix) the selected dimension. No bounds checking is performed.

See also:
operator-- , GetIndex

template<typename TImage>
Self& itk::ImageSliceConstIteratorWithIndex< TImage >::operator--  
 

Decrement (prefix) the selected dimension. No bounds checking is performed.

See also:
operator++ , GetIndex

template<typename TImage>
void itk::ImageSliceConstIteratorWithIndex< TImage >::PreviousLine void   
 

Go to the next line

See also:
operator-- , BeginOfLine , BeginOfSlice , Begin

template<typename TImage>
void itk::ImageSliceConstIteratorWithIndex< TImage >::PreviousSlice void   
 

Go to the next slice

See also:
operator-- , BeginOfLine , BeginOfSlice , Begin

template<typename TImage>
void itk::ImageSliceConstIteratorWithIndex< TImage >::SetFirstDirection unsigned int    direction
 

Set the fastest direction of movement

template<typename TImage>
void itk::ImageSliceConstIteratorWithIndex< TImage >::SetSecondDirection unsigned int    direction
 

Set the second fastest direction of movement


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:28:42 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000