Class UnaryWithMaskBase
Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
ChannelProviderUnary
UnaryWithMaskBase
- All Implemented Interfaces:
Provider<Channel>,ProviderAsStack
- Direct Known Subclasses:
AssignFromChannel,AssignValue,SubtractMean,ZeroOutsideMask
public abstract class UnaryWithMaskBase
extends ChannelProviderUnary
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 TypeMethodDescriptionChannelcreateFromChannel(Channel channel) protected abstract ChannelcreateFromMaskedChannel(Channel channel, Mask mask) Creates a newChannelfrom the input channel and mask.MaskProvidergetMask()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
public Channel createFromChannel(Channel channel) throws ProvisionFailedException - Specified by:
createFromChannelin classChannelProviderUnary- Throws:
ProvisionFailedException
-
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
public MaskProvider getMask()TheMaskProviderused to create the binary mask. -
setMask
public void setMask(MaskProvider mask) TheMaskProviderused to create the binary mask.
-