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 |
core
coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixes
CAN_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, setSeries
addGlobalMeta, 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, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, 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, readPlane, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataLists
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
private 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
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
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 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
get8BitLookupTable
in class FormatReader
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
get16BitLookupTable
in class FormatReader
FormatException
java.io.IOException
public int getThumbSizeX()
IFormatReader
getThumbSizeX
in interface IFormatReader
getThumbSizeX
in class FormatReader
public int getThumbSizeY()
IFormatReader
getThumbSizeY
in interface IFormatReader
getThumbSizeY
in class FormatReader
public byte[] openThumbBytes(int no) throws FormatException, java.io.IOException
IFormatReader
openThumbBytes
in interface IFormatReader
openThumbBytes
in class FormatReader
FormatException
java.io.IOException
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
openBytes
in class FormatReader
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.FormatReader.openBytes(int, byte[], int, int, int, int)
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
reopenFile
in class FormatReader
java.io.IOException
public void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class SubResolutionFormatReader
java.io.IOException
public int getOptimalTileWidth()
IFormatReader
getOptimalTileWidth
in interface IFormatReader
getOptimalTileWidth
in class FormatReader
public int getOptimalTileHeight()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
in class FormatReader
protected void initFile(java.lang.String id) throws FormatException, java.io.IOException
SubResolutionFormatReader
initFile
in class SubResolutionFormatReader
FormatException
- 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 © 2023 Open Microscopy Environment