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

Common/itkImageSliceIteratorTest.cxx Class Reference
[Image Iterators]

#include <itkImageSliceConstIteratorWithIndex.h>


Detailed Description

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

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


The documentation for this class was generated from the following file:
Generated at Sun Jul 9 18:46:22 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000