17 #ifndef vtkImageStencilIterator_h
18 #define vtkImageStencilIterator_h
22 VTK_ABI_NAMESPACE_BEGIN
23 template <
class DType>
34 this->BasePointer =
nullptr;
35 this->Pointer =
nullptr;
36 this->SpanEndPointer =
nullptr;
56 this->UpdatePointer();
70 this->UpdatePointer();
83 this->UpdatePointer();
100 DType*
EndSpan() {
return this->SpanEndPointer; }
109 this->Pointer = this->BasePointer + this->Id * this->Increment;
110 this->SpanEndPointer = this->BasePointer + this->SpanEnd * this->Increment;
123 #ifndef vtkImageStencilIterator_cxx
125 #pragma warning(push)
128 #pragma warning(disable : 4910)
136 VTK_ABI_NAMESPACE_END
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.
static void * GetVoidPointer(vtkImageData *image, vtkIdType i=0, int *pixelIncrement=nullptr)
Get a void pointer and pixel increment for the given point Id.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
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
vtkImageStencilIterator(vtkImageData *image, vtkImageStencilData *stencil=nullptr, const int extent[6]=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
Create an iterator for the given image, with several options.
void NextSpan()
Move the iterator to the beginning of the next span.
void UpdatePointer()
Update the pointer (called automatically when a new span begins).
DType * EndSpan()
Return a pointer to the end of the current span.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
void Initialize(vtkImageData *image, vtkImageStencilData *stencil=nullptr, const int extent[6]=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
Initialize an iterator.
vtkImageStencilIterator()
Default constructor, its use must be followed by Initialize().
DType * BeginSpan()
Return a pointer to the beginning of the current span.
vtkExternTemplateMacro(extern template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator)