Interface NamedChannelsMap
- All Superinterfaces:
- ChannelGetter
- All Known Implementing Classes:
- NamedChannelsConcatenate,- OpenedNamedChannels
A collection of 
Channels, each identified by a unique name and a time-index.
 All contained Channels must have the same dimensions, irrespective of name and
 time-index.
- Author:
- Owen Feehan
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAsSeparateChannels(NamedProviderStore<TimeSeries> destination, int timeIndex, Logger logger) voidaddAsSeparateChannels(NamedStacks destination, int timeIndex, Logger logger) allChannelsAsStack(int timeIndex, Logger logger) Combines all channels as a singleStackat a particular time-frame.All channel-names.dimensions(Logger logger) The dimensions of eachChannel.getChannelOptional(String channelName, int timeIndex, Logger logger) Gets a channel if it exists, returning empty if it doesn't.booleanWhether the channels describe an RGB image.intThe number of channels that exist for the series.intThe number of frames along the time-axis.Methods inherited from interface org.anchoranalysis.image.io.channel.input.ChannelGettergetChannel, hasChannel
- 
Method Details- 
getChannelOptionalOptional<Channel> getChannelOptional(String channelName, int timeIndex, Logger logger) throws GetOperationFailedException Gets a channel if it exists, returning empty if it doesn't.- Parameters:
- channelName- name of channel.
- timeIndex- point in time-series.
- logger- a logger for any non-fatal errors. Fatal errors throw an exception.
- Returns:
- the channel if it exists, or empty otherwise.
- Throws:
- GetOperationFailedException- if something goes wrong getting an existing channel (but never if a channel doesn't exist).
 
- 
numberChannelsint numberChannels()The number of channels that exist for the series.- Returns:
- the number of channels.
 
- 
channelNamesAll channel-names.- Returns:
- a set view of all channel-names in the map.
 
- 
sizeTThe number of frames along the time-axis.- Parameters:
- logger- a logger for any non-fatal errors. Fatal errors throw an exception.
- Returns:
- the number of time-frames.
- Throws:
- ImageIOException- if unable to successfully determine the number of frames.
 
- 
dimensionsThe dimensions of eachChannel.- Parameters:
- logger- a logger for any non-fatal errors. Fatal errors throw an exception.
- Returns:
- the dimensions.
- Throws:
- ImageIOException- if unable to successfully determine the dimensions.
 
- 
addAsSeparateChannelsvoid addAsSeparateChannels(NamedStacks destination, int timeIndex, Logger logger) throws OperationFailedException - Parameters:
- destination- the- NamedStacksinto which each- Channelis copied.
- timeIndex- the index of the time-frame, beginning at zero.
- logger- a logger for any non-fatal errors. Fatal errors throw an exception.
- Throws:
- OperationFailedException- if unable to add a- Channel.
 
- 
addAsSeparateChannelsvoid addAsSeparateChannels(NamedProviderStore<TimeSeries> destination, int timeIndex, Logger logger) throws OperationFailedException Adds eachChannelas a separateTimeSeriesin aNamedProviderStore.Although added as a TimeSeries, each addedStackwill have only a single-time frame at point 0, representing the channel found attimeIndex.- Parameters:
- destination- the- NamedStacksinto which each- Channelis copied.
- timeIndex- the index of the time-frame, beginning at zero.
- logger- a logger for any non-fatal errors. Fatal errors throw an exception.
- Throws:
- OperationFailedException- if unable to add a- Channel.
 
- 
allChannelsAsStackCombines all channels as a singleStackat a particular time-frame.
- 
isRGBWhether the channels describe an RGB image.In this case, there should be exactly three channels, named "red", "green" and "blue". - Parameters:
- logger- a logger for any non-fatal errors. Fatal errors throw an exception.
- Returns:
- true if the channels describe an RGB image.
- Throws:
- ImageIOException- if this cannot be successfully inferred.
 
 
-