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.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IImagePointDataIteratorInitialValues | No | (default: {}) |
getArray
Get the raw values of the given array, offset to tuple i.
| Argument | Type | Required | Description |
|---|---|---|---|
array | vtkDataArray | Yes | |
i | Number | Yes | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
image | vtkImageData | Yes | |
i | Number | No | The tuple index to start at (default 0). |
initialize
Prepare the iterator to walk the given image over inExtent.
| Argument | Type | Required | Description |
|---|---|---|---|
image | vtkImageData | Yes | The image to iterate over. |
inExtent | Extent | No | The extent to walk, clamped to the image extent. Defaults to the whole image extent when null. |
stencil | Yes | Optional stencil restricting the iteration. | |
algorithm | Yes | Optional 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
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IImagePointDataIteratorInitialValues | No | for 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.
| Argument | Type | Required | Description |
|---|---|---|---|
idX | Number | Yes |
spanEndId
Point id just past the end of the current span.