Go to the documentation of this file.
31 #ifndef vtkImagePointIterator_h
32 #define vtkImagePointIterator_h
55 const int extent[6] =
nullptr,
64 const int extent[6] =
nullptr,
78 this->UpdatePosition();
90 if (++(this->Id) == this->SpanEnd)
97 this->Position[0] = this->Origin[0] + this->Index[0]*this->Spacing[0];
115 return this->Position;
124 x[0] = this->Position[0];
125 x[1] = this->Position[1];
126 x[2] = this->Position[2];
136 x[0] = this->Position[0];
137 x[1] = this->Position[1];
138 x[2] = this->Position[2];
150 this->Position[0] = this->Origin[0] + this->Index[0]*this->Spacing[0];
151 this->Position[1] = this->Origin[1] + this->Index[1]*this->Spacing[1];
152 this->Position[2] = this->Origin[2] + this->Index[2]*this->Spacing[2];
void UpdatePosition()
Helper method to update the position coordinate from the index.
iterate over point data in an image.
Superclass for all sources, filters, and sinks in VTK.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
void NextSpan()
Move the iterator to the beginning of the next span.
void NextSpan()
Move the iterator to the beginning of the next span.
void GetPosition(double x[3])
Get the current position and place it in the provided array.
#define VTK_SIZEHINT(...)
void Next()
Move to the next position (rather than directly to the next span).
double * GetPosition()
Get the current position.
void GetPosition(float x[3])
Get the current position and place it in the provided array.
topologically and geometrically regular array of data
void Initialize(vtkImageData *image, const int extent[6]=nullptr, vtkImageStencilData *stencil=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
Initialize an iterator.
iterate over all data points in an image.
efficient description of an image stencil
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.