Go to the documentation of this file.
26 #ifndef vtkImageStencilIterator_h
27 #define vtkImageStencilIterator_h
43 this->BasePointer =
nullptr;
44 this->Pointer =
nullptr;
45 this->SpanEndPointer =
nullptr;
61 const int extent[6] =
nullptr,
66 this->BasePointer = static_cast<DType *>(
68 this->UpdatePointer();
78 const int extent[6] =
nullptr,
83 image,
extent, stencil, algorithm, threadId);
84 this->BasePointer = static_cast<DType *>(
86 this->UpdatePointer();
99 this->UpdatePointer();
116 return this->Pointer;
124 return this->SpanEndPointer;
135 this->Pointer = this->BasePointer + this->Id*this->Increment;
136 this->SpanEndPointer = this->BasePointer + this->SpanEnd*this->Increment;
149 #ifndef vtkImageStencilIterator_cxx
151 #pragma warning (push)
154 #pragma warning (disable: 4910) // extern and dllexport incompatible
160 #pragma warning (pop)
iterate over point data in an image.
bool IsAtEnd()
Test if the iterator has completed iterating over the entire extent.
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.
DType * BeginSpan()
Return a pointer to the beginning of the current span.
void NextSpan()
Move the iterator to the beginning of the next span.
#define vtkExternTemplateMacro(decl)
A macro to declare extern templates for all numerical types.
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.
vtkImageStencilIterator()
Default constructor, its use must be followed by Initialize().
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.
efficient description of an image stencil
static void * GetVoidPointer(vtkImageData *image, vtkIdType i=0, int *pixelIncrement=nullptr)
Get a void pointer and pixel increment for the given point Id.
DType * EndSpan()
Return a pointer to the end of the current span.
void Initialize(vtkImageData *image, vtkImageStencilData *stencil=nullptr, const int extent[6]=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
Initialize an iterator.
void UpdatePointer()
Update the pointer (called automatically when a new span begins).