#include <itkImageSliceConstIteratorWithIndex.h>
SetFirstDirection(n) SetSecondDirection(n)
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(); }
1.4.7 written by Dimitri van Heesch,
© 1997-2000