public abstract class BaseTiffReader
extends loci.formats.FormatReader
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable[] |
ifds
List of IFDs for the current TIFF.
|
collectMetadata, core, filterMetadata, group, in, metadata, metadataStore, normalizeData, saveOriginalMetadata, series, THUMBNAIL_DIMENSION| Constructor and Description |
|---|
BaseTiffReader(String name,
String suffix)
Constructs a new BaseTiffReader.
|
BaseTiffReader(String name,
String[] suffixes)
Constructs a new BaseTiffReader.
|
| Modifier and Type | Method and Description |
|---|---|
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 String |
getImageCreationDate()
Retrieves the image creation date.
|
protected String |
getImageDescription()
Retrieves the image description.
|
protected String |
getImageName()
Retrieves the image name from the TIFF.
|
Object |
getMetadataValue(String field)
Obtains the specified metadata field's value for the current file.
|
int[] |
getTiffDimensions()
Gets the dimensions of the given (possibly multi-page) TIFF file.
|
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
protected void |
initMetadata()
Populates the metadata hashtable and metadata store.
|
protected void |
initMetadataStore()
Populates the metadata store using the data parsed in
initStandardMetadata() along with some further parsing done in
the method itself. |
protected void |
initStandardMetadata()
Parses standard metadata.
|
boolean |
isThisType(byte[] block)
Checks if the given block is a valid header for this file format.
|
byte[] |
openBytes(int no,
byte[] buf)
Obtains the specified image from the current file into a pre-allocated byte
array of (sizeX * sizeY * bytesPerPixel).
|
protected void |
put(String key,
boolean value) |
protected void |
put(String key,
byte value) |
protected void |
put(String key,
char value) |
protected void |
put(String key,
double value) |
protected void |
put(String key,
float value) |
protected void |
put(String key,
Hashtable ifd,
int tag) |
protected void |
put(String key,
int value) |
protected void |
put(String key,
long value) |
protected void |
put(String key,
Object value) |
protected void |
put(String key,
short value) |
protected void |
putInt(String key,
Hashtable ifd,
int tag) |
protected byte[] |
swapIfRequired(byte[] byteArray)
Examines a byte array to see if it needs to be byte swapped and modifies
the byte array directly.
|
addMeta, checkBytes, close, close, fileGroupOption, getChannelDimLengths, getChannelDimLengths, getChannelDimTypes, getChannelDimTypes, getCoreMetadata, getCoreMetadata, getCurrentFile, getDimensionOrder, getDimensionOrder, getEffectiveSizeC, getEffectiveSizeC, getImageCount, getImageCount, getIndex, getIndex, getMeta, getMetadata, getMetadata, getMetadataStore, getMetadataStore, getMetadataStoreRoot, getMetadataStoreRoot, getMetadataValue, getPixelType, getPixelType, getRGBChannelCount, getRGBChannelCount, getSeries, getSeries, getSeriesCount, getSeriesCount, getSizeC, getSizeC, getSizeT, getSizeT, getSizeX, getSizeX, getSizeY, getSizeY, getSizeZ, getSizeZ, getThumbSizeX, getThumbSizeX, getThumbSizeY, getThumbSizeY, getUsedFiles, getUsedFiles, getZCTCoords, getZCTCoords, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isInterleaved, isInterleaved, isLittleEndian, isLittleEndian, isMetadataCollected, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOrderCertain, isOriginalMetadataPopulated, isRGB, isRGB, isUsedFile, openBytes, openBytes, openBytes, openImage, openImage, openThumbBytes, openThumbBytes, openThumbImage, openThumbImage, setGroupFiles, setId, setMetadataCollected, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setSeries, setSeriesaddStatusListener, debug, getFormat, getStatusListeners, getSuffixes, isThisType, isThisType, removeStatusListener, setDebug, setDebugLevel, setId, status, status, status, trace, traceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected Hashtable[] ifds
public int[] getTiffDimensions()
throws loci.formats.FormatException,
IOException
loci.formats.FormatExceptionIOExceptionpublic boolean isThisType(byte[] block)
loci.formats.IFormatReaderpublic byte[][] get8BitLookupTable()
throws loci.formats.FormatException,
IOException
loci.formats.IFormatReaderINT8 or UINT8, this method will return null.get8BitLookupTable in interface loci.formats.IFormatReaderget8BitLookupTable in class loci.formats.FormatReaderloci.formats.FormatExceptionIOExceptionpublic short[][] get16BitLookupTable()
throws loci.formats.FormatException,
IOException
loci.formats.IFormatReaderINT16 or UINT16, this method will return null.get16BitLookupTable in interface loci.formats.IFormatReaderget16BitLookupTable in class loci.formats.FormatReaderloci.formats.FormatExceptionIOExceptionpublic Object getMetadataValue(String field)
loci.formats.IFormatReadergetMetadataValue in interface loci.formats.IFormatReadergetMetadataValue in class loci.formats.FormatReaderfield - the name associated with the metadata fieldpublic byte[] openBytes(int no,
byte[] buf)
throws loci.formats.FormatException,
IOException
loci.formats.IFormatReaderno - the image index within the file.buf - a pre-allocated buffer.buf for convenience.loci.formats.FormatException - if there was a problem parsing the metadata of the
file.IOException - if there was a problem reading the file.protected void initMetadata()
throws loci.formats.FormatException,
IOException
loci.formats.FormatExceptionIOExceptionprotected void initStandardMetadata()
throws loci.formats.FormatException,
IOException
loci.formats.FormatExceptionIOExceptionprotected void initMetadataStore()
initStandardMetadata() along with some further parsing done in
the method itself.
All calls to the active MetadataStore should be made in this
method and only in this method. This is especially important for
sub-classes that override the getters for pixel set array size, etc.protected String getImageName()
protected String getImageCreationDate()
protected String getImageDescription()
protected byte[] swapIfRequired(byte[] byteArray)
throws loci.formats.FormatException,
IOException
byteArray - The byte array to check and modify if required.IOException - if there is an error read from the file.loci.formats.FormatException - if there is an error during metadata parsing.protected void put(String key, int value)
protected void put(String key, boolean value)
protected void put(String key, byte value)
protected void put(String key, char value)
protected void put(String key, double value)
protected void put(String key, float value)
protected void put(String key, long value)
protected void put(String key, short value)
protected void initFile(String id) throws loci.formats.FormatException, IOException
loci.formats.FormatReaderinitFile in class loci.formats.FormatReaderloci.formats.FormatExceptionIOException