29 #ifndef vtkImageStencilIterator_h
30 #define vtkImageStencilIterator_h
34 template <
class DType>
45 this->BasePointer =
nullptr;
46 this->Pointer =
nullptr;
47 this->SpanEndPointer =
nullptr;
67 this->UpdatePointer();
81 this->UpdatePointer();
94 this->UpdatePointer();
111 DType*
EndSpan() {
return this->SpanEndPointer; }
120 this->Pointer = this->BasePointer + this->Id * this->Increment;
121 this->SpanEndPointer = this->BasePointer + this->SpanEnd * this->Increment;
134 #ifndef vtkImageStencilIterator_cxx
136 #pragma warning(push)
139 #pragma warning(disable : 4910) // extern and dllexport incompatible
DType * EndSpan()
Return a pointer to the end of the current span.
iterate over point data in an image.
vtkExternTemplateMacro(extern template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator)
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.
DType * BeginSpan()
Return a pointer to the beginning of the current 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
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
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.
vtkImageStencilIterator()
Default constructor, its use must be followed by Initialize().
void UpdatePointer()
Update the pointer (called automatically when a new span begins).
void Initialize(vtkImageData *image, vtkImageStencilData *stencil=nullptr, const int extent[6]=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
Initialize an iterator.
static void * GetVoidPointer(vtkImageData *image, vtkIdType i=0, int *pixelIncrement=nullptr)
Get a void pointer and pixel increment for the given point Id.
void NextSpan()
Move the iterator to the beginning of the next span.