public abstract class BinaryKernelMorphological extends BinaryKernel
BinaryKernel
that implements a morphological operation.Modifier | Constructor and Description |
---|---|
protected |
BinaryKernelMorphological(boolean bigNeighborhood,
boolean unqualifiedOutcome,
boolean failedFirstCheckOutcome)
Creates with a flag for big-neighborhood, and boolean outcomes for certain cases.
|
Modifier and Type | Method and Description |
---|---|
boolean |
calculateAt(KernelPointCursor point)
Calculates the boolean at a particular point.
|
protected abstract boolean |
doesNeighborQualify(boolean inside,
KernelPointCursor point,
java.util.function.Supplier<UnsignedByteBuffer> buffer,
int zShift)
Does a particular neighboring-point satisfy the conditions.
|
protected abstract boolean |
firstCheck(KernelPointCursor point,
UnsignedByteBuffer buffer)
The first check done on the kernel center-point, before checking any neighbors.
|
void |
notifyBuffer(LocalSlices slices,
int sliceIndex)
Called to inform the
Kernel of buffers that are currently being processed. |
protected BinaryKernelMorphological(boolean bigNeighborhood, boolean unqualifiedOutcome, boolean failedFirstCheckOutcome)
bigNeighborhood
- if true, a big neighborhood is used 2D-plane (8-connected instead of
4-connected), but not in Z-direction (remains always 2-connected).unqualifiedOutcome
- the (negative) outcome that occurs if no neighbor qualifies
(satisfies a condition). The positive outcome is assumed to be the complement of this.failedFirstCheckOutcome
- if the first-check fails, this outcome is returned.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.public boolean calculateAt(KernelPointCursor point)
BinaryKernel
calculateAt
in class BinaryKernel
point
- the point.protected abstract boolean firstCheck(KernelPointCursor point, UnsignedByteBuffer buffer)
point
- a kernel focused on a particular point.buffer
- the associated buffer.protected abstract boolean doesNeighborQualify(boolean inside, KernelPointCursor point, java.util.function.Supplier<UnsignedByteBuffer> buffer, int zShift)
inside
- true iff the neighboring-point is inside the scene.point
- the point.buffer
- the associated buffer.zShift
- the buffer associated with the current point.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.