IteratorType it( image, image->GetRequestedRegion() );
it.SetExclusionRegion( exclusionRegion );
it.GoToBegin();
while( ! it.IsAtEnd() )
{
it.Set( 100.0 + it.Get() );
++it;
}
It also can be used for walking in the reverse direction like
IteratorType it( image, image->GetRequestedRegion() );
it.SetExclusionRegion( exclusionRegion );
it.GoToEnd();
while( !it.IsAtBegin() )
{
it.Set( 100.0 );
--it;
}
- 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