Interface ProcessVoxelNeighbor<T>
- Type Parameters:
T
- result-type that can be collected after processing
public interface ProcessVoxelNeighbor<T>
Processes a point that is an neighbor of another.
It assumes there is an associated sliding buffer containing voxel-values.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionCollects the result of the operation after processing neighbor pixels.void
initSource
(Point3i pointSource, int sourceValue, int sourceOffsetXY) Specify the source-point (of which all the processed points are neighbors).default boolean
notifyChangeZ
(int zChange) Notifies the processor that there has been a change in z-coordinate.void
processPoint
(int xChange, int yChange) Processes a particular point.
-
Method Details
-
initSource
Specify the source-point (of which all the processed points are neighbors).This must be called before any calls to
processPoint(int, int)
.- Parameters:
pointSource
- the source point in global coordinates.sourceValue
- the value of the source pixel (in the associated sliding buffer).sourceOffsetXY
- the offset of the source pixel in XY (in the associated sliding buffer).
-
notifyChangeZ
default boolean notifyChangeZ(int zChange) Notifies the processor that there has been a change in z-coordinate.- Parameters:
zChange
- the change in the Z-dimension to reach this neighbor relative to the source coordinate.- Returns:
- true if processing should continue on this slice, or false if processing should stop for this slice.
-
processPoint
void processPoint(int xChange, int yChange) Processes a particular point.- Parameters:
xChange
- the change in x-dimension to reach this neighbor relative to the source coordinate.yChange
- the change in y-dimension to reach this neighbor relative to the source coordinate.
-
collectResult
T collectResult()Collects the result of the operation after processing neighbor pixels.- Returns:
- the result.
-