Class IterateVoxelsObjectMaskOptional
Object
IterateVoxelsObjectMaskOptional
Utilities for iterating over the subset of voxels corresponding to an on state in an
optional
ObjectMask.
If the ObjectMask is not defined, then all voxels are iterated over.
The utilities operate on one or more Voxels. A processor is called on each selected
voxel.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidwithBuffer(Optional<ObjectMask> objectMask, Voxels<T> voxels, ProcessBufferUnary<T> process) Iterate over each voxel (or optionally only on object-mask) with one associated buffer.static voidwithPoint(Optional<ObjectMask> objectMask, Extent extent, ProcessPoint process) Iterate over all points that are located on a object-mask or else all points in an extent.static voidwithSlidingBuffer(Optional<ObjectMask> objectMask, SlidingBuffer<?> buffer, ProcessPoint process) Iterate over each voxel in a sliding-buffer, optionally restricting it to be only voxels in a certain objectstatic <S,T> void withTwoBuffers(Optional<ObjectMask> objectMask, Voxels<S> voxels1, Voxels<T> voxels2, ProcessBufferBinary<S, T> process) Iterate over each voxel (or optionally only on object-mask) with two associated buffers.
-
Method Details
-
withPoint
Iterate over all points that are located on a object-mask or else all points in an extent.- Parameters:
objectMask- an optional object-mask that is used as a condition on what voxels to iterate. If not defined, all voxels are iterated over.extent- if object-mask isn't defined, then all the voxels in thisExtentare iterated over insteadprocess- process is called for each voxel (on the entireExtentor on the object-mask depending) using global coordinates.
-
withBuffer
public static <T> void withBuffer(Optional<ObjectMask> objectMask, Voxels<T> voxels, ProcessBufferUnary<T> process) Iterate over each voxel (or optionally only on object-mask) with one associated buffer.- Type Parameters:
T- buffer-type for voxels- Parameters:
objectMask- an optional object-mask that is used as a condition on what voxels to iterate. If not defined, all voxels are iterated over.voxels- voxels where buffers extracted from be processed, and which define the global coordinate spaceprocess- is called for each voxel within the bounding-box using global coordinates.
-
withTwoBuffers
public static <S,T> void withTwoBuffers(Optional<ObjectMask> objectMask, Voxels<S> voxels1, Voxels<T> voxels2, ProcessBufferBinary<S, T> process) Iterate over each voxel (or optionally only on object-mask) with two associated buffers.- Type Parameters:
T- buffer-type for voxels- Parameters:
objectMask- an optional object-mask that is used as a condition on what voxels to iterate. If not defined, all voxels are iterated over.voxels1- voxels that provide the first voxel-buffervoxels2- voxels that provide the second bufferprocess- is called for each voxel within the bounding-box using global coordinates.
-
withSlidingBuffer
public static void withSlidingBuffer(Optional<ObjectMask> objectMask, SlidingBuffer<?> buffer, ProcessPoint process) Iterate over each voxel in a sliding-buffer, optionally restricting it to be only voxels in a certain object- Parameters:
objectMask- an optional object-mask that is used as a condition on what voxels to iteratebuffer- a sliding-buffer whose voxels are iterated over, partially (if an objectmask is defined) or as a whole (if no onject-mask is defined)process- process is called for each voxel (on the entireSlidingBufferor on the object-mask depending) using global coordinates.
-