Class OpenedMultiFile
Object
OpenedMultiFile
- All Implemented Interfaces:
AutoCloseable
,OpenedImageFile
A
OpenedImageFile
where the image is formed from more than one file on the file-system.
It ignores multiple series.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionOpenedMultiFile
(StackReader stackReader, ParsedFilePathBag fileBag, ExecutionTimeRecorder executionTimeRecorder) -
Method Summary
Modifier and TypeMethodDescriptionint
The bit-depth of the image voxels e.g. 8 for 8-bit, 16 for 16-bit etc.channelNames
(Logger logger) The names of each channel, if they are known.void
close()
Closes the opened image-file, removing any intermediate data-structures.dimensionsForSeries
(int seriesIndex, Logger logger) TheDimensions
associated with a particular series.boolean
Whether the image-file has RGB encoded voxels.int
numberChannels
(Logger logger) The number of channels in the image-file e.g. 1 for grayscale, 3 for RGB.int
numberFrames
(Logger logger) The number of frames in the image-file i.e. distinct images for a particular time-point.int
The number of series (distinct sets of images) in the image-file.Open when we don't have a specific-type.pyramid()
Metadata to describe an image-pyramid, if it exists for this opened-image.The timestamps and file-attributes associated with the image.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.anchoranalysis.image.io.stack.input.OpenedImageFile
metadata, open, openCheckType
-
Constructor Details
-
OpenedMultiFile
public OpenedMultiFile(StackReader stackReader, ParsedFilePathBag fileBag, ExecutionTimeRecorder executionTimeRecorder)
-
-
Method Details
-
numberSeries
public int numberSeries()Description copied from interface:OpenedImageFile
The number of series (distinct sets of images) in the image-file.- Specified by:
numberSeries
in interfaceOpenedImageFile
- Returns:
- the number of series.
-
open
Description copied from interface:OpenedImageFile
Open when we don't have a specific-type.- Specified by:
open
in interfaceOpenedImageFile
- Parameters:
seriesIndex
- the index of the series of the open, zero-indexed.logger
- the logger.- Returns:
- a time-sequence of images.
- Throws:
ImageIOException
- if an error occurs reading the image during this operation.
-
channelNames
Description copied from interface:OpenedImageFile
The names of each channel, if they are known.- Specified by:
channelNames
in interfaceOpenedImageFile
- Parameters:
logger
- the logger.- Returns:
- a list of the names, which should correspond (and have the same number of items) as
OpenedImageFile.numberChannels(Logger)
.
-
numberChannels
Description copied from interface:OpenedImageFile
The number of channels in the image-file e.g. 1 for grayscale, 3 for RGB.- Specified by:
numberChannels
in interfaceOpenedImageFile
- Parameters:
logger
- the logger.- Returns:
- the number of channels.
- Throws:
ImageIOException
- if an error occurs reading the image to determine this information.
-
bitDepth
Description copied from interface:OpenedImageFile
The bit-depth of the image voxels e.g. 8 for 8-bit, 16 for 16-bit etc.- Specified by:
bitDepth
in interfaceOpenedImageFile
- Parameters:
logger
- the logger.- Returns:
- the bit-depth.
- Throws:
ImageIOException
- if an error occurs reading the image to determine this information.
-
isRGB
Description copied from interface:OpenedImageFile
Whether the image-file has RGB encoded voxels.- Specified by:
isRGB
in interfaceOpenedImageFile
- Parameters:
logger
- the logger.- Returns:
- true if the image has RGB or RGBA encoded voxels, false otherwise.
- Throws:
ImageIOException
- if an error occurs reading the image to determine this information.
-
numberFrames
Description copied from interface:OpenedImageFile
The number of frames in the image-file i.e. distinct images for a particular time-point.- Specified by:
numberFrames
in interfaceOpenedImageFile
- Parameters:
logger
- the logger.- Returns:
- the number of frames.
- Throws:
ImageIOException
- if an error occurs reading the image to determine this information.
-
timestamps
Description copied from interface:OpenedImageFile
The timestamps and file-attributes associated with the image.- Specified by:
timestamps
in interfaceOpenedImageFile
- Returns:
- timestamps and file-attributes, either newly-created or reused.
- Throws:
ImageIOException
- if an error occurs reading the image to determine this information.
-
close
Description copied from interface:OpenedImageFile
Closes the opened image-file, removing any intermediate data-structures.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceOpenedImageFile
- Throws:
ImageIOException
-
dimensionsForSeries
Description copied from interface:OpenedImageFile
TheDimensions
associated with a particular series.- Specified by:
dimensionsForSeries
in interfaceOpenedImageFile
- 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 any filesystem-related input-output failure occurs.
-
pyramid
Description copied from interface:OpenedImageFile
Metadata to describe an image-pyramid, if it exists for this opened-image.- Specified by:
pyramid
in interfaceOpenedImageFile
- Returns:
- the metadata, or
Optional.empty()
if no pyramid exists. - Throws:
ImageIOException
- if an error occurs reading the image to determine this information.
-