Class FromStack
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
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
ConstructorsConstructorDescriptionFromStack
(ProviderAsStack stack) Creates a new instance with a specified stack provider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkMisconfigured
(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.get()
Gets or creates an object of typeT
.int
The index of the channel to extract from the stack.getStack()
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
-
Constructor Details
-
FromStack
Creates a new instance with a specified stack provider.- Parameters:
stack
- theProviderAsStack
to use for providing the stack
-
FromStack
public FromStack()
-
-
Method Details
-
checkMisconfigured
Description copied from class:AnchorBean
Checks that a bean's properties conform to expectations.- Overrides:
checkMisconfigured
in classAnchorBean<ChannelProvider>
- Parameters:
defaultInstances
- all available default instances if theDefaultInstance
annotation is used- Throws:
BeanMisconfiguredException
- if the bean has not been configured properly as XML
-
get
Description copied from interface:Provider
Gets or creates an object of typeT
.- Returns:
- the object returned by the provider.
- Throws:
ProvisionFailedException
- if the object cannot be returned.
-
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 elsestack
must be specified. -
setStackProviderID
Specifies the ID of an existing stack. Either this must be specified or elsestack
must be specified. -
getStack
Provides a stack. Either this must be specified or elsestackProviderID
must be specified. -
setStack
Provides a stack. Either this must be specified or elsestackProviderID
must be specified.
-