Interface ProvidesStackInput
- All Superinterfaces:
InputFromManager
- All Known Subinterfaces:
StackSequenceInput
- All Known Implementing Classes:
ConvertNamedChannelsInputToStack
,MultiInput
,NamedChannelsInput
,NamedChannelsInputPart
Base class for inputs which somehow eventually send up providing stacks, with or without names.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
addToStoreInferNames
(NamedProviderStore<Stack> store, Logger logger) Adds the current object to a named-store of stacks (using the default series).void
addToStoreInferNames
(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of theStack
s.void
addToStoreWithName
(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.default NamedStacks
Exposes the input as a set of named stacks (inferring the names).default Stack
Exposes the input as a singleStack
throw an error if more than one exists.int
The number of time-frames in the underlying input image.Methods inherited from interface org.anchoranalysis.io.input.InputFromManager
allAssociatedPaths, asFile, close, identifier, identifierAsPath, pathForBinding, pathForBindingRequired
-
Method Details
-
asStack
Exposes the input as a singleStack
throw an error if more than one exists.- Parameters:
logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- the single stack.
- Throws:
OperationFailedException
- if more than one stack exists, or otherwise a fatal error occurs loading the stacks.
-
asSet
Exposes the input as a set of named stacks (inferring the names).- Parameters:
logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- a set of named-stacks.
- Throws:
OperationFailedException
- if a fatal error occurs loading the stack.
-
addToStoreInferNames
default void addToStoreInferNames(NamedProviderStore<Stack> store, Logger logger) throws OperationFailedException Adds the current object to a named-store of stacks (using the default series).- Parameters:
store
- the store.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-
numberFrames
The number of time-frames in the underlying input image.- Returns:
- the number of time-frames.
- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-
addToStoreInferNames
void addToStoreInferNames(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of theStack
s.- Parameters:
stacks
- the named-store of stacks.seriesIndex
- the index of the series (beginning at 0) to retrieve stacks from theTimeSeries
.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-
addToStoreWithName
void addToStoreWithName(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.- Parameters:
name
- the name to use for the added stack.stacks
- the named-store of stacks.seriesIndex
- the index of the series (beginning at 0) to retrieve stacks from theTimeSeries
.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-