Class IterateKernelHelper
Object
IterateKernelHelper
Routines to iterate a 
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.
- Author:
 - Owen Feehan
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic voidoverAll(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, KernelApplicationParameters parameters, ProcessKernelPointCursor processor) Iterates over all voxels.static voidoverBox(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, ProcessKernelPointCursor processor) Iterates over only voxels contained within a bounding-box.static booleanoverBoxUntil(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. 
- 
Method Details
- 
overAll
public static void overAll(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, KernelApplicationParameters parameters, ProcessKernelPointCursor processor) Iterates over all voxels.- Parameters:
 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.
 - 
overBox
public static void overBox(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, ProcessKernelPointCursor processor) throws OperationFailedException Iterates over only voxels contained within a bounding-box.- Parameters:
 kernel- the kernel to apply.voxels- the voxels in which a bounding-box resides.box- a bounding-box pertaining tovoxelsindicating which voxels are iterated over.parameters- parameters influencing how the kernel is applied.processor- called on each voxel within the bounding-box.- Throws:
 OperationFailedException- if the bounding-box is not contained withinvoxels.
 - 
overBoxUntil
public static boolean overBoxUntil(Kernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters, PredicateKernelPointCursor predicate) throws OperationFailedException Iterates over only voxels contained within a bounding-box until a predicate is matched on a voxel.The function will return at the first encountered voxel that satisfies the predicate.
- Parameters:
 kernel- the kernel to apply.voxels- the voxels in which a bounding-box resides.box- a bounding-box pertaining tovoxelsindicating 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.- Returns:
 - whether at least one voxel satisfied 
predicate. - Throws:
 OperationFailedException- if the bounding-box is not contained withinvoxels.
 
 -