public interface OpenedImageFile extends AutoCloseable
Stack
s.Modifier and Type | Method and Description |
---|---|
int |
bitDepth(Logger logger)
The bit-depth of the image voxels e.g.
|
Optional<List<String>> |
channelNames(Logger logger)
The names of each channel, if they are known.
|
void |
close()
Closes the opened image-file, removing any intermediate data-structures.
|
Dimensions |
dimensionsForSeries(int seriesIndex,
Logger logger)
The
Dimensions associated with a particular series. |
boolean |
isRGB(Logger logger)
Whether the image-file has RGB encoded voxels.
|
default ImageMetadata |
metadata(int seriesIndex,
Logger logger)
Extracts metadata about the image.
|
int |
numberChannels(Logger logger)
The number of channels in the image-file e.g.
|
int |
numberFrames(Logger logger)
The number of frames in the image-file i.e.
|
int |
numberSeries()
The number of series (distinct sets of images) in the image-file.
|
TimeSeries |
open(int seriesIndex,
Logger logger)
Open when we don't have a specific-type.
|
default TimeSeries |
open(Logger logger)
Open the first series when we don't have a specific-type.
|
default TimeSeries |
openCheckType(int seriesIndex,
VoxelDataType channelDataType,
Logger logger)
Opens a time-series, and checks that it is a particular type.
|
Optional<ImagePyramidMetadata> |
pyramid()
Metadata to describe an image-pyramid, if it exists for this opened-image.
|
ImageTimestampsAttributes |
timestamps()
The timestamps and file-attributes associated with the image.
|
default TimeSeries openCheckType(int seriesIndex, VoxelDataType channelDataType, Logger logger) throws ImageIOException
If it's not the correct type, an error is thrown.
seriesIndex
- the index of the series to open.channelDataType
- the expected data-type of the channels.logger
- the logger.TimeSeries
of images for the series.ImageIOException
- if an error occurs reading the image during this operation.default TimeSeries open(Logger logger) throws ImageIOException
logger
- the logger.ImageIOException
- if an error occurs reading the image to determine this information.TimeSeries open(int seriesIndex, Logger logger) throws ImageIOException
seriesIndex
- the index of the series of the open, zero-indexed.logger
- the logger.ImageIOException
- if an error occurs reading the image during this operation.int numberSeries()
Optional<List<String>> channelNames(Logger logger) throws ImageIOException
logger
- the logger.numberChannels(Logger)
.ImageIOException
- if an error occurs reading the image to determine this information.int numberChannels(Logger logger) throws ImageIOException
logger
- the logger.ImageIOException
- if an error occurs reading the image to determine this information.int numberFrames(Logger logger) throws ImageIOException
logger
- the logger.ImageIOException
- if an error occurs reading the image to determine this information.int bitDepth(Logger logger) throws ImageIOException
logger
- the logger.ImageIOException
- if an error occurs reading the image to determine this information.ImageTimestampsAttributes timestamps() throws ImageIOException
ImageIOException
- if an error occurs reading the image to determine this information.Optional<ImagePyramidMetadata> pyramid() throws ImageIOException
Optional.empty()
if no pyramid exists.ImageIOException
- if an error occurs reading the image to determine this information.boolean isRGB(Logger logger) throws ImageIOException
logger
- the logger.ImageIOException
- if an error occurs reading the image to determine this information.void close() throws ImageIOException
close
in interface AutoCloseable
ImageIOException
Dimensions dimensionsForSeries(int seriesIndex, Logger logger) throws ImageIOException
Dimensions
associated with a particular series.seriesIndex
- the index of the series.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.ImageIOException
- if any filesystem-related input-output failure occurs.default ImageMetadata metadata(int seriesIndex, Logger logger) throws ImageIOException
This may be called without later retrieving a channel from the image, so it is desirable that it is as computationally efficient as possible, for this use case.
seriesIndex
- the index of the series.logger
- the logger.ImageIOException
- if any filesystem-related input-output failure occurs.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.