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 aChannelgiven the entity provided by the delegate.protected abstract ChannelcreateFromMaskedChannel(Channel channel, Mask mask) Creates a newChannelfrom the input channel and mask.getMask()TheMaskProviderused to create the binary mask.voidsetMask(MaskProvider mask) TheMaskProviderused to create the binary mask.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
get, getChannel, setChannelMethods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
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
-
UnaryWithMaskBase
public UnaryWithMaskBase()
-
-
Method Details
-
createFromChannel
Description copied from class:ChannelProviderUnaryCreates aChannelgiven the entity provided by the delegate.- Specified by:
createFromChannelin classChannelProviderUnary- Parameters:
channel- the entity provided by the delegate.- Returns:
- the created
Channelthat 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 newChannelfrom the input channel and mask.- Parameters:
channel- the inputChannelmask- theMaskto apply to the channel- Returns:
- a new
Channelcreated from the input channel and mask - Throws:
ProvisionFailedException- if the channel creation fails
-
getMask
TheMaskProviderused to create the binary mask. -
setMask
TheMaskProviderused to create the binary mask.
-