Class ConditionalKernel
Object
Kernel
BinaryKernel
ConditionalKernel
Executes another
BinaryKernel
iff a predicate is satisfied for a particular point.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionConditionalKernel
(BinaryKernel kernel, Predicate<Point3i> predicate) Creates with a particular delegateBinaryKernel
and a predicate that tests each point. -
Method Summary
Modifier and TypeMethodDescriptionboolean
calculateAt
(KernelPointCursor point) Calculates the boolean at a particular point.void
notifyBuffer
(LocalSlices slices, int sliceIndex) Called to inform theKernel
of buffers that are currently being processed.
-
Constructor Details
-
ConditionalKernel
Creates with a particular delegateBinaryKernel
and a predicate that tests each point.- Parameters:
kernel
- the kernel to execute ifpredicate
is satisfied at a particular point.predicate
- the predicate to be applied to a point.
-
-
Method Details
-
calculateAt
Description copied from class:BinaryKernel
Calculates the boolean at a particular point.- Specified by:
calculateAt
in classBinaryKernel
- Parameters:
point
- the point.- Returns:
- the boolean result at this point.
-
notifyBuffer
Description copied from class:Kernel
Called to inform theKernel
of buffers that are currently being processed.Only a single z-slice is processed at a particular time.
This should be repeatedly called each time the focus changes to a different z-slice.
- Specified by:
notifyBuffer
in classKernel
- Parameters:
slices
- slices that can be processed by the kernel, localized to a current local area of focus.sliceIndex
- the global z-index of the slice that is currently the focus of the kernel.
-