Class ConvexHullBase

All Implemented Interfaces:
Provider<Mask>, ProviderAsStack
Direct Known Subclasses:
ConvexHull2D, ConvexHull3D

public abstract class ConvexHullBase extends MaskProviderUnary
Base class for convex hull implementations.
  • Constructor Details

    • ConvexHullBase

      public ConvexHullBase()
  • 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.
    • createFromMask

      protected abstract Mask createFromMask(Mask mask, Mask outline) throws ProvisionFailedException
      Creates a convex hull from a mask and its outline.
      Parameters:
      mask - the input Mask
      outline - the outline Mask of the input mask
      Returns:
      the convex hull Mask
      Throws:
      ProvisionFailedException - if the convex hull creation fails
    • isErodeAtBoundary

      public boolean isErodeAtBoundary()
      Whether to erode the mask at the boundary before finding the contour.
    • setErodeAtBoundary

      public void setErodeAtBoundary(boolean erodeAtBoundary)
      Whether to erode the mask at the boundary before finding the contour.