Class ConvertNamedChannelsInputToStack
- All Implemented Interfaces:
ProvidesStackInput
,StackSequenceInput
,InputFromManager
public class ConvertNamedChannelsInputToStack
extends InputFromManagerDelegate<NamedChannelsInput>
implements StackSequenceInput
An input object that converts
NamedChannelsInput
to StackSequenceInput
.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionConvertNamedChannelsInputToStack
(NamedChannelsInput input, int timeIndex, Optional<String> channelName, ExecutionTimeRecorder executionTimeRecorder) Create with an input.ConvertNamedChannelsInputToStack
(NamedChannelsInput input, ExecutionTimeRecorder executionTimeRecorder) Create with an input. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.createStackSequenceForSeries
(int seriesIndex, Logger logger) Creates a supplier of aTimeSeries
of stacks for a particular series number.int
The number of time-frames in the underlying input image.Methods inherited from class org.anchoranalysis.io.input.InputFromManagerDelegate
close, getDelegate, identifier, pathForBinding, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.anchoranalysis.io.input.InputFromManager
allAssociatedPaths, asFile, close, identifier, identifierAsPath, pathForBinding, pathForBindingRequired
Methods inherited from interface org.anchoranalysis.image.io.stack.input.ProvidesStackInput
addToStoreInferNames, asSet, asStack
-
Constructor Details
-
ConvertNamedChannelsInputToStack
public ConvertNamedChannelsInputToStack(NamedChannelsInput input, ExecutionTimeRecorder executionTimeRecorder) Create with an input.- Parameters:
input
- the input to convert.executionTimeRecorder
- records the execution times of certain operations.
-
ConvertNamedChannelsInputToStack
public ConvertNamedChannelsInputToStack(NamedChannelsInput input, int timeIndex, Optional<String> channelName, ExecutionTimeRecorder executionTimeRecorder) Create with an input.- Parameters:
input
- the input to convert.timeIndex
- time-index to convert.channelName
- by default all channels are converted into a stack. If set, only this channel is converted into a stack.executionTimeRecorder
- records the execution times of certain operations.
-
-
Method Details
-
createStackSequenceForSeries
public TimeSeries createStackSequenceForSeries(int seriesIndex, Logger logger) throws ImageIOException Description copied from interface:StackSequenceInput
Creates a supplier of aTimeSeries
of stacks for a particular series number.- Specified by:
createStackSequenceForSeries
in interfaceStackSequenceInput
- Parameters:
seriesIndex
- the index.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- a newly created
TimeSeries
ofStack
s. - Throws:
ImageIOException
- if any stack could not be successfully read.
-
addToStoreInferNames
public void addToStoreInferNames(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException Description copied from interface:ProvidesStackInput
Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of theStack
s.- Specified by:
addToStoreInferNames
in interfaceProvidesStackInput
- 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
public void addToStoreWithName(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException Description copied from interface:ProvidesStackInput
Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.- Specified by:
addToStoreWithName
in interfaceProvidesStackInput
- 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.
-
numberFrames
Description copied from interface:ProvidesStackInput
The number of time-frames in the underlying input image.- Specified by:
numberFrames
in interfaceProvidesStackInput
- Returns:
- the number of time-frames.
- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-