public class MorphologicalErosion extends Object
ObjectMask
or BinaryVoxels
.Modifier and Type | Method and Description |
---|---|
static BinaryVoxels<UnsignedByteBuffer> |
erode(BinaryVoxels<UnsignedByteBuffer> voxels,
int iterations,
boolean useZ,
Optional<java.util.function.Predicate<Point3i>> precondition)
Performs a morphological erosion on a
BinaryVoxels<UnsignedByteBuffer> voxels . |
static ObjectMask |
erode(ObjectMask object,
int iterations,
boolean useZ)
Performs a morphological erosion on an
ObjectMask . |
static ObjectMask |
erode(ObjectMask object,
int iterations,
boolean useZ,
Optional<AcceptIterationPredicate> postcondition)
Performs a morphological erosion on an
ObjectMask - with a postcondition. |
public static ObjectMask erode(ObjectMask object, int iterations, boolean useZ) throws CreateException
ObjectMask
.object
- the object-mask to perform the erosion on.iterations
- how many iterations of erosion to perform.useZ
- whether to use the Z dimension or not during the erosion.BinaryVoxels<UnsignedByteBuffer>
showing voxels
after
the erosion operation was applied.CreateException
public static ObjectMask erode(ObjectMask object, int iterations, boolean useZ, Optional<AcceptIterationPredicate> postcondition) throws CreateException
ObjectMask
- with a postcondition.object
- the object-mask to perform the erosion on.iterations
- how many iterations of erosion to perform.useZ
- whether to use the Z dimension or not during the erosionpostcondition
- conditions applied after each iteration of the erosion, otherwise no
more iterations occur. Note that these are applied on an inverted version of voxels
.BinaryVoxels<UnsignedByteBuffer>
showing voxels
after
the erosion operation was applied.CreateException
public static BinaryVoxels<UnsignedByteBuffer> erode(BinaryVoxels<UnsignedByteBuffer> voxels, int iterations, boolean useZ, Optional<java.util.function.Predicate<Point3i>> precondition) throws CreateException
BinaryVoxels<UnsignedByteBuffer> voxels
.voxels
- the voxels to perform the erosion on.iterations
- how many iterations of erosion to perform.useZ
- whether to use the Z dimension or not during the erosion.precondition
- if defined, a condition which must be satisfied on a voxel, before
any voxel can be dilated.BinaryVoxels<UnsignedByteBuffer>
showing voxels
after
the erosion operation was applied.CreateException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.