Class IfParamEquals

Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
ChannelProviderUnary
IfParamEquals
All Implemented Interfaces:
Provider<Channel>, ProviderAsStack

public class IfParamEquals extends ChannelProviderUnary
Provides a channel based on a condition from a dictionary.

This class extends ChannelProviderUnary to return either the input channel or an alternative channel based on a condition specified in a dictionary.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Channel
    createFromChannel(Channel channel)
     
    ChannelProvider
    The channel provider to use if the condition is false.
    The condition to evaluate from the dictionary.
    void
    setChannelElse(ChannelProvider channelElse)
    The channel provider to use if the condition is false.
    void
    The condition to evaluate from the dictionary.

    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

    • IfParamEquals

      public IfParamEquals()
  • Method Details

    • createFromChannel

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

      public DictionaryCondition getCondition()
      The condition to evaluate from the dictionary.
    • setCondition

      public void setCondition(DictionaryCondition condition)
      The condition to evaluate from the dictionary.
    • getChannelElse

      public ChannelProvider getChannelElse()
      The channel provider to use if the condition is false.
    • setChannelElse

      public void setChannelElse(ChannelProvider channelElse)
      The channel provider to use if the condition is false.