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 -
Method Summary
Modifier and TypeMethodDescriptionMaskcreateFromMask(Mask mask) protected abstract MaskcreateFromMask(Mask mask, Mask outline) Creates a convex hull from a mask and its outline.booleanWhether to erode the mask at the boundary before finding the contour.voidsetErodeAtBoundary(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, setMaskMethods inherited from class org.anchoranalysis.image.bean.provider.MaskProvider
getAsStackMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods 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
public Mask createFromMask(Mask mask) throws ProvisionFailedException - Specified by:
createFromMaskin classMaskProviderUnary- 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 inputMaskoutline- the outlineMaskof 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.
-