VTK
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkImageStencilIterator< DType > Class Template Reference

an image region iterator More...

#include <vtkImageStencilIterator.h>

Inheritance diagram for vtkImageStencilIterator< DType >:
[legend]
Collaboration diagram for vtkImageStencilIterator< DType >:
[legend]

Public Member Functions

 vtkImageStencilIterator ()
 Default constructor, its use must be followed by Initialize(). More...
 
 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. More...
 
void Initialize (vtkImageData *image, vtkImageStencilData *stencil=nullptr, const int extent[6]=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
 Initialize an iterator. More...
 
void NextSpan ()
 Move the iterator to the beginning of the next span. More...
 
bool IsAtEnd ()
 Test if the iterator has completed iterating over the entire extent. More...
 
DType * BeginSpan ()
 Return a pointer to the beginning of the current span. More...
 
DType * EndSpan ()
 Return a pointer to the end of the current span. More...
 
- Public Member Functions inherited from vtkImagePointDataIterator
 vtkImagePointDataIterator ()
 Default constructor, its use must be followed by Initialize(). More...
 
 vtkImagePointDataIterator (vtkImageData *image, const int extent[6]=nullptr, vtkImageStencilData *stencil=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
 Create an iterator for the given image, with several options. More...
 
void Initialize (vtkImageData *image, const int extent[6]=nullptr, vtkImageStencilData *stencil=nullptr, vtkAlgorithm *algorithm=nullptr, int threadId=0)
 Initialize an iterator. More...
 
void NextSpan ()
 Move the iterator to the beginning of the next span. More...
 
bool IsAtEnd ()
 Test if the iterator has completed iterating over the entire extent. More...
 
bool IsInStencil ()
 Check if the iterator is within the region specified by the stencil. More...
 
void GetIndex (int result[3])
 Get the index at the beginning of the current span. More...
 
const int * GetIndex ()
 Get the index at the beginning of the current span. More...
 
vtkIdType GetId ()
 Get the point Id at the beginning of the current span. More...
 
vtkIdType SpanEndId ()
 Get the end of the span. More...
 

Protected Member Functions

void UpdatePointer ()
 Update the pointer (called automatically when a new span begins). More...
 
- Protected Member Functions inherited from vtkImagePointDataIterator
void SetSpanState (int idX)
 Set all the state variables for the stencil span that includes idX. More...
 
void ReportProgress ()
 Report the progress and do an abort check, for compatibility with existing image filters. More...
 

Protected Attributes

int Increment
 
DType * BasePointer
 
DType * Pointer
 
DType * SpanEndPointer
 
- Protected Attributes inherited from vtkImagePointDataIterator
vtkIdType Id
 
vtkIdType SpanEnd
 
vtkIdType RowEnd
 
vtkIdType SliceEnd
 
vtkIdType End
 
vtkIdType RowIncrement
 
vtkIdType SliceIncrement
 
vtkIdType RowEndIncrement
 
vtkIdType SliceEndIncrement
 
int Extent [6]
 
int Index [3]
 
int StartY
 
bool HasStencil
 
bool InStencil
 
int SpanSliceEndIncrement
 
int SpanSliceIncrement
 
int SpanIndex
 
int * SpanCountPointer
 
int ** SpanListPointer
 
vtkAlgorithmAlgorithm
 
vtkIdType Count
 
vtkIdType Target
 
int ThreadId
 

Additional Inherited Members

- Static Public Member Functions inherited from vtkImagePointDataIterator
static void * GetVoidPointer (vtkImageData *image, vtkIdType i=0, int *pixelIncrement=nullptr)
 Get a void pointer and pixel increment for the given point Id. More...
 
static void * GetVoidPointer (vtkDataArray *array, vtkIdType i=0, int *pixelIncrement=nullptr)
 Get a void pointer and pixel increment for the given point Id. More...
 

Detailed Description

template<class DType>
class vtkImageStencilIterator< DType >

an image region iterator

This is an image iterator that can be used to iterate over a region of an image.

See also
vtkImageData vtkImageStencilData vtkImageProgressIterator

Definition at line 32 of file vtkImageStencilIterator.h.

Constructor & Destructor Documentation

◆ vtkImageStencilIterator() [1/2]

template<class DType >
vtkImageStencilIterator< DType >::vtkImageStencilIterator ( )
inline

Default constructor, its use must be followed by Initialize().

Definition at line 39 of file vtkImageStencilIterator.h.

◆ vtkImageStencilIterator() [2/2]

template<class DType >
vtkImageStencilIterator< DType >::vtkImageStencilIterator ( vtkImageData image,
vtkImageStencilData stencil = nullptr,
const int  extent[6] = nullptr,
vtkAlgorithm algorithm = nullptr,
int  threadId = 0 
)
inline

Create an iterator for the given image, with several options.

If a stencil is provided, then the iterator's IsInStencil() method reports whether each span is inside the stencil. If an extent is provided, it iterates over the extent and ignores the rest of the image (the provided extent must be within the image extent). If a pointer to the algorithm is provided and threadId is set to zero, then progress events will provided for the algorithm.

Definition at line 58 of file vtkImageStencilIterator.h.

Member Function Documentation

◆ Initialize()

template<class DType >
void vtkImageStencilIterator< DType >::Initialize ( vtkImageData image,
vtkImageStencilData stencil = nullptr,
const int  extent[6] = nullptr,
vtkAlgorithm algorithm = nullptr,
int  threadId = 0 
)
inline

Initialize an iterator.

See constructor for more details.

Definition at line 72 of file vtkImageStencilIterator.h.

◆ NextSpan()

template<class DType >
void vtkImageStencilIterator< DType >::NextSpan ( )
inline

Move the iterator to the beginning of the next span.

A span is a contiguous region of the image over which nothing but the point Id and the X index changes.

Definition at line 88 of file vtkImageStencilIterator.h.

◆ IsAtEnd()

template<class DType >
bool vtkImageStencilIterator< DType >::IsAtEnd ( )
inline

Test if the iterator has completed iterating over the entire extent.

Definition at line 98 of file vtkImageStencilIterator.h.

◆ BeginSpan()

template<class DType >
DType* vtkImageStencilIterator< DType >::BeginSpan ( )
inline

Return a pointer to the beginning of the current span.

Definition at line 103 of file vtkImageStencilIterator.h.

◆ EndSpan()

template<class DType >
DType* vtkImageStencilIterator< DType >::EndSpan ( )
inline

Return a pointer to the end of the current span.

Definition at line 108 of file vtkImageStencilIterator.h.

◆ UpdatePointer()

template<class DType >
void vtkImageStencilIterator< DType >::UpdatePointer ( )
inlineprotected

Update the pointer (called automatically when a new span begins).

Definition at line 115 of file vtkImageStencilIterator.h.

Member Data Documentation

◆ Increment

template<class DType >
int vtkImageStencilIterator< DType >::Increment
protected

Definition at line 123 of file vtkImageStencilIterator.h.

◆ BasePointer

template<class DType >
DType* vtkImageStencilIterator< DType >::BasePointer
protected

Definition at line 126 of file vtkImageStencilIterator.h.

◆ Pointer

template<class DType >
DType* vtkImageStencilIterator< DType >::Pointer
protected

Definition at line 127 of file vtkImageStencilIterator.h.

◆ SpanEndPointer

template<class DType >
DType* vtkImageStencilIterator< DType >::SpanEndPointer
protected

Definition at line 128 of file vtkImageStencilIterator.h.


The documentation for this class was generated from the following file: