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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMisconfigured(BeanInstanceMap defaultInstances) Channelget()intThe index of the channel to extract from the stack.ProviderAsStackgetStack()Provides a stack.Specifies the ID of an existing stack.voidsetChannelIndex(int channelIndex) The index of the channel to extract from the stack.voidsetStack(ProviderAsStack stack) Provides a stack.voidsetStackProviderID(String stackProviderID) Specifies the ID of an existing stack.Methods 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
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
FromStack
public FromStack(ProviderAsStack stack) Creates a new instance with a specified stack provider.- Parameters:
stack- theProviderAsStackto use for providing the stack
-
FromStack
public FromStack()
-
-
Method Details
-
checkMisconfigured
public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException - Overrides:
checkMisconfiguredin classAnchorBean<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
Specifies the ID of an existing stack. Either this must be specified or elsestackmust be specified. -
setStackProviderID
Specifies the ID of an existing stack. Either this must be specified or elsestackmust be specified. -
getStack
public ProviderAsStack getStack()Provides a stack. Either this must be specified or elsestackProviderIDmust be specified. -
setStack
public void setStack(ProviderAsStack stack) Provides a stack. Either this must be specified or elsestackProviderIDmust be specified.
-