Class NamedChannelsInput
Object
NamedChannelsInput
- All Implemented Interfaces:
ProvidesStackInput
,InputFromManager
- Direct Known Subclasses:
NamedChannelsInputPart
Provides a set of channels as an input, with each channel having a name.
Only the first time-point is considered from each series.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
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.abstract int
Bit-depth of image.abstract NamedChannelsMap
createChannelsForSeries
(int seriesIndex, Logger logger) Creates aNamedChannelsMap
representing the channels for a particular series in this input.abstract Dimensions
dimensions
(int seriesIndex, Logger logger) Dimensions of a particular series.abstract ImageMetadata
The image-metadata associated with a particular series.abstract int
numberChannels
(Logger logger) Number of channels.int
The number of time-frames in the underlying input image.abstract int
Number of series that exist.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
-
NamedChannelsInput
public NamedChannelsInput()
-
-
Method Details
-
numberSeries
Number of series that exist.- Returns:
- the number of series.
- Throws:
ImageIOException
- if the information cannot be successfully retrieved from the underlying image.
-
dimensions
Dimensions of a particular series.- Parameters:
seriesIndex
- the index of the series.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- the corresponding dimensions.
- Throws:
ImageIOException
- if the information cannot be successfully retrieved from the underlying image.
-
numberChannels
Number of channels.- Parameters:
logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- the number of channels.
- Throws:
ImageIOException
- if the information cannot be successfully retrieved from the underlying image.
-
bitDepth
Bit-depth of image.- Parameters:
logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Returns:
- the bit-depth.
- Throws:
ImageIOException
- if the information cannot be successfully retrieved from the underlying image.
-
createChannelsForSeries
public abstract NamedChannelsMap createChannelsForSeries(int seriesIndex, Logger logger) throws ImageIOException Creates aNamedChannelsMap
representing the channels for a particular series in this input.- Parameters:
seriesIndex
- the index of the series to use (beginning at 0).logger
- the logger where informative or non-fatal error messages amy be written.- Returns:
- a newly created
NamedChannelsMap
bound toseriesIndex
. - Throws:
ImageIOException
- if the operation cannot successfully complete.
-
metadata
The image-metadata associated with a particular series.- Parameters:
seriesIndex
- the index of the series.logger
- the logger.- Returns:
- the metadata.
- Throws:
ImageIOException
- if the metadata cannot be calculated.
-
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
public int 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.
-