Class FillHoles
Object
AnchorBean<MaskProvider>
InitializableBean<MaskProvider, ImageInitialization>
ImageBean<MaskProvider>
BeanProviderAsStackBase<MaskProvider, Mask>
MaskProvider
MaskProviderUnary
FillHoles
- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMaskcreateFromMask(Mask mask) UnitValueExtentThe maximum volume of a hole to be filled.booleanIf true, holes that touch the border of the mask are not filled.voidsetMaxVolume(UnitValueExtent maxVolume) The maximum volume of a hole to be filled.voidsetSkipAtBorder(boolean skipAtBorder) If true, holes that touch the border of the mask are not filled.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
-
FillHoles
public FillHoles()
-
-
Method Details
-
createFromMask
public Mask createFromMask(Mask mask) throws ProvisionFailedException - Specified by:
createFromMaskin classMaskProviderUnary- Throws:
ProvisionFailedException
-
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.
-