22 #ifndef vtkImagePointIterator_h
23 #define vtkImagePointIterator_h
27 VTK_ABI_NAMESPACE_BEGIN
63 this->UpdatePosition();
75 if (++(this->Id) == this->SpanEnd)
82 this->
Position[0] = this->Origin[0] + this->Index[0] * this->Spacing[0];
128 this->
Position[0] = this->Origin[0] + this->Index[0] * this->Spacing[0];
129 this->
Position[1] = this->Origin[1] + this->Index[1] * this->Spacing[1];
130 this->
Position[2] = this->Origin[2] + this->Index[2] * this->Spacing[2];
139 VTK_ABI_NAMESPACE_END
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
void UpdatePosition()
Helper method to update the position coordinate from the index.
iterate over point data in an image.
void Next()
Move to the next position (rather than directly to the next span).
struct Position_t Position
double * GetPosition()
Get the current position.
void NextSpan()
Move the iterator to the beginning of the next span.
Superclass for all sources, filters, and sinks in VTK.
void Initialize(vtkImageData *image, const int extent[6]=nullptr, vtkImageStencilData *stencil=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
Initialize an iterator.
efficient description of an image stencil
topologically and geometrically regular array of data
#define VTK_SIZEHINT(...)
iterate over all data points in an image.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
void GetPosition(float x[3])
Get the current position and place it in the provided array.
void GetPosition(double 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.