Class WalkPredicate
Object
org.anchoranalysis.image.voxel.iterator.neighbor.kernel.WalkPredicate
public class WalkPredicate extends Object
Walks in X, Y and Z directions from a point, test a
NeighborPredicate to determine if a
neighbor satisfies conditions.
As soon as any neighbor matches the predicate, a true value is returned for the voxel. A false is returned only if no neighbors match the predicate.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description WalkPredicate(KernelPointCursor point, NeighborPredicate predicate, boolean bigNeighborhood) -
Method Summary
Modifier and Type Method Description booleanwalk(UnsignedByteBuffer buffer, BufferRetriever bufferRetriever)Do any neighboring voxels in any direction satisfy the predicate?
-
Constructor Details
-
WalkPredicate
public WalkPredicate(KernelPointCursor point, NeighborPredicate predicate, boolean bigNeighborhood)
-
-
Method Details
-
walk
Do any neighboring voxels in any direction satisfy the predicate?- Parameters:
buffer- the buffer associated with the current slicebufferRetriever- a means of retrieving buffers for other slices, accepting a relative shift compared to current slice (e.g. -1, +1) etc.- Returns:
- true iff at least one neighbor voxel in any direction satisfies the predicate.
-