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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Channel
    createFromChannel(Channel channel)
     
    protected abstract Channel
    createFromMaskedChannel(Channel channel, Mask mask)
    Creates a new Channel from the input channel and mask.
    MaskProvider
    The MaskProvider used to create the binary mask.
    void
    setMask(MaskProvider mask)
    The MaskProvider 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • UnaryWithMaskBase

      public UnaryWithMaskBase()
  • Method Details

    • createFromChannel

      public Channel createFromChannel(Channel channel) throws ProvisionFailedException
      Specified by:
      createFromChannel in class ChannelProviderUnary
      Throws:
      ProvisionFailedException
    • createFromMaskedChannel

      protected abstract Channel createFromMaskedChannel(Channel channel, Mask mask) throws ProvisionFailedException
      Creates a new Channel from the input channel and mask.
      Parameters:
      channel - the input Channel
      mask - the Mask to apply to the channel
      Returns:
      a new Channel created from the input channel and mask
      Throws:
      ProvisionFailedException - if the channel creation fails
    • getMask

      public MaskProvider getMask()
      The MaskProvider used to create the binary mask.
    • setMask

      public void setMask(MaskProvider mask)
      The MaskProvider used to create the binary mask.