Class ConvexHullBase
- All Implemented Interfaces:
Provider<Mask>
,ProviderAsStack
- Direct Known Subclasses:
ConvexHull2D
,ConvexHull3D
Base class for convex hull implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromMask
(Mask mask) Creates aMask
given the entity provided by the delegate.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
-
Constructor Details
-
ConvexHullBase
public ConvexHullBase()
-
-
Method Details
-
createFromMask
Description copied from class:MaskProviderUnary
Creates aMask
given the entity provided by the delegate.- Specified by:
createFromMask
in classMaskProviderUnary
- 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
Creates a convex hull from a mask and its outline.- Parameters:
mask
- the inputMask
outline
- the outlineMask
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.
-