Class CombineBase
- All Implemented Interfaces:
Provider<Mask>
,ProviderAsStack
Base class for combining two masks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromMask
(Mask mask) Creates aMask
given the entity provided by the delegate.protected abstract Mask
createFromTwoMasks
(Mask maskToModify, Mask maskOther) Creates a mask from some combination of two masks.TheMaskProvider
for the second mask to be combined.void
setReceive
(MaskProvider receive) TheMaskProvider
for the second mask to be combined.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
-
CombineBase
public CombineBase()
-
-
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.
-
createFromTwoMasks
protected abstract Mask createFromTwoMasks(Mask maskToModify, Mask maskOther) throws ProvisionFailedException Creates a mask from some combination of two masks.- Parameters:
maskToModify
- first mask (which is also the mask modified with the result)maskOther
- second mask (which is not modified)- Returns:
- either
maskToModify
ormaskOther
depending on implementation - Throws:
ProvisionFailedException
- if the mask creation fails
-
getReceive
TheMaskProvider
for the second mask to be combined. -
setReceive
TheMaskProvider
for the second mask to be combined.
-