public class ImageReader extends java.lang.Object implements IFormatReader
Modifier and Type | Field and Description |
---|---|
private boolean |
allowOpen |
private int |
current
Current form index.
|
private java.lang.String |
currentId
Name of current file.
|
private static ClassList<IFormatReader> |
defaultClasses
Default list of reader classes, for use with noargs constructor.
|
private static org.slf4j.Logger |
LOGGER |
private static java.util.concurrent.atomic.AtomicBoolean |
raisedException |
private IFormatReader[] |
readers
List of supported file format readers.
|
private java.lang.String[] |
suffixes
Valid suffixes for this file format.
|
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
Constructor and Description |
---|
ImageReader()
Constructs a new ImageReader with the default
list of reader classes from readers.txt.
|
ImageReader(ClassList<IFormatReader> classList)
Constructs a new ImageReader from the given list of reader classes.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
close(boolean fileOnly)
Closes the currently open file.
|
int |
coreIndexToSeries(int index)
Returns the series corresponding to the specified core index.
|
int |
fileGroupOption(java.lang.String id)
Returns an indication of whether the files in a multi-file dataset can
be handled individually.
|
short[][] |
get16BitLookupTable()
Gets the 16-bit color lookup table associated with
the most recently opened image.
|
byte[][] |
get8BitLookupTable()
Gets the 8-bit color lookup table associated with
the most recently opened image.
|
FileInfo[] |
getAdvancedSeriesUsedFiles(boolean noPixels)
Returns an array of FileInfo objects representing the files needed to
open the current series.
|
FileInfo[] |
getAdvancedUsedFiles(boolean noPixels)
Returns an array of FileInfo objects representing the files needed
to open this dataset.
|
int |
getBitsPerPixel()
Gets the number of valid bits per pixel.
|
int |
getCoreIndex()
Return the index into CoreMetadata of the current resolution/series.
|
java.util.List<CoreMetadata> |
getCoreMetadataList()
Obtains the core metadata values for the current file.
|
java.lang.String |
getCurrentFile()
Returns the current file.
|
java.lang.String |
getDatasetStructureDescription()
Returns a short description of the dataset structure.
|
static ClassList<IFormatReader> |
getDefaultReaderClasses() |
java.lang.String |
getDimensionOrder()
Gets a five-character string representing the
dimension order in which planes will be returned.
|
java.lang.String[] |
getDomains()
Returns the list of domains represented by the current file.
|
int |
getEffectiveSizeC()
Gets the effective size of the C dimension, guaranteeing that
getEffectiveSizeC() * getSizeZ() * getSizeT() == getImageCount()
regardless of the result of isRGB().
|
java.lang.Byte |
getFillColor()
Return the fill value for undefined pixels.
|
java.lang.String |
getFormat()
Gets the name of this file format.
|
java.lang.String |
getFormat(java.lang.String id)
Gets a string describing the file format for the given file.
|
java.util.Hashtable<java.lang.String,java.lang.Object> |
getGlobalMetadata()
Obtains the hashtable containing the metadata field/value pairs from
the current file.
|
int |
getImageCount()
Determines the number of image planes in the current file.
|
int |
getIndex(int z,
int c,
int t)
Gets the rasterized index corresponding
to the given Z, C and T coordinates (real sizes).
|
int |
getIndex(int z,
int c,
int t,
int moduloZ,
int moduloC,
int moduloT)
Gets the rasterized index corresponding to the given Z, C, T,
moduloZ, moduloC and moduloT coordinates (effective sizes).
|
MetadataOptions |
getMetadataOptions() |
MetadataStore |
getMetadataStore()
Retrieves the current metadata store for this reader.
|
java.lang.Object |
getMetadataStoreRoot()
Retrieves the current metadata store's root object.
|
java.lang.Object |
getMetadataValue(java.lang.String field)
Obtains the specified metadata field's value for the current file.
|
Modulo |
getModuloC() |
Modulo |
getModuloT() |
Modulo |
getModuloZ() |
java.lang.Class<?> |
getNativeDataType()
Returns the native data type of image planes for this reader, as returned
by
IFormatReader.openPlane(int, int, int, int, int) or IFormatWriter.savePlane(int, java.lang.Object) . |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
int |
getOptimalTileWidth()
Returns the optimal sub-image width for use with openBytes.
|
int |
getPixelType()
Gets the pixel type.
|
java.lang.String[] |
getPossibleDomains(java.lang.String id)
Returns a list of scientific domains in which this format is used.
|
IFormatReader |
getReader()
Gets the reader used to open the current file.
|
IFormatReader |
getReader(java.lang.Class<? extends IFormatReader> c)
Gets the file format reader instance matching the given class.
|
IFormatReader |
getReader(java.lang.String id)
Gets the reader used to open the given file.
|
IFormatReader[] |
getReaders()
Gets all constituent file format readers.
|
int |
getRequiredDirectories(java.lang.String[] files)
Returns the number of parent directories that are important when
processing the given list of files.
|
int |
getResolution()
Get the current resolution level.
|
int |
getResolutionCount()
Return the number of resolutions for the current series.
|
int |
getRGBChannelCount()
Gets the number of channels returned with each call to openBytes.
|
int |
getSeries()
Gets the currently active series.
|
int |
getSeriesCount()
Gets the number of series in this file.
|
java.util.Hashtable<java.lang.String,java.lang.Object> |
getSeriesMetadata()
Obtains the hashtable containing metadata field/value pairs from the
current series in the current file.
|
java.lang.Object |
getSeriesMetadataValue(java.lang.String field)
Obtains the specified metadata field's value for the current series
in the current file.
|
java.lang.String[] |
getSeriesUsedFiles()
Returns an array of filenames needed to open the current series.
|
java.lang.String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
int |
getSizeC()
Gets the size of the C dimension.
|
int |
getSizeT()
Gets the size of the T dimension.
|
int |
getSizeX()
Gets the size of the X dimension.
|
int |
getSizeY()
Gets the size of the Y dimension.
|
int |
getSizeZ()
Gets the size of the Z dimension.
|
java.lang.String[] |
getSuffixes()
Gets the default file suffixes for this file format.
|
java.util.Set<MetadataLevel> |
getSupportedMetadataLevels() |
int |
getThumbSizeX()
Get the size of the X dimension for the thumbnail.
|
int |
getThumbSizeY()
Get the size of the Y dimension for the thumbnail.
|
Codec |
getTileCodec(int no)
Retrieve a codec that can be used to decompress compressed tiles.
|
CodecOptions |
getTileCodecOptions(int no,
int x,
int y)
Retrieve codec options that can be used to decompressed the specified tile.
|
int |
getTileColumns(int no)
Get the number of columns of tiles in the specified plane in the current series.
|
int |
getTileRows(int no)
Get the number of rows of tiles in the specified plane in the current series.
|
IFormatReader[] |
getUnderlyingReaders()
Retrieves all underlying readers.
|
java.lang.String[] |
getUsedFiles()
Returns an array of filenames needed to open this dataset.
|
java.lang.String[] |
getUsedFiles(boolean noPixels)
Returns an array of filenames needed to open this dataset.
|
int[] |
getZCTCoords(int index)
Gets the Z, C and T coordinates (real sizes) corresponding to the
given rasterized index value.
|
int[] |
getZCTModuloCoords(int index)
Gets the Z, C, T, moduloZ, moduloC and moduloT coordinates
(effective sizes) corresponding to the given rasterized index
value.
|
boolean |
hasCompanionFiles()
Returns true if this format supports multi-file datasets.
|
boolean |
hasFlattenedResolutions()
Return whether or not resolution flattening is enabled.
|
boolean |
isFalseColor()
Returns false if
IFormatReader.isIndexed() is false, or if IFormatReader.isIndexed()
is true and the lookup table represents "real" color data. |
boolean |
isGroupFiles()
Returns true if we should group files in multi-file formats.
|
boolean |
isIndexed()
Gets whether the image planes are indexed color.
|
boolean |
isInterleaved()
Gets whether or not the channels are interleaved.
|
boolean |
isInterleaved(int subC)
Gets whether or not the given sub-channel is interleaved.
|
boolean |
isLittleEndian()
Gets whether the data is in little-endian format.
|
boolean |
isMetadataComplete()
Returns true if this format's metadata is completely parsed.
|
boolean |
isMetadataFiltered()
Returns true if ugly metadata (entries with unprintable characters,
and extremely large entries) are discarded from the metadata table.
|
boolean |
isNormalized()
Returns true if we should normalize float data.
|
private boolean |
isOmero(java.lang.String id) |
boolean |
isOrderCertain()
Gets whether the dimension order and sizes are known, or merely guesses.
|
boolean |
isOriginalMetadataPopulated()
Returns true if we should save proprietary metadata
in the MetadataStore.
|
boolean |
isRGB()
Checks if the image planes in the file have more than one channel per
IFormatReader.openBytes(int) call. |
boolean |
isSingleFile(java.lang.String id)
Returns true if the named file is expected to be the only
file in the dataset.
|
boolean |
isThisType(byte[] block)
Checks if the given block is a valid header for this file format.
|
private boolean |
isThisType(IFormatReader reader,
byte[] block) |
private boolean |
isThisType(IFormatReader reader,
loci.common.RandomAccessInputStream rais) |
private boolean |
isThisType(IFormatReader reader,
java.lang.String name,
boolean allowOpen) |
boolean |
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
boolean |
isThisType(java.lang.String name)
Checks if the given string is a valid filename for this file format.
|
boolean |
isThisType(java.lang.String name,
boolean open)
Checks if the given file is a valid instance of this file format.
|
boolean |
isThumbnailSeries()
Gets whether the current series is a lower resolution copy of a different
series.
|
private void |
logIsThisTypeError(IFormatReader reader,
java.lang.Exception e) |
byte[] |
openBytes(int no)
Obtains the specified image plane from the current file as a byte array.
|
byte[] |
openBytes(int no,
byte[] buf)
Obtains the specified image plane from the current file into a
pre-allocated byte array of
(sizeX * sizeY * bytesPerPixel * RGB channel count).
|
byte[] |
openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Obtains a sub-image of the specified image plane
into a pre-allocated byte array.
|
byte[] |
openBytes(int no,
int x,
int y,
int w,
int h)
Obtains a sub-image of the specified image plane,
whose upper-left corner is given by (x, y).
|
byte[] |
openCompressedBytes(int no,
byte[] buf,
int x,
int y)
Retrieve the specified tile without performing any decompression.
|
byte[] |
openCompressedBytes(int no,
int x,
int y)
Retrieve the specified tile without performing any decompression.
|
java.lang.Object |
openPlane(int no,
int x,
int y,
int w,
int h)
Obtains the specified image plane (or sub-image thereof) in the reader's
native data structure.
|
byte[] |
openThumbBytes(int no)
Obtains a thumbnail for the specified image plane from the current file,
as a byte array.
|
void |
reopenFile()
Reopen any files that were closed, and which are expected to be open
while the reader is open.
|
int |
seriesToCoreIndex(int series)
Returns the first core index corresponding to the specified series.
|
void |
setAllowOpenFiles(boolean allowOpen)
Toggles whether or not file system access is allowed when doing type
detection.
|
void |
setCoreIndex(int no)
Set the current resolution/series (ignores subresolutions).
|
void |
setFillColor(java.lang.Byte fill)
Set the fill value for undefined pixels.
|
void |
setFlattenedResolutions(boolean flattened)
Set whether or not to flatten resolutions into individual series.
|
void |
setGroupFiles(boolean group)
Specifies whether or not to force grouping in multi-file formats.
|
void |
setId(java.lang.String id)
Sets the current file name.
|
void |
setMetadataFiltered(boolean filter)
Specifies whether ugly metadata (entries with unprintable characters,
and extremely large entries) should be discarded from the metadata table.
|
void |
setMetadataOptions(MetadataOptions options) |
void |
setMetadataStore(MetadataStore store)
Sets the default metadata store for this reader.
|
void |
setNormalized(boolean normalize)
Specifies whether or not to normalize float data.
|
void |
setOriginalMetadataPopulated(boolean populate)
Specifies whether or not to save proprietary metadata
in the MetadataStore.
|
void |
setResolution(int no)
Set the resolution level.
|
void |
setSeries(int no)
Activates the specified series.
|
private static final org.slf4j.Logger LOGGER
private static ClassList<IFormatReader> defaultClasses
private IFormatReader[] readers
private java.lang.String[] suffixes
private java.lang.String currentId
private int current
private boolean allowOpen
private static java.util.concurrent.atomic.AtomicBoolean raisedException
public ImageReader()
public ImageReader(ClassList<IFormatReader> classList)
public static ClassList<IFormatReader> getDefaultReaderClasses()
private boolean isOmero(java.lang.String id)
public void setAllowOpenFiles(boolean allowOpen)
public java.lang.String getFormat(java.lang.String id) throws FormatException, java.io.IOException
FormatException
java.io.IOException
public IFormatReader getReader(java.lang.String id) throws FormatException, java.io.IOException
FormatException
java.io.IOException
public IFormatReader getReader()
public IFormatReader getReader(java.lang.Class<? extends IFormatReader> c)
public IFormatReader[] getReaders()
public java.util.Set<MetadataLevel> getSupportedMetadataLevels()
getSupportedMetadataLevels
in interface IMetadataConfigurable
public MetadataOptions getMetadataOptions()
getMetadataOptions
in interface IMetadataConfigurable
public void setMetadataOptions(MetadataOptions options)
setMetadataOptions
in interface IMetadataConfigurable
IMetadataConfigurable.setMetadataOptions(MetadataOptions)
public boolean isThisType(java.lang.String name, boolean open)
IFormatReader
isThisType
in interface IFormatReader
open
- If true, and the file extension is insufficient to determine
the file type, the file may be opened for further analysis, or other
relatively expensive file system operations (such as file existence
tests and directory listings) may be performed. If false, file system
access is not allowed.public boolean isThisType(byte[] block)
IFormatReader
isThisType
in interface IFormatReader
IFormatReader.isThisType(RandomAccessInputStream)
public boolean isThisType(loci.common.RandomAccessInputStream stream) throws java.io.IOException
IFormatReader
isThisType
in interface IFormatReader
stream
- A RandomAccessInputStream representing the file to check.
The first byte in the stream is assumed to be the first byte
in the file.java.io.IOException
public int getImageCount()
IFormatReader
getImageCount
in interface IFormatReader
public boolean isRGB()
IFormatReader
IFormatReader.openBytes(int)
call.
This method returns true if and only if IFormatReader.getRGBChannelCount()
returns a value greater than 1.isRGB
in interface IFormatReader
public int getSizeX()
IFormatReader
getSizeX
in interface IFormatReader
public int getSizeY()
IFormatReader
getSizeY
in interface IFormatReader
public int getSizeC()
IFormatReader
getSizeC
in interface IFormatReader
public int getSizeZ()
IFormatReader
getSizeZ
in interface IFormatReader
public int getSizeT()
IFormatReader
getSizeT
in interface IFormatReader
public int getPixelType()
IFormatReader
getPixelType
in interface IFormatReader
FormatTools
static pixel types such as FormatTools.INT8
.public int getBitsPerPixel()
IFormatReader
IFormatReader.getPixelType()
.getBitsPerPixel
in interface IFormatReader
public int getEffectiveSizeC()
IFormatReader
getEffectiveSizeC
in interface IFormatReader
public int getRGBChannelCount()
IFormatReader
getRGBChannelCount
in interface IFormatReader
public boolean isIndexed()
IFormatReader
IFormatReader.getSizeC()
,
IFormatReader.getEffectiveSizeC()
or IFormatReader.getRGBChannelCount()
.isIndexed
in interface IFormatReader
public boolean isFalseColor()
IFormatReader
IFormatReader.isIndexed()
is false, or if IFormatReader.isIndexed()
is true and the lookup table represents "real" color data. Returns true
if IFormatReader.isIndexed()
is true and the lookup table is only present to aid
in visualization.isFalseColor
in interface IFormatReader
public byte[][] get8BitLookupTable() throws FormatException, java.io.IOException
IFormatReader
IFormatReader.isIndexed()
returns
false, then this may return null. Also, if IFormatReader.getPixelType()
returns
anything other than FormatTools.INT8
or FormatTools.UINT8
,
this method will return null.get8BitLookupTable
in interface IFormatReader
FormatException
java.io.IOException
public short[][] get16BitLookupTable() throws FormatException, java.io.IOException
IFormatReader
IFormatReader.isIndexed()
returns
false, then this may return null. Also, if IFormatReader.getPixelType()
returns
anything other than FormatTools.INT16
or FormatTools.UINT16
, this method will return null.get16BitLookupTable
in interface IFormatReader
FormatException
java.io.IOException
public Modulo getModuloZ()
getModuloZ
in interface IFormatReader
public Modulo getModuloC()
getModuloC
in interface IFormatReader
public Modulo getModuloT()
getModuloT
in interface IFormatReader
public int getThumbSizeX()
IFormatReader
getThumbSizeX
in interface IFormatReader
public int getThumbSizeY()
IFormatReader
getThumbSizeY
in interface IFormatReader
public boolean isLittleEndian()
IFormatReader
isLittleEndian
in interface IFormatReader
public java.lang.String getDimensionOrder()
IFormatReader
IFormatReader.isInterleaved()
method will return true.getDimensionOrder
in interface IFormatReader
public boolean isOrderCertain()
IFormatReader
isOrderCertain
in interface IFormatReader
public boolean isThumbnailSeries()
IFormatReader
isThumbnailSeries
in interface IFormatReader
public boolean isInterleaved()
IFormatReader
IFormatReader.getDimensionOrder()
returns XYCTZ or XYCZT,
and this method returns true.
Note that this flag returns whether or not the data returned by
IFormatReader.openBytes(int)
is interleaved. In most cases, this will
match the interleaving in the original file, but for some formats (e.g.
TIFF) channel re-ordering is done internally and the return value of
this method will not match what is in the original file.isInterleaved
in interface IFormatReader
public boolean isInterleaved(int subC)
IFormatReader
SDTReader
handles spectral-lifetime data with
interleaved lifetime bins and non-interleaved spectral channels.isInterleaved
in interface IFormatReader
public byte[] openBytes(int no) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
FormatException
java.io.IOException
IFormatReader.openBytes(int, byte[])
public byte[] openBytes(int no, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
FormatException
java.io.IOException
public byte[] openBytes(int no, byte[] buf) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
no
- the plane index within the current series.buf
- a pre-allocated buffer.buf
for convenience.FormatException
- if there was a problem parsing the metadata of the
file.java.io.IOException
- if there was a problem reading the file.public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
no
- the plane index within the current series.buf
- a pre-allocated buffer.x
- X coordinate of the upper-left corner of the sub-imagey
- Y coordinate of the upper-left corner of the sub-imagew
- width of the sub-imageh
- height of the sub-imagebuf
for convenience.FormatException
- if there was a problem parsing the metadata of the
file.java.io.IOException
- if there was a problem reading the file.public java.lang.Object openPlane(int no, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatReader
BufferedImage
. The openPlane method exists to
maintain generality and efficiency while avoiding pollution of the API
with AWT-specific logic.openPlane
in interface IFormatReader
FormatException
java.io.IOException
FormatReader
,
BufferedImageReader
public byte[] openThumbBytes(int no) throws FormatException, java.io.IOException
IFormatReader
openThumbBytes
in interface IFormatReader
FormatException
java.io.IOException
public int getSeriesCount()
IFormatReader
getSeriesCount
in interface IFormatReader
public void setSeries(int no)
IFormatReader
setSeries
in interface IFormatReader
public int getSeries()
IFormatReader
getSeries
in interface IFormatReader
public java.lang.String[] getUsedFiles()
IFormatReader
IFormatHandler.setId(String)
. The remaining elements are expected to be in a
consistent order; if a directory listing is necessary to build the list
then it should be sorted first.getUsedFiles
in interface IFormatReader
public java.lang.String[] getUsedFiles(boolean noPixels)
IFormatReader
IFormatHandler.setId(String)
, if appropriate based upon 'noPixels'.
The remaining elements are expected to be in a consistent order;
if a directory listing is necessary to build the list then it should
be sorted first.getUsedFiles
in interface IFormatReader
public java.lang.String[] getSeriesUsedFiles()
IFormatReader
IFormatHandler.setId(String)
. The remaining elements are expected to be in a
consistent order; if a directory listing is necessary to build the list
then it should be sorted first.getSeriesUsedFiles
in interface IFormatReader
public java.lang.String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
IFormatHandler.setId(String)
, if appropriate based upon 'noPixels'.
The remaining elements are expected to be in a consistent order;
if a directory listing is necessary to build the list then it should
be sorted first.getSeriesUsedFiles
in interface IFormatReader
public FileInfo[] getAdvancedUsedFiles(boolean noPixels)
IFormatReader
getAdvancedUsedFiles
in interface IFormatReader
public FileInfo[] getAdvancedSeriesUsedFiles(boolean noPixels)
IFormatReader
getAdvancedSeriesUsedFiles
in interface IFormatReader
public int getIndex(int z, int c, int t)
IFormatReader
getIndex
in interface IFormatReader
public int getIndex(int z, int c, int t, int moduloZ, int moduloC, int moduloT)
IFormatReader
getIndex
in interface IFormatReader
public int[] getZCTCoords(int index)
IFormatReader
getZCTCoords
in interface IFormatReader
public int[] getZCTModuloCoords(int index)
IFormatReader
getZCTModuloCoords
in interface IFormatReader
public java.lang.Object getMetadataValue(java.lang.String field)
IFormatReader
getMetadataValue
in interface IFormatReader
field
- the name associated with the metadata fieldpublic java.lang.Object getSeriesMetadataValue(java.lang.String field)
IFormatReader
getSeriesMetadataValue
in interface IFormatReader
field
- the name associated with the metadata fieldpublic java.util.Hashtable<java.lang.String,java.lang.Object> getGlobalMetadata()
IFormatReader
getGlobalMetadata
in interface IFormatReader
public java.util.Hashtable<java.lang.String,java.lang.Object> getSeriesMetadata()
IFormatReader
getSeriesMetadata
in interface IFormatReader
public java.util.List<CoreMetadata> getCoreMetadataList()
IFormatReader
getCoreMetadataList
in interface IFormatReader
public void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
java.io.IOException
public void setGroupFiles(boolean group)
IFormatReader
setGroupFiles
in interface IFormatReader
IFormatReader.fileGroupOption(String)
,
IFormatReader.isGroupFiles()
public boolean isGroupFiles()
IFormatReader
isGroupFiles
in interface IFormatReader
IFormatReader.setGroupFiles(boolean)
,
IFormatReader.fileGroupOption(String)
public int fileGroupOption(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
fileGroupOption
in interface IFormatReader
id
- a file in the multi-file datasetFormatTools.MUST_GROUP
indicates that the
files cannot be handled separately; the reader will always detect and
read all files in the dataset. FormatTools.CAN_GROUP
indicates
that the files may be handled separately, but file grouping must then
be disabled via IFormatReader.setGroupFiles(boolean)
.
FormatTools.CANNOT_GROUP
indicates that the files must be handled
separately; the reader will not attempt to read all files in the dataset
(this is rare).FormatException
java.io.IOException
FormatTools.MUST_GROUP
,
FormatTools.CAN_GROUP
,
FormatTools.CANNOT_GROUP
public void setFillColor(java.lang.Byte fill)
IFormatReader
setFillColor
in interface IFormatReader
fill
- value that will be used to fill pixel byte arrayspublic java.lang.Byte getFillColor()
IFormatReader
getFillColor
in interface IFormatReader
IFormatReader.setFillColor(Byte)
public boolean isMetadataComplete()
IFormatReader
isMetadataComplete
in interface IFormatReader
public void setNormalized(boolean normalize)
IFormatReader
setNormalized
in interface IFormatReader
public boolean isNormalized()
IFormatReader
isNormalized
in interface IFormatReader
public void setOriginalMetadataPopulated(boolean populate)
IFormatReader
setOriginalMetadataPopulated
in interface IFormatReader
public boolean isOriginalMetadataPopulated()
IFormatReader
isOriginalMetadataPopulated
in interface IFormatReader
public java.lang.String getCurrentFile()
IFormatReader
getCurrentFile
in interface IFormatReader
public void setMetadataFiltered(boolean filter)
IFormatReader
setMetadataFiltered
in interface IFormatReader
public boolean isMetadataFiltered()
IFormatReader
isMetadataFiltered
in interface IFormatReader
public void setMetadataStore(MetadataStore store)
IFormatReader
setMetadataStore
in interface IFormatReader
store
- a metadata store implementation.public MetadataStore getMetadataStore()
IFormatReader
null
metadata store.getMetadataStore
in interface IFormatReader
public java.lang.Object getMetadataStoreRoot()
IFormatReader
getMetadataStoreRoot
in interface IFormatReader
public IFormatReader[] getUnderlyingReaders()
IFormatReader
getUnderlyingReaders
in interface IFormatReader
public boolean isSingleFile(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
isSingleFile
in interface IFormatReader
FormatException
java.io.IOException
public int getRequiredDirectories(java.lang.String[] files) throws FormatException, java.io.IOException
IFormatReader
getRequiredDirectories
in interface IFormatReader
FormatException
java.io.IOException
public java.lang.String getDatasetStructureDescription()
IFormatReader
getDatasetStructureDescription
in interface IFormatReader
public boolean hasCompanionFiles()
IFormatReader
hasCompanionFiles
in interface IFormatReader
public java.lang.String[] getPossibleDomains(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
getPossibleDomains
in interface IFormatReader
FormatException
java.io.IOException
public java.lang.String[] getDomains()
IFormatReader
getDomains
in interface IFormatReader
public int getOptimalTileWidth()
IFormatReader
getOptimalTileWidth
in interface IFormatReader
public int getOptimalTileHeight()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
public int getCoreIndex()
IFormatReader
getCoreIndex
in interface IFormatReader
public void setCoreIndex(int no)
IFormatReader
setCoreIndex
in interface IFormatReader
public int seriesToCoreIndex(int series)
IFormatReader
seriesToCoreIndex
in interface IFormatReader
public int coreIndexToSeries(int index)
IFormatReader
coreIndexToSeries
in interface IFormatReader
public int getResolutionCount()
IPyramidHandler
getResolutionCount
in interface IPyramidHandler
public void setResolution(int no)
IPyramidHandler
setResolution
in interface IPyramidHandler
IPyramidHandler.getResolutionCount()
public int getResolution()
IPyramidHandler
getResolution
in interface IPyramidHandler
IPyramidHandler.getResolutionCount()
public boolean hasFlattenedResolutions()
IFormatReader
hasFlattenedResolutions
in interface IFormatReader
public void setFlattenedResolutions(boolean flattened)
IFormatReader
setFlattenedResolutions
in interface IFormatReader
public boolean isThisType(java.lang.String name)
IFormatHandler
isThisType
in interface IFormatHandler
public java.lang.String getFormat()
IFormatHandler
getFormat
in interface IFormatHandler
public java.lang.String[] getSuffixes()
IFormatHandler
getSuffixes
in interface IFormatHandler
public java.lang.Class<?> getNativeDataType()
IFormatHandler
IFormatReader.openPlane(int, int, int, int, int)
or IFormatWriter.savePlane(int, java.lang.Object)
.
For most readers this type will be a byte array; however, some readers
call external APIs that work with other types such as
BufferedImage
.getNativeDataType
in interface IFormatHandler
public void setId(java.lang.String id) throws FormatException, java.io.IOException
IFormatHandler
setId
in interface IFormatHandler
FormatException
java.io.IOException
public void reopenFile() throws java.io.IOException
IFormatReader
IFormatHandler.setId(java.lang.String)
has been
called, but close(false) has not been called.reopenFile
in interface IFormatReader
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public int getTileRows(int no)
ICompressedTileReader
getTileRows
in interface ICompressedTileReader
no
- plane indexpublic int getTileColumns(int no)
ICompressedTileReader
getTileColumns
in interface ICompressedTileReader
no
- plane indexpublic byte[] openCompressedBytes(int no, int x, int y) throws FormatException, java.io.IOException
ICompressedTileReader
openCompressedBytes
in interface ICompressedTileReader
no
- plane indexx
- tile X index (indexed from 0, @see getTileColumns(int))y
- tile Y index (indexed from 0, @see getTileRows(int))FormatException
java.io.IOException
public byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws FormatException, java.io.IOException
ICompressedTileReader
openCompressedBytes
in interface ICompressedTileReader
no
- plane indexbuf
- pre-allocated buffer in which to store compressed bytesx
- tile X index (indexed from 0, @see getTileColumns(int))y
- tile Y index (indexed from 0, @see getTileRows(int))FormatException
java.io.IOException
public Codec getTileCodec(int no) throws FormatException, java.io.IOException
ICompressedTileReader
getTileCodec
in interface ICompressedTileReader
no
- plane indexFormatException
java.io.IOException
ICompressedTileReader.openCompressedBytes(int, int, int)
public CodecOptions getTileCodecOptions(int no, int x, int y) throws FormatException, java.io.IOException
ICompressedTileReader
getTileCodecOptions
in interface ICompressedTileReader
no
- plane indexx
- tile X index (indexed from 0, @see getTileColumns(int))y
- tile Y index (indexed from 0, @see getTileRows(int))FormatException
java.io.IOException
ICompressedTileReader.getTileCodec(int)
private boolean isThisType(IFormatReader reader, java.lang.String name, boolean allowOpen)
private boolean isThisType(IFormatReader reader, byte[] block)
private boolean isThisType(IFormatReader reader, loci.common.RandomAccessInputStream rais)
private void logIsThisTypeError(IFormatReader reader, java.lang.Exception e)
Copyright © 2024 Open Microscopy Environment