Class MorphologicalDilation
Object
MorphologicalDilation
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic BinaryVoxels
<UnsignedByteBuffer> dilate
(BinaryVoxels<UnsignedByteBuffer> voxels, int iterations, DilationContext context) Performs a morphological dilation operation.static ObjectMask
dilate
(ObjectMask object, Optional<Extent> extent, boolean useZ, int iterations, boolean bigNeighborhood) Dilates anObjectMask
, growing the bounding-box as necessary.
-
Method Details
-
dilate
public static ObjectMask dilate(ObjectMask object, Optional<Extent> extent, boolean useZ, int iterations, boolean bigNeighborhood) throws CreateException Dilates anObjectMask
, growing the bounding-box as necessary.- Parameters:
object
- the object to dilate.extent
- if present, restricts the object to remain within certain bounds.useZ
- whether to perform dilation in 2D or 3D.iterations
- number of dilations to perform.bigNeighborhood
- if true, uses a big neighborhood, otherwise a small neighborhood, as defined inNeighborhoodFactory
.- Returns:
- a newly created object-mask with bounding-box dilated in relevant directions by
iterations
. - Throws:
CreateException
- if the object cannot be successfully dilated.
-
dilate
public static BinaryVoxels<UnsignedByteBuffer> dilate(BinaryVoxels<UnsignedByteBuffer> voxels, int iterations, DilationContext context) throws CreateException Performs a morphological dilation operation.- Parameters:
voxels
- input-voxels.iterations
- number of dilations.context
- additional parameters for influencing how dilation occurs.- Returns:
- a new buffer containing the results of the dilation-operations.
- Throws:
CreateException
- if the postcondition cannot be successfully checked.
-