public class IterateKernelHelper extends Object
Kernel
over some or all of the voxels in a BinaryVoxels
.
This ensures the appropriate methods are called on Kernel
to inform it of the current
z-slice buffers.
Modifier and Type | Method and Description |
---|---|
static void |
overAll(Kernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
KernelApplicationParameters parameters,
ProcessKernelPointCursor processor)
Iterates over all voxels.
|
static void |
overBox(Kernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
BoundingBox box,
KernelApplicationParameters parameters,
ProcessKernelPointCursor processor)
Iterates over only voxels contained within a bounding-box.
|
static boolean |
overBoxUntil(Kernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
BoundingBox box,
KernelApplicationParameters parameters,
PredicateKernelPointCursor predicate)
Iterates over only voxels contained within a bounding-box until a predicate is matched
on a voxel.
|
public static void overAll(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, KernelApplicationParameters parameters, ProcessKernelPointCursor processor)
kernel
- the kernel to apply.voxels
- the voxels to apply the kernel to.parameters
- parameters influencing how the kernel is applied.processor
- called on each voxel.public static void overBox(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, ProcessKernelPointCursor processor) throws OperationFailedException
kernel
- the kernel to apply.voxels
- the voxels in which a bounding-box resides.box
- a bounding-box pertaining to voxels
indicating which voxels are iterated
over.parameters
- parameters influencing how the kernel is applied.processor
- called on each voxel within the bounding-box.OperationFailedException
- if the bounding-box is not contained within voxels
.public static boolean overBoxUntil(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, PredicateKernelPointCursor predicate) throws OperationFailedException
The function will return at the first encountered voxel that satisfies the predicate.
kernel
- the kernel to apply.voxels
- the voxels in which a bounding-box resides.box
- a bounding-box pertaining to voxels
indicating which voxels are iterated
over.parameters
- parameters influencing how the kernel is applied.predicate
- a condition tested on each voxel until it first returns true.predicate
.OperationFailedException
- if the bounding-box is not contained within voxels
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.