public class MinimalTiffReader extends SubResolutionFormatReader
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canSeparateSeries
Whether or not IFDs with different dimensions can be
split into separate series.
|
protected boolean |
equalStrips |
protected IFDList |
ifds
List of IFDs for the current TIFF.
|
private JPEG2000CodecOptions |
j2kCodecOptions
Codec options to use when decoding JPEG 2000 data.
|
protected int |
lastPlane |
private static org.slf4j.Logger |
LOGGER
Logger for this class.
|
protected boolean |
mergeSubIFDs
Merge SubIFDs into the main IFD list.
|
protected boolean |
noSubresolutions |
private java.lang.Integer |
resolutionLevels
Number of JPEG 2000 resolution levels.
|
protected boolean |
seriesToIFD |
protected java.util.List<IFDList> |
subResolutionIFDs
List of sub-resolution IFDs for each IFD in the current TIFF with the
same order as
ifds. |
protected IFDList |
thumbnailIFDs
List of thumbnail IFDs for the current TIFF.
|
protected TiffParser |
tiffParser |
protected boolean |
use64Bit |
corecoreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
MinimalTiffReader()
Constructs a new MinimalTiffReader.
|
MinimalTiffReader(java.lang.String name,
java.lang.String suffix)
Constructs a new MinimalTiffReader.
|
MinimalTiffReader(java.lang.String name,
java.lang.String[] suffixes)
Constructs a new MinimalTiffReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
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.
|
IFDList |
getIFDs()
Gets the list of IFDs associated with the current TIFF's image planes.
|
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
int |
getOptimalTileWidth()
Returns the optimal sub-image width for use with openBytes.
|
IFDList |
getThumbnailIFDs()
Gets the list of IFDs associated with the current TIFF's thumbnails.
|
int |
getThumbSizeX()
Get the size of the X dimension for the thumbnail.
|
int |
getThumbSizeY()
Get the size of the Y dimension for the thumbnail.
|
protected void |
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.).
|
protected void |
initTiffParser()
Reinitialize the underlying TiffParser.
|
boolean |
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
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[] |
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.
|
protected void |
setResolutionLevel(IFD ifd)
Sets the resolution level when we have JPEG 2000 compressed data.
|
coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, seriesToCoreIndex, setCoreIndex, setResolution, setSeriesaddGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, fileGroupOption, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, readPlane, readPlane, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataListscheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionsprivate static final org.slf4j.Logger LOGGER
protected IFDList ifds
protected IFDList thumbnailIFDs
protected java.util.List<IFDList> subResolutionIFDs
ifds.protected transient TiffParser tiffParser
protected boolean equalStrips
protected boolean use64Bit
protected int lastPlane
protected boolean noSubresolutions
protected boolean seriesToIFD
protected transient boolean mergeSubIFDs
protected transient boolean canSeparateSeries
private java.lang.Integer resolutionLevels
private JPEG2000CodecOptions j2kCodecOptions
public MinimalTiffReader()
public MinimalTiffReader(java.lang.String name,
java.lang.String suffix)
public MinimalTiffReader(java.lang.String name,
java.lang.String[] suffixes)
public IFDList getIFDs()
public IFDList getThumbnailIFDs()
public boolean isThisType(loci.common.RandomAccessInputStream stream)
throws java.io.IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderstream - 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.IOExceptionpublic byte[][] get8BitLookupTable()
throws FormatException,
java.io.IOException
IFormatReaderIFormatReader.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 IFormatReaderget8BitLookupTable in class FormatReaderFormatExceptionjava.io.IOExceptionpublic short[][] get16BitLookupTable()
throws FormatException,
java.io.IOException
IFormatReaderIFormatReader.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 IFormatReaderget16BitLookupTable in class FormatReaderFormatExceptionjava.io.IOExceptionpublic int getThumbSizeX()
IFormatReadergetThumbSizeX in interface IFormatReadergetThumbSizeX in class FormatReaderpublic int getThumbSizeY()
IFormatReadergetThumbSizeY in interface IFormatReadergetThumbSizeY in class FormatReaderpublic byte[] openThumbBytes(int no)
throws FormatException,
java.io.IOException
IFormatReaderopenThumbBytes in interface IFormatReaderopenThumbBytes in class FormatReaderFormatExceptionjava.io.IOExceptionpublic byte[] openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class FormatReaderno - 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.FormatReader.openBytes(int, byte[], int, int, int, int)public void reopenFile()
throws java.io.IOException
IFormatReaderIFormatHandler.setId(java.lang.String) has been
called, but close(false) has not been called.reopenFile in interface IFormatReaderreopenFile in class FormatReaderjava.io.IOExceptionpublic void close(boolean fileOnly)
throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class SubResolutionFormatReaderjava.io.IOExceptionpublic int getOptimalTileWidth()
IFormatReadergetOptimalTileWidth in interface IFormatReadergetOptimalTileWidth in class FormatReaderpublic int getOptimalTileHeight()
IFormatReadergetOptimalTileHeight in interface IFormatReadergetOptimalTileHeight in class FormatReaderprotected void initFile(java.lang.String id)
throws FormatException,
java.io.IOException
SubResolutionFormatReaderinitFile in class SubResolutionFormatReaderFormatException - if a parsing error occurs processing the file.java.io.IOException - if an I/O error occurs processing the fileprotected void setResolutionLevel(IFD ifd)
ifd - The active IFD that is being used in our current
openBytes() calling context. It will be the sub-resolution
IFD if currentSeries > 0.protected void initTiffParser()
Copyright © 2020 Open Microscopy Environment