All Implemented Interfaces:
Provider<Mask>, ProviderAsStack

public class FillHoles extends MaskProviderUnary
Fills holes in a mask, with options to skip holes touching the border or exceeding a maximum volume.

This class extends MaskProviderUnary to provide functionality for filling holes in binary masks.

  • Constructor Details

    • FillHoles

      public FillHoles()
  • Method Details

    • createFromMask

      public Mask createFromMask(Mask mask) throws ProvisionFailedException
      Description copied from class: MaskProviderUnary
      Creates a Mask given the entity provided by the delegate.
      Specified by:
      createFromMask in class MaskProviderUnary
      Parameters:
      mask - the entity provided by the delegate.
      Returns:
      the created Mask that is returned by the provider.
      Throws:
      ProvisionFailedException - if the provider cannot complete successfully.
    • getMaxVolume

      public UnitValueExtent getMaxVolume()
      The maximum volume of a hole to be filled. If null, no maximum volume constraint is applied.
    • setMaxVolume

      public void setMaxVolume(UnitValueExtent maxVolume)
      The maximum volume of a hole to be filled. If null, no maximum volume constraint is applied.
    • isSkipAtBorder

      public boolean isSkipAtBorder()
      If true, holes that touch the border of the mask are not filled. Default value is true.
    • setSkipAtBorder

      public void setSkipAtBorder(boolean skipAtBorder)
      If true, holes that touch the border of the mask are not filled. Default value is true.