Class ConvexHullBase

Object
AnchorBean<MaskProvider>
InitializableBean<MaskProvider, ImageInitialization>
ImageBean<MaskProvider>
BeanProviderAsStackBase<MaskProvider, Mask>
MaskProvider
MaskProviderUnary
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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Mask
    createFromMask(Mask mask)
     
    protected abstract Mask
    createFromMask(Mask mask, Mask outline)
    Creates a convex hull from a mask and its outline.
    boolean
    Whether to erode the mask at the boundary before finding the contour.
    void
    setErodeAtBoundary(boolean erodeAtBoundary)
    Whether to erode the mask at the boundary before finding the contour.

    Methods inherited from class org.anchoranalysis.image.bean.provider.MaskProviderUnary

    get, getMask, setMask

    Methods inherited from class org.anchoranalysis.image.bean.provider.MaskProvider

    getAsStack

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ConvexHullBase

      public ConvexHullBase()
  • Method Details

    • createFromMask

      public Mask createFromMask(Mask mask) throws ProvisionFailedException
      Specified by:
      createFromMask in class MaskProviderUnary
      Throws:
      ProvisionFailedException
    • 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.