Class UnaryWithMaskBase
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
- Direct Known Subclasses:
AssignFromChannel
,AssignValue
,SubtractMean
,ZeroOutsideMask
A base class for a
ChannelProviderUnary
which also uses a binary mask.
This class extends ChannelProviderUnary
to provide functionality for creating channels
based on both an input channel and a binary mask.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromChannel
(Channel channel) Creates aChannel
given the entity provided by the delegate.protected abstract Channel
createFromMaskedChannel
(Channel channel, Mask mask) Creates a newChannel
from the input channel and mask.getMask()
TheMaskProvider
used to create the binary mask.void
setMask
(MaskProvider mask) TheMaskProvider
used to create the binary mask.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
get, getChannel, setChannel
Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
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
-
UnaryWithMaskBase
public UnaryWithMaskBase()
-
-
Method Details
-
createFromChannel
Description copied from class:ChannelProviderUnary
Creates aChannel
given the entity provided by the delegate.- Specified by:
createFromChannel
in classChannelProviderUnary
- Parameters:
channel
- the entity provided by the delegate.- Returns:
- the created
Channel
that is returned by the provider. - Throws:
ProvisionFailedException
- if the provider cannot complete successfully.
-
createFromMaskedChannel
protected abstract Channel createFromMaskedChannel(Channel channel, Mask mask) throws ProvisionFailedException Creates a newChannel
from the input channel and mask.- Parameters:
channel
- the inputChannel
mask
- theMask
to apply to the channel- Returns:
- a new
Channel
created from the input channel and mask - Throws:
ProvisionFailedException
- if the channel creation fails
-
getMask
TheMaskProvider
used to create the binary mask. -
setMask
TheMaskProvider
used to create the binary mask.
-