Class FromStack

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

public class FromStack extends ChannelProvider
Extracts a channel from a provider of a stack.

This class extends ChannelProvider to provide a single channel from a stack, which can be specified either by a provider ID or directly as a ProviderAsStack.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
    FromStack(ProviderAsStack stack)
    Creates a new instance with a specified stack provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkMisconfigured(BeanInstanceMap defaultInstances)
     
    Channel
    get()
     
    int
    The index of the channel to extract from the stack.
    ProviderAsStack
    Provides a stack.
    Specifies the ID of an existing stack.
    void
    setChannelIndex(int channelIndex)
    The index of the channel to extract from the stack.
    void
    setStack(ProviderAsStack stack)
    Provides a stack.
    void
    setStackProviderID(String stackProviderID)
    Specifies the ID of an existing stack.

    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

    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

    • FromStack

      public FromStack(ProviderAsStack stack)
      Creates a new instance with a specified stack provider.
      Parameters:
      stack - the ProviderAsStack to use for providing the stack
    • FromStack

      public FromStack()
  • Method Details

    • checkMisconfigured

      public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
      Overrides:
      checkMisconfigured in class AnchorBean<ChannelProvider>
      Throws:
      BeanMisconfiguredException
    • get

      public Channel get() throws ProvisionFailedException
      Throws:
      ProvisionFailedException
    • getChannelIndex

      public int getChannelIndex()
      The index of the channel to extract from the stack.
    • setChannelIndex

      public void setChannelIndex(int channelIndex)
      The index of the channel to extract from the stack.
    • getStackProviderID

      public String getStackProviderID()
      Specifies the ID of an existing stack. Either this must be specified or else stack must be specified.
    • setStackProviderID

      public void setStackProviderID(String stackProviderID)
      Specifies the ID of an existing stack. Either this must be specified or else stack must be specified.
    • getStack

      public ProviderAsStack getStack()
      Provides a stack. Either this must be specified or else stackProviderID must be specified.
    • setStack

      public void setStack(ProviderAsStack stack)
      Provides a stack. Either this must be specified or else stackProviderID must be specified.