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

/home/glehmann/rpm/BUILD/InsightToolkit-2.8.1/Code/Common/itkImageRegionExclusionConstIteratorWithIndex.h Class Reference

#include <itkImageRegionExclusionConstIteratorWithIndex.h>


Detailed Description

Multi-dimensional image iterator that walks an image region, excluding a second region contained within the first.

ImageRegionExclusionConstIteratorWithIndex is a templated class to represent a multi-dimensional iterator. ImageRegionExclusionConstIteratorWithIndex is templated over the image type. ImageRegionExclusionConstIteratorWithIndex is constrained to walk only within the specified region. The exclusion region is set after construction. By default the exclusion region is empty and the iterator will behave as the itk::ImageRegionIteratorWithIndex with a penalty in performance due to internal bounds checking.

As with other ITK image iterators, ImageRegionExclusionConstIteratorWithIndex requires 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, ImageRegionExclusionConstIteratorWithIndex holds a reference to the image over which it is traversing.

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

The operator++ method provides a simple syntax for walking around a region of a multidimensional image. operator++ iterates across a row, constraining the movement to within a region of image. When the iterator reaches the boundary of the region along a row, the iterator automatically wraps to the next row, starting at the first pixel in the row that is part of the region. This allows for simple processing loops of the form:


The documentation for this class was generated from the following file:
Generated at Fri Sep 8 04:26:58 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000