Class WalkPredicate
Object
WalkPredicate
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
ConstructorsConstructorDescriptionWalkPredicate(KernelPointCursor point, NeighborPredicate predicate, boolean bigNeighborhood) Creates a newWalkPredicateinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanwalk(UnsignedByteBuffer buffer, BufferRetriever bufferRetriever) Do any neighboring voxels in any direction satisfy the predicate?
-
Constructor Details
-
WalkPredicate
Creates a newWalkPredicateinstance.- Parameters:
point- The cursor used for iterating through points.predicate- Whether a neighbor qualifies or not.bigNeighborhood- Whether to use a big-neighborhood or not.if true, a big neighborhood is used 2D-plane (8-connected instead of 4-connected), but not in Z-direction (remains 2-connected).
-
-
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.
-