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 TypeMethodDescriptionvoidaddToStoreInferNames(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 theStacks.voidaddToStoreWithName(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 aTimeSeriesof stacks for a particular series number.intThe number of time-frames in the underlying input image.Methods inherited from class org.anchoranalysis.io.input.InputFromManagerDelegate
close, getDelegate, identifier, pathForBinding, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.anchoranalysis.io.input.InputFromManager
allAssociatedPaths, asFile, close, identifier, identifierAsPath, pathForBinding, pathForBindingRequiredMethods 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:StackSequenceInputCreates a supplier of aTimeSeriesof stacks for a particular series number.- Specified by:
createStackSequenceForSeriesin interfaceStackSequenceInput- Parameters:
seriesIndex- the index.logger- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- a newly created
TimeSeriesofStacks. - 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:ProvidesStackInputAdds any stacks exposed by the current element to a named-store of stacks - inferring the names of theStacks.- Specified by:
addToStoreInferNamesin 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:ProvidesStackInputAdds any stacks exposed by the current element to a named-store of stacks - with a particular name.- Specified by:
addToStoreWithNamein 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:ProvidesStackInputThe number of time-frames in the underlying input image.- Specified by:
numberFramesin interfaceProvidesStackInput- Returns:
- the number of time-frames.
- Throws:
OperationFailedException- if the operation cannot successfully complete.
-