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 TypeMethodDescriptionintThe 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.voidclose()Closes the opened image-file, removing any intermediate data-structures.dimensionsForSeries(int seriesIndex, Logger logger) TheDimensionsassociated with a particular series.booleanWhether the image-file has RGB encoded voxels.location()The location associated with the image, if it is known.intnumberChannels(Logger logger) The number of channels in the image-file e.g. 1 for grayscale, 3 for RGB.intnumberFrames(Logger logger) The number of frames in the image-file i.e. distinct images for a particular time-point.intThe 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, waitMethods 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:OpenedImageFileThe number of series (distinct sets of images) in the image-file.- Specified by:
numberSeriesin interfaceOpenedImageFile- Returns:
- the number of series.
-
open
Description copied from interface:OpenedImageFileOpen when we don't have a specific-type.- Specified by:
openin 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:OpenedImageFileThe names of each channel, if they are known.- Specified by:
channelNamesin 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:OpenedImageFileThe number of channels in the image-file e.g. 1 for grayscale, 3 for RGB.- Specified by:
numberChannelsin 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:OpenedImageFileThe bit-depth of the image voxels e.g. 8 for 8-bit, 16 for 16-bit etc.- Specified by:
bitDepthin 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:OpenedImageFileWhether the image-file has RGB encoded voxels.- Specified by:
isRGBin 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:OpenedImageFileThe number of frames in the image-file i.e. distinct images for a particular time-point.- Specified by:
numberFramesin 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:OpenedImageFileThe timestamps and file-attributes associated with the image.- Specified by:
timestampsin interfaceOpenedImageFile- Returns:
- timestamps and file-attributes, either newly-created or reused.
- Throws:
ImageIOException- if an error occurs reading the image to determine this information.
-
location
Description copied from interface:OpenedImageFileThe location associated with the image, if it is known.- Specified by:
locationin interfaceOpenedImageFile- Returns:
- the image location, or
Optional.empty()if no location is known. - Throws:
ImageIOException- if an error occurs reading the image to determine this information.
-
close
Description copied from interface:OpenedImageFileCloses the opened image-file, removing any intermediate data-structures.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceOpenedImageFile- Throws:
ImageIOException
-
dimensionsForSeries
Description copied from interface:OpenedImageFileTheDimensionsassociated with a particular series.- Specified by:
dimensionsForSeriesin 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:OpenedImageFileMetadata to describe an image-pyramid, if it exists for this opened-image.- Specified by:
pyramidin interfaceOpenedImageFile- Returns:
- the metadata, or
Optional.empty()if no pyramid exists. - Throws:
ImageIOException- if an error occurs reading the image to determine this information.
-