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. A multi-dimensional image iterator that extends the ImageLinearConstIteratorWithIndex from iteration along lines in an image to iteration along both lines and planes (slices) within an image. A slice is defined as a 2D plane spanned by two vectors pointing along orthogonal coordinate axes. The slice orientation of the iterator is defined by specifying its two spanning axes using the methods:
 SetFirstDirection(n)
 SetSecondDirection(n)
where n is the number of the axis. More...

#include <itkImageSliceConstIteratorWithIndex.h>

Inheritance diagram for itk::ImageSliceConstIteratorWithIndex< TImage >:

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 Member Functions

 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 IsAtReverseEndOfLine (void)
bool IsAtReverseEndOfSlice (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. A multi-dimensional image iterator that extends the ImageLinearConstIteratorWithIndex from iteration along lines in an image to iteration along both lines and planes (slices) within an image. A slice is defined as a 2D plane spanned by two vectors pointing along orthogonal coordinate axes. The slice orientation of the iterator is defined by specifying its two spanning axes using the methods:
 SetFirstDirection(n)
 SetSecondDirection(n)
where n is the number of the axis.

Use the following methods to move the iterator between slices:

 NextSlice()
 PreviousSlice()

To test the position of the iterator with respect to the end or beginning of the slice use the following methods:

 IsAtReverseEndOfSlice()
 IsAtEndOfSlice()

The following code, for example, illustrates the typical use of this iterator. For more information please see the Software Guide.

 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();
  } 

Common/itkImageSliceIteratorTest.cxx

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

ImageConstIteratorWithIndex

Definition at line 112 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 129 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 123 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 137 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 138 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 132 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 116 of file itkImageSliceConstIteratorWithIndex.h.

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

Reimplemented in itk::ImageSliceIteratorWithIndex< TImage >.

Definition at line 117 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 141 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 145 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 160 of file itkImageSliceConstIteratorWithIndex.h.


Member Function Documentation

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>
bool itk::ImageSliceConstIteratorWithIndex< TImage >::IsAtReverseEndOfLine void   ) 
 

Test if the index is at the begin of line

template<typename TImage>
bool itk::ImageSliceConstIteratorWithIndex< TImage >::IsAtReverseEndOfSlice void   ) 
 

Test if the index is at the begin 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++  )  [inline]
 

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

See also:
operator--

GetIndex

template<typename TImage>
Self& itk::ImageSliceConstIteratorWithIndex< TImage >::operator--  )  [inline]
 

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 Thu May 25 01:23:39 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000