VTK
Public 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

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...
 
 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...
 
- 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...
 
const intGetIndex ()
 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...
 
void GetIndex (int result[3])
 Get the index at the beginning of the current 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
 
intSpanCountPointer
 
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
Tests:
vtkImageStencilIterator (Tests)

Definition at line 35 of file vtkImageStencilIterator.h.

Constructor & Destructor Documentation

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

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

Definition at line 43 of file vtkImageStencilIterator.h.

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 62 of file vtkImageStencilIterator.h.

Member Function Documentation

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 79 of file vtkImageStencilIterator.h.

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 99 of file vtkImageStencilIterator.h.

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

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

Definition at line 109 of file vtkImageStencilIterator.h.

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

Return a pointer to the beginning of the current span.

Definition at line 117 of file vtkImageStencilIterator.h.

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

Return a pointer to the end of the current span.

Definition at line 125 of file vtkImageStencilIterator.h.

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

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

Definition at line 136 of file vtkImageStencilIterator.h.

Member Data Documentation

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

Definition at line 144 of file vtkImageStencilIterator.h.

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

Definition at line 147 of file vtkImageStencilIterator.h.

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

Definition at line 148 of file vtkImageStencilIterator.h.

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

Definition at line 149 of file vtkImageStencilIterator.h.


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