Skip to content

ImagePointDataIterator ​

Introduction ​

vtkImagePointDataIterator iterates over the point data of a vtkImageData, one span at a time. A span is a contiguous run of points along the x axis that is entirely inside or entirely outside of an optional stencil.

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkImagePointDataIterator characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIImagePointDataIteratorInitialValuesNo(default: {})

getArray ​

Get the raw values of the given array, offset to tuple i.

ArgumentTypeRequiredDescription
arrayvtkDataArrayYes
iNumberYesThe tuple index to start at.

getId ​

Point id the iterator is currently at.

getIndex ​

Current x, y, z index.

getScalars ​

Get the raw scalars of the given image, offset to tuple i.

ArgumentTypeRequiredDescription
imagevtkImageDataYes
iNumberNoThe tuple index to start at (default 0).

initialize ​

Prepare the iterator to walk the given image over inExtent.

ArgumentTypeRequiredDescription
imagevtkImageDataYesThe image to iterate over.
inExtentExtentNoThe extent to walk, clamped to the image extent. Defaults to the whole image extent when null.
stencilYesOptional stencil restricting the iteration.
algorithmYesOptional algorithm used for progress reporting.

isAtEnd ​

isInStencil ​

Whether the current span lies inside the stencil. Always true when no stencil was given to initialize().

newInstance ​

Method used to create a new instance of vtkImagePointDataIterator

ArgumentTypeRequiredDescription
initialValuesIImagePointDataIteratorInitialValuesNofor pre-setting some of its content

nextSpan ​

Advance to the next span, row or slice.

reportProgress ​

Progress reporting hook. Does nothing by default.

setSpanState ​

Move the iterator to the span containing the given x index of the current row, and update the in-stencil state accordingly.

ArgumentTypeRequiredDescription
idXNumberYes

spanEndId ​

Point id just past the end of the current span.