public abstract class FormatReader extends FormatHandler implements IFormatReader
Modifier and Type | Field and Description |
---|---|
protected java.util.List<CoreMetadata> |
core
Core metadata values.
|
protected int |
coreIndex
The number of the current series.
|
protected java.lang.String |
datasetDescription
Short description of the structure of the dataset.
|
protected java.lang.String[] |
domains
List of domains in which this format is used.
|
protected boolean |
filterMetadata
Whether or not to filter out invalid metadata.
|
protected boolean |
flattenedResolutions
Whether or not resolutions are flattened.
|
protected boolean |
group
Whether or not to group multi-file formats.
|
protected boolean |
hasCompanionFiles
Whether this format supports multi-file datasets.
|
protected RandomAccessInputStream |
in
Current file.
|
protected boolean |
indexedAsRGB
Whether or not MetadataStore sets C = 3 for indexed color images.
|
protected java.util.Hashtable<java.lang.String,java.lang.Object> |
metadata
Hashtable containing metadata key/value pairs.
|
protected MetadataOptions |
metadataOptions
Metadata parsing options.
|
protected MetadataStore |
metadataStore
Current metadata store.
|
protected boolean |
normalizeData
Whether or not to normalize float data.
|
protected int |
resolution
The number of the current resolution.
|
protected boolean |
saveOriginalMetadata
Whether or not to save proprietary metadata in the MetadataStore.
|
protected int |
series
The number of the current series (non flat).
|
protected boolean |
suffixNecessary
Whether the file extension matching one of the reader's suffixes
is necessary to identify the file as an instance of this format.
|
protected boolean |
suffixSufficient
Whether the file extension matching one of the reader's suffixes
is sufficient to identify the file as an instance of this format.
|
protected static int |
THUMBNAIL_DIMENSION
Default thumbnail width and height.
|
COMPRESSION_SUFFIXES, currentId, format, LOGGER, suffixes
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
Constructor and Description |
---|
FormatReader(java.lang.String format,
java.lang.String suffix)
Constructs a format reader with the given name and default suffix.
|
FormatReader(java.lang.String format,
java.lang.String[] suffixes)
Constructs a format reader with the given name and default suffixes.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addGlobalMeta(java.lang.String key,
boolean value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
byte value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
char value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
double value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
float value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
int value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
long value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
java.lang.Object value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMeta(java.lang.String key,
short value)
Adds an entry to the global metadata table.
|
protected void |
addGlobalMetaList(java.lang.String key,
java.lang.Object value) |
protected void |
addMeta(java.lang.String key,
java.lang.Object value,
java.util.Hashtable<java.lang.String,java.lang.Object> meta)
Adds an entry to the specified Hashtable.
|
protected void |
addSeriesMeta(java.lang.String key,
boolean value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
byte value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
char value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
double value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
float value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
int value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
long value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
java.lang.Object value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMeta(java.lang.String key,
short value)
Adds an entry to the metadata table for the current series.
|
protected void |
addSeriesMetaList(java.lang.String key,
java.lang.Object value) |
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 int indicating that we cannot, must, or might group the files
in a given dataset.
|
protected void |
flattenHashtables() |
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.
|
protected AcquisitionMode |
getAcquisitionMode(java.lang.String value)
Retrieves an
AcquisitionMode enumeration
value for the given String. |
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.
|
protected ArcType |
getArcType(java.lang.String value)
Retrieves an
ArcType enumeration
value for the given String. |
protected Binning |
getBinning(java.lang.String value)
Retrieves an
Binning enumeration
value for the given String. |
int |
getBitsPerPixel()
Gets the number of valid bits per pixel.
|
int[] |
getChannelDimLengths()
Gets the lengths of each subdimension of C,
in fastest-to-slowest rasterization order.
|
java.lang.String[] |
getChannelDimTypes()
Gets the name of each subdimension of C,
in fastest-to-slowest rasterization order.
|
protected Compression |
getCompression(java.lang.String value)
Retrieves an
Compression enumeration
value for the given String. |
protected ContrastMethod |
getContrastMethod(java.lang.String value)
Retrieves an
ContrastMethod enumeration
value for the given String. |
int |
getCoreIndex()
Return the index into CoreMetadata of the current resolution/series.
|
CoreMetadata[] |
getCoreMetadata()
Deprecated.
|
java.util.List<CoreMetadata> |
getCoreMetadataList()
Obtains the core metadata values for the current file.
|
protected Correction |
getCorrection(java.lang.String value)
Retrieves an
Correction enumeration
value for the given String. |
java.lang.String |
getCurrentFile()
Returns the current file.
|
java.lang.String |
getDatasetStructureDescription()
Returns a short description of the dataset structure.
|
protected DetectorType |
getDetectorType(java.lang.String value)
Retrieves an
DetectorType enumeration
value for the given String. |
java.lang.String |
getDimensionOrder()
Gets a five-character string representing the
dimension order in which planes will be returned.
|
protected DimensionOrder |
getDimensionOrder(java.lang.String value)
Retrieves an
DimensionOrder enumeration
value for the given String. |
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().
|
protected ExperimentType |
getExperimentType(java.lang.String value)
Retrieves an
ExperimentType enumeration
value for the given String. |
protected FilamentType |
getFilamentType(java.lang.String value)
Retrieves an
FilamentType enumeration
value for the given String. |
protected FillRule |
getFillRule(java.lang.String value)
Retrieves an
FillRule enumeration
value for the given String. |
protected FilterType |
getFilterType(java.lang.String value)
Retrieves an
FilterType enumeration
value for the given String. |
protected FontFamily |
getFontFamily(java.lang.String value)
Retrieves an
FontFamily enumeration
value for the given String. |
protected FontStyle |
getFontStyle(java.lang.String value)
Retrieves an
FontStyle enumeration
value for the given String. |
protected java.lang.Object |
getGlobalMeta(java.lang.String key)
Gets a value from the global metadata table.
|
java.util.Hashtable<java.lang.String,java.lang.Object> |
getGlobalMetadata()
Obtains the hashtable containing the metadata field/value pairs from
the current file.
|
protected IlluminationType |
getIlluminationType(java.lang.String value)
Retrieves an
IlluminationType enumeration
value for the given String. |
int |
getImageCount()
Determines the number of image planes in the current file.
|
protected Immersion |
getImmersion(java.lang.String value)
Retrieves an
Immersion enumeration
value for the given String. |
int |
getIndex(int z,
int c,
int t)
Gets the rasterized index corresponding
to the given Z, C and T coordinates.
|
protected LaserMedium |
getLaserMedium(java.lang.String value)
Retrieves an
LaserMedium enumeration
value for the given String. |
protected LaserType |
getLaserType(java.lang.String value)
Retrieves an
LaserType enumeration
value for the given String. |
protected LineCap |
getLineCap(java.lang.String value)
Retrieves an
LineCap enumeration
value for the given String. |
protected Marker |
getMarker(java.lang.String value)
Retrieves an
Marker enumeration
value for the given String. |
protected Medium |
getMedium(java.lang.String value)
Retrieves an
Medium enumeration
value for the given String. |
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.
|
protected MicrobeamManipulationType |
getMicrobeamManipulationType(java.lang.String value)
Retrieves an
MicrobeamManipulationType
enumeration value for the given String. |
protected MicroscopeType |
getMicroscopeType(java.lang.String value)
Retrieves an
MicroscopeType enumeration
value for the given String. |
Modulo |
getModuloC() |
Modulo |
getModuloT() |
Modulo |
getModuloZ() |
protected NamingConvention |
getNamingConvention(java.lang.String value)
Retrieves an
NamingConvention enumeration
value for the given String. |
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.
|
protected PixelType |
getPixelType(java.lang.String value)
Retrieves an
PixelType enumeration
value for the given String. |
java.lang.String[] |
getPossibleDomains(java.lang.String id)
Returns a list of scientific domains in which this format is used.
|
protected Pulse |
getPulse(java.lang.String value)
Retrieves an
Pulse enumeration
value for the given String. |
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.
|
protected AffineTransform |
getRotationTransform(double theta) |
int |
getSeries()
Gets the currently active series.
|
int |
getSeriesCount()
Gets the number of series in this file.
|
protected java.lang.Object |
getSeriesMeta(java.lang.String key)
Gets an entry from the metadata table for the current series.
|
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.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.
|
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 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.
|
protected void |
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.).
|
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.
|
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 this is a single-file format.
|
boolean |
isThisType(byte[] block)
Checks if the given block is a valid header for this file format.
|
boolean |
isThisType(RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
boolean |
isThisType(java.lang.String name)
Checks if a file matches the type of this format handler.
|
boolean |
isThisType(java.lang.String name,
boolean open)
Checks if a file matches the type of this format reader.
|
boolean |
isThumbnailSeries()
Gets whether the current series is a lower resolution copy of a different
series.
|
protected boolean |
isUsedFile(java.lang.String file)
Returns true if the given file name is in the used files list.
|
protected MetadataStore |
makeFilterMetadata()
Return a properly configured loci.formats.meta.FilterMetadata.
|
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).
|
abstract 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).
|
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.
|
protected byte[] |
readPlane(RandomAccessInputStream s,
int x,
int y,
int w,
int h,
byte[] buf)
Reads a raw plane from disk.
|
protected byte[] |
readPlane(RandomAccessInputStream s,
int x,
int y,
int w,
int h,
int scanlinePad,
byte[] buf)
Reads a raw plane from disk.
|
int |
seriesToCoreIndex(int series)
Returns the first core index corresponding to the specified series.
|
void |
setCoreIndex(int no)
Set the current resolution/series (ignores subresolutions).
|
void |
setFlattenedResolutions(boolean flattened)
Set whether or not to flatten resolutions into individual series.
|
void |
setGroupFiles(boolean groupFiles)
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.
|
checkSuffix, checkSuffix, getFormat, getNativeDataType, getSuffixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
protected static final int THUMBNAIL_DIMENSION
protected RandomAccessInputStream in
protected java.util.Hashtable<java.lang.String,java.lang.Object> metadata
protected int coreIndex
protected int series
protected java.util.List<CoreMetadata> core
protected int resolution
protected boolean flattenedResolutions
protected boolean suffixNecessary
protected boolean suffixSufficient
protected boolean hasCompanionFiles
protected java.lang.String datasetDescription
protected boolean normalizeData
protected boolean filterMetadata
protected boolean saveOriginalMetadata
protected boolean indexedAsRGB
protected boolean group
protected java.lang.String[] domains
protected MetadataStore metadataStore
getMetadataStore()
prevent "null" access.protected MetadataOptions metadataOptions
public FormatReader(java.lang.String format, java.lang.String suffix)
public FormatReader(java.lang.String format, java.lang.String[] suffixes)
protected void initFile(java.lang.String id) throws FormatException, java.io.IOException
FormatException
- if a parsing error occurs processing the file.java.io.IOException
- if an I/O error occurs processing the fileprotected boolean isUsedFile(java.lang.String file)
protected void addMeta(java.lang.String key, java.lang.Object value, java.util.Hashtable<java.lang.String,java.lang.Object> meta)
protected void addGlobalMeta(java.lang.String key, java.lang.Object value)
protected void addGlobalMeta(java.lang.String key, boolean value)
protected void addGlobalMeta(java.lang.String key, byte value)
protected void addGlobalMeta(java.lang.String key, short value)
protected void addGlobalMeta(java.lang.String key, int value)
protected void addGlobalMeta(java.lang.String key, long value)
protected void addGlobalMeta(java.lang.String key, float value)
protected void addGlobalMeta(java.lang.String key, double value)
protected void addGlobalMeta(java.lang.String key, char value)
protected java.lang.Object getGlobalMeta(java.lang.String key)
protected void addGlobalMetaList(java.lang.String key, java.lang.Object value)
protected void addSeriesMetaList(java.lang.String key, java.lang.Object value)
protected void flattenHashtables()
protected void addSeriesMeta(java.lang.String key, java.lang.Object value)
protected void addSeriesMeta(java.lang.String key, boolean value)
protected void addSeriesMeta(java.lang.String key, byte value)
protected void addSeriesMeta(java.lang.String key, short value)
protected void addSeriesMeta(java.lang.String key, int value)
protected void addSeriesMeta(java.lang.String key, long value)
protected void addSeriesMeta(java.lang.String key, float value)
protected void addSeriesMeta(java.lang.String key, double value)
protected void addSeriesMeta(java.lang.String key, char value)
protected java.lang.Object getSeriesMeta(java.lang.String key)
protected byte[] readPlane(RandomAccessInputStream s, int x, int y, int w, int h, byte[] buf) throws java.io.IOException
java.io.IOException
protected byte[] readPlane(RandomAccessInputStream s, int x, int y, int w, int h, int scanlinePad, byte[] buf) throws java.io.IOException
java.io.IOException
protected MetadataStore makeFilterMetadata()
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
public boolean isThisType(java.lang.String name, boolean open)
isThisType(RandomAccessInputStream)
.isThisType
in interface IFormatReader
open
- If true, and the file extension is insufficient to determine
the file type, the (existing) file is opened for further analysis.public boolean isThisType(byte[] block)
IFormatReader
isThisType
in interface IFormatReader
public boolean isThisType(RandomAccessInputStream stream) throws java.io.IOException
IFormatReader
isThisType
in interface IFormatReader
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 getSizeZ()
IFormatReader
getSizeZ
in interface IFormatReader
public int getSizeC()
IFormatReader
getSizeC
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[] getChannelDimLengths()
IFormatReader
getChannelDimLengths
in interface IFormatReader
public java.lang.String[] getChannelDimTypes()
IFormatReader
FormatTools
.getChannelDimTypes
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, byte[] buf) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
no
- the image index within the file.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, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
FormatException
java.io.IOException
public abstract 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 image index within the file.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 void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
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 void setGroupFiles(boolean groupFiles)
IFormatReader
setGroupFiles
in interface IFormatReader
public boolean isGroupFiles()
IFormatReader
isGroupFiles
in interface IFormatReader
public int fileGroupOption(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
fileGroupOption
in interface IFormatReader
FormatException
java.io.IOException
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[] getUsedFiles()
IFormatReader
getUsedFiles
in interface IFormatReader
public java.lang.String[] getUsedFiles(boolean noPixels)
IFormatReader
getUsedFiles
in interface IFormatReader
public java.lang.String[] getSeriesUsedFiles()
IFormatReader
getSeriesUsedFiles
in interface IFormatReader
public java.lang.String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
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 java.lang.String getCurrentFile()
IFormatReader
getCurrentFile
in interface IFormatReader
public int getIndex(int z, int c, int t)
IFormatReader
getIndex
in interface IFormatReader
public int[] getZCTCoords(int index)
IFormatReader
getZCTCoords
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 CoreMetadata[] getCoreMetadata()
IFormatReader
getCoreMetadata
in interface IFormatReader
IFormatReader.getCoreMetadataList()
public java.util.List<CoreMetadata> getCoreMetadataList()
IFormatReader
getCoreMetadataList
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 seriesToCoreIndex(int series)
IFormatReader
seriesToCoreIndex
in interface IFormatReader
public int coreIndexToSeries(int index)
IFormatReader
coreIndexToSeries
in interface IFormatReader
public int getResolutionCount()
IFormatReader
getResolutionCount
in interface IFormatReader
public void setResolution(int no)
IFormatReader
setResolution
in interface IFormatReader
IFormatReader.getResolutionCount()
public int getResolution()
IFormatReader
getResolution
in interface IFormatReader
IFormatReader.getResolutionCount()
public boolean hasFlattenedResolutions()
IFormatReader
hasFlattenedResolutions
in interface IFormatReader
public void setFlattenedResolutions(boolean flattened)
IFormatReader
setFlattenedResolutions
in interface IFormatReader
public int getCoreIndex()
IFormatReader
getCoreIndex
in interface IFormatReader
public void setCoreIndex(int no)
IFormatReader
setCoreIndex
in interface IFormatReader
public boolean isThisType(java.lang.String name)
FormatHandler
isThisType
in interface IFormatHandler
isThisType
in class FormatHandler
public void setId(java.lang.String id) throws FormatException, java.io.IOException
IFormatHandler
setId
in interface IFormatHandler
FormatException
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
protected AcquisitionMode getAcquisitionMode(java.lang.String value) throws FormatException
AcquisitionMode
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected ArcType getArcType(java.lang.String value) throws FormatException
ArcType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Binning getBinning(java.lang.String value) throws FormatException
Binning
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Compression getCompression(java.lang.String value) throws FormatException
Compression
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected ContrastMethod getContrastMethod(java.lang.String value) throws FormatException
ContrastMethod
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Correction getCorrection(java.lang.String value) throws FormatException
Correction
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected DetectorType getDetectorType(java.lang.String value) throws FormatException
DetectorType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected DimensionOrder getDimensionOrder(java.lang.String value) throws FormatException
DimensionOrder
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected ExperimentType getExperimentType(java.lang.String value) throws FormatException
ExperimentType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected FilamentType getFilamentType(java.lang.String value) throws FormatException
FilamentType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected FillRule getFillRule(java.lang.String value) throws FormatException
FillRule
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected FilterType getFilterType(java.lang.String value) throws FormatException
FilterType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected FontFamily getFontFamily(java.lang.String value) throws FormatException
FontFamily
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected FontStyle getFontStyle(java.lang.String value) throws FormatException
FontStyle
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected IlluminationType getIlluminationType(java.lang.String value) throws FormatException
IlluminationType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Immersion getImmersion(java.lang.String value) throws FormatException
Immersion
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected LaserMedium getLaserMedium(java.lang.String value) throws FormatException
LaserMedium
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected LaserType getLaserType(java.lang.String value) throws FormatException
LaserType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected LineCap getLineCap(java.lang.String value) throws FormatException
LineCap
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Marker getMarker(java.lang.String value) throws FormatException
Marker
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Medium getMedium(java.lang.String value) throws FormatException
Medium
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected MicrobeamManipulationType getMicrobeamManipulationType(java.lang.String value) throws FormatException
MicrobeamManipulationType
enumeration value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected MicroscopeType getMicroscopeType(java.lang.String value) throws FormatException
MicroscopeType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected NamingConvention getNamingConvention(java.lang.String value) throws FormatException
NamingConvention
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected PixelType getPixelType(java.lang.String value) throws FormatException
PixelType
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected Pulse getPulse(java.lang.String value) throws FormatException
Pulse
enumeration
value for the given String.EnumerationException
- if an appropriate
enumeration value is not found.FormatException
protected AffineTransform getRotationTransform(double theta)
Copyright © 2014 Open Microscopy Environment