public interface NamedChannelsMap extends ChannelGetter
Channel
s, each identified by a unique name and a time-index.
All contained Channel
s must have the same dimensions, irrespective of name and
time-index.
Modifier and Type | Method and Description |
---|---|
void |
addAsSeparateChannels(NamedProviderStore<TimeSeries> destination,
int timeIndex,
Logger logger)
|
void |
addAsSeparateChannels(NamedStacks destination,
int timeIndex,
Logger logger)
|
StoreSupplier<Stack> |
allChannelsAsStack(int timeIndex,
Logger logger)
Combines all channels as a single
Stack at a particular time-frame. |
Set<String> |
channelNames()
All channel-names.
|
Dimensions |
dimensions(Logger logger)
The dimensions of each
Channel . |
Optional<Channel> |
getChannelOptional(String channelName,
int timeIndex,
Logger logger)
Gets a channel if it exists, returning empty if it doesn't.
|
boolean |
isRGB(Logger logger)
Whether the channels describe an RGB image.
|
int |
numberChannels()
The number of channels that exist for the series.
|
int |
sizeT(Logger logger)
The number of frames along the time-axis.
|
getChannel, hasChannel
Optional<Channel> getChannelOptional(String channelName, int timeIndex, Logger logger) throws GetOperationFailedException
channelName
- name of channel.timeIndex
- point in time-series.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.GetOperationFailedException
- if something goes wrong getting an existing channel (but
never if a channel doesn't exist).int numberChannels()
Set<String> channelNames()
int sizeT(Logger logger) throws ImageIOException
logger
- a logger for any non-fatal errors. Fatal errors throw an exception.ImageIOException
- if unable to successfully determine the number of frames.Dimensions dimensions(Logger logger) throws ImageIOException
Channel
.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.ImageIOException
- if unable to successfully determine the dimensions.void addAsSeparateChannels(NamedStacks destination, int timeIndex, Logger logger) throws OperationFailedException
destination
- the NamedStacks
into which each Channel
is copied.timeIndex
- the index of the time-frame, beginning at zero.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.OperationFailedException
- if unable to add a Channel
.void addAsSeparateChannels(NamedProviderStore<TimeSeries> destination, int timeIndex, Logger logger) throws OperationFailedException
Channel
as a separate TimeSeries
in a NamedProviderStore
.
Although added as a TimeSeries
, each added Stack
will have only a
single-time frame at point 0, representing the channel found at timeIndex
.
destination
- the NamedStacks
into which each Channel
is copied.timeIndex
- the index of the time-frame, beginning at zero.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.OperationFailedException
- if unable to add a Channel
.StoreSupplier<Stack> allChannelsAsStack(int timeIndex, Logger logger)
Stack
at a particular time-frame.boolean isRGB(Logger logger) throws ImageIOException
In this case, there should be exactly three channels, named "red", "green" and "blue".
logger
- a logger for any non-fatal errors. Fatal errors throw an exception.ImageIOException
- if this cannot be successfully inferred.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.