34 #ifndef vtkImagePointIterator_h
35 #define vtkImagePointIterator_h
81 this->UpdatePosition();
93 if (++(this->Id) == this->SpanEnd)
100 this->Position[0] = this->Origin[0] + this->Index[0]*this->Spacing[0];
118 return this->Position;
127 x[0] = this->Position[0];
128 x[1] = this->Position[1];
129 x[2] = this->Position[2];
139 x[0] = this->Position[0];
140 x[1] = this->Position[1];
141 x[2] = this->Position[2];
153 this->Position[0] = this->Origin[0] + this->Index[0]*this->Spacing[0];
154 this->Position[1] = this->Origin[1] + this->Index[1]*this->Spacing[1];
155 this->Position[2] = this->Origin[2] + this->Index[2]*this->Spacing[2];
Superclass for all sources, filters, and sinks in VTK.
topologically and geometrically regular array of data
iterate over point data in an image.
void NextSpan()
Move the iterator to the beginning of the next span.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
iterate over all data points in an image.
void Initialize(vtkImageData *image, const int extent[6]=0, vtkImageStencilData *stencil=0, vtkAlgorithm *algorithm=0, int threadId=0)
Initialize an iterator.
vtkImagePointIterator(vtkImageData *image, const int extent[6]=0, vtkImageStencilData *stencil=0, vtkAlgorithm *algorithm=0, int threadId=0)
Create an iterator for the given image, with several options.
double * GetPosition()
Get the current position.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
void GetPosition(double x[3])
Get the current position and place it in the provided array.
void Next()
Move to the next position (rather than directly to the next span).
void UpdatePosition()
Helper method to update the position coordinate from the index.
vtkImagePointIterator()
Default constructor, its use must be followed by Initialize().
void GetPosition(float x[3])
Get the current position and place it in the provided array.
void NextSpan()
Move the iterator to the beginning of the next span.
efficient description of an image stencil