Class MorphologicalDilation

Object
MorphologicalDilation

public class MorphologicalDilation extends Object
Author:
Owen Feehan
  • Method Details

    • dilate

      public static ObjectMask dilate(ObjectMask object, Optional<Extent> extent, boolean useZ, int iterations, boolean bigNeighborhood) throws CreateException
      Dilates an ObjectMask, 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 in NeighborhoodFactory.
      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.