public class ConditionalKernel extends BinaryKernel
BinaryKernel
iff a predicate is satisfied for a particular point.Constructor and Description |
---|
ConditionalKernel(BinaryKernel kernel,
java.util.function.Predicate<Point3i> predicate)
Creates with a particular delegate
BinaryKernel and a predicate that tests each
point. |
Modifier and Type | Method and Description |
---|---|
boolean |
calculateAt(KernelPointCursor point)
Calculates the boolean at a particular point.
|
void |
notifyBuffer(LocalSlices slices,
int sliceIndex)
Called to inform the
Kernel of buffers that are currently being processed. |
public ConditionalKernel(BinaryKernel kernel, java.util.function.Predicate<Point3i> predicate)
BinaryKernel
and a predicate that tests each
point.kernel
- the kernel to execute if predicate
is satisfied at a particular point.predicate
- the predicate to be applied to a point.public boolean calculateAt(KernelPointCursor point)
BinaryKernel
calculateAt
in class BinaryKernel
point
- the point.public void notifyBuffer(LocalSlices slices, int sliceIndex)
Kernel
Kernel
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.
notifyBuffer
in class Kernel
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.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.