Class FillHoles
- All Implemented Interfaces:
Provider<Mask>,ProviderAsStack
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 TypeMethodDescriptioncreateFromMask(Mask mask) Creates aMaskgiven the entity provided by the delegate.The 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
Description copied from class:MaskProviderUnaryCreates aMaskgiven the entity provided by the delegate.- Specified by:
createFromMaskin classMaskProviderUnary- Parameters:
mask- the entity provided by the delegate.- Returns:
- the created
Maskthat is returned by the provider. - Throws:
ProvisionFailedException- if the provider cannot complete successfully.
-
getMaxVolume
The maximum volume of a hole to be filled. If null, no maximum volume constraint is applied. -
setMaxVolume
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.
-