Package loci.formats
Class WrappedReader
java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatReader
loci.formats.WrappedReader
- All Implemented Interfaces:
Closeable,AutoCloseable,ICompressedTileReader,IFormatHandler,IFormatReader,IMetadataConfigurable,IPyramidHandler
- Direct Known Subclasses:
FilePatternReader
Helper class for readers which wrap other readers.
Some methods can only be called before initFile/setId, others can only be called after.
This class assumes the helper object is only available after initFile() has been called.
Instead the inherited FormatReader and IMetadataConfigurable methods are kept since the properties
they set are inherited. These properties can be set on the helper class in initFile() by calling
callDeferredSetters().
The following setters and corresponding getters are not passed to the helper.
If you initialise the helper in the constructor instead of at runtime during initFile()
you may wish to override them.
- getSupportedMetadataLevels
- setMetadataOptions, getMetadataOptions
- setGroupFiles, isGroupFiles
- setNormalized, isNormalized
- setOriginalMetadataPopulated, isOriginalMetadataPopulated
- setMetadataFiltered, isMetadataFiltered
- setMetadataStore, getMetadataStore
- setFlattenedResolutions, hasFlattenedResolutions
Developer note: the list of methods are those in IMetadataConfigurable plus FormatReader methods
which contain `FormatTools.assertId(currentId, false, 1)`
-
Field Summary
Fields inherited from class loci.formats.FormatReader
core, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONFields inherited from class loci.formats.FormatHandler
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixesFields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWrappedReader(String format, String[] suffixes) Constructs a new wrapped reader with the given name and suffixes. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcallDeferredSetters(ReaderWrapper helper) A helper may not exist before initFile() is called.voidclose()voidclose(boolean fileOnly) Closes the currently open file.intcoreIndexToSeries(int index) Returns the series corresponding to the specified core index.short[][]Gets the 16-bit color lookup table associated with the most recently opened image.byte[][]Gets the 8-bit color lookup table associated with the most recently opened image.intGets the number of valid bits per pixel.intReturn the index into CoreMetadata of the current resolution/series.Obtains the core metadata values for the current file.Returns a short description of the dataset structure.Gets a five-character string representing the dimension order in which planes will be returned.String[]Returns the list of domains represented by the current file.intGets the effective size of the C dimension, guaranteeing that getEffectiveSizeC() * getSizeZ() * getSizeT() == getImageCount() regardless of the result of isRGB().Obtains the hashtable containing the metadata field/value pairs from the current file.protected abstract ReaderWrapperGet the helper class that reads imagesintDetermines the number of image planes in the current file.intgetIndex(int z, int c, int t) Gets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).Retrieves the current metadata store's root object.getMetadataValue(String field) Obtains the specified metadata field's value for the current file.Class<?> Returns the native data type of image planes for this reader, as returned byIFormatReader.openPlane(int, int, int, int, int)orIFormatWriter.savePlane(int, java.lang.Object).intReturns the optimal sub-image height for use with openBytes.intReturns the optimal sub-image width for use with openBytes.intGets the pixel type.String[]Returns a list of scientific domains in which this format is used.intGet the current resolution level.intReturn the number of resolutions for the current series.intGets the number of channels returned with each call to openBytes.intGets the currently active series.intGets the number of series in this file.Obtains the hashtable containing metadata field/value pairs from the current series in the current file.getSeriesMetadataValue(String field) Obtains the specified metadata field's value for the current series in the current file.String[]getSeriesUsedFiles(boolean noPixels) Returns an array of filenames needed to open the current series.intgetSizeC()Gets the size of the C dimension.intgetSizeT()Gets the size of the T dimension.intgetSizeX()Gets the size of the X dimension.intgetSizeY()Gets the size of the Y dimension.intgetSizeZ()Gets the size of the Z dimension.intGet the size of the X dimension for the thumbnail.intGet the size of the Y dimension for the thumbnail.Retrieves all underlying readers.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.booleanReturns true if this format supports multi-file datasets.booleanReturns false ifIFormatReader.isIndexed()is false, or ifIFormatReader.isIndexed()is true and the lookup table represents "real" color data.booleanGets whether the image planes are indexed color.booleanGets whether or not the channels are interleaved.booleanisInterleaved(int subC) Gets whether or not the given sub-channel is interleaved.booleanGets whether the data is in little-endian format.booleanReturns true if this format's metadata is completely parsed.booleanGets whether the dimension order and sizes are known, or merely guesses.booleanisRGB()Checks if the image planes in the file have more than one channel perIFormatReader.openBytes(int)call.booleanisSingleFile(String id) Returns true if the named file is expected to be the only file in the dataset.booleanGets whether the current series is a lower resolution copy of a different series.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).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.voidReopen any files that were closed, and which are expected to be open while the reader is open.intseriesToCoreIndex(int series) Returns the first core index corresponding to the specified series.voidsetCoreIndex(int no) Set the current resolution/series (ignores subresolutions).voidsetResolution(int no) Set the resolution level.voidsetSeries(int no) Activates the specified series.Methods inherited from class loci.formats.FormatReader
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, fileGroupOption, flattenHashtables, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getCompression, getContrastMethod, getCorrection, getCurrentCore, getCurrentFile, getDetectorType, getDimensionOrder, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getIlluminationType, getImmersion, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMicrobeamManipulationType, getMicroscopeType, getNamingConvention, getPixelType, getPulse, getRequiredDirectories, getRotationTransform, getSeriesMeta, getSeriesUsedFiles, getTileColumns, getTileRows, getUsedFiles, getZCTModuloCoords, hasFlattenedResolutions, initFile, isGroupFiles, isMetadataFiltered, isNormalized, isOriginalMetadataPopulated, isThisType, isThisType, isThisType, isThisType, isUsedFile, makeFilterMetadata, readPlane, readPlane, readPlane, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataListsMethods inherited from class loci.formats.FormatHandler
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.formats.ICompressedTileReader
getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytesMethods inherited from interface loci.formats.IFormatHandler
getFormat, getSuffixesMethods inherited from interface loci.formats.IMetadataConfigurable
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
-
Constructor Details
-
WrappedReader
Constructs a new wrapped reader with the given name and suffixes.
-
-
Method Details
-
getHelper
Get the helper class that reads images -
reopenFile
Description copied from interface:IFormatReaderReopen any files that were closed, and which are expected to be open while the reader is open. This assumes thatIFormatHandler.setId(java.lang.String)has been called, but close(false) has not been called.- Specified by:
reopenFilein interfaceIFormatReader- Overrides:
reopenFilein classFormatReader- Throws:
IOException
-
getImageCount
public int getImageCount()Description copied from interface:IFormatReaderDetermines the number of image planes in the current file.- Specified by:
getImageCountin interfaceIFormatReader- Overrides:
getImageCountin classFormatReader
-
isRGB
public boolean isRGB()Description copied from interface:IFormatReaderChecks if the image planes in the file have more than one channel perIFormatReader.openBytes(int)call. This method returns true if and only ifIFormatReader.getRGBChannelCount()returns a value greater than 1.- Specified by:
isRGBin interfaceIFormatReader- Overrides:
isRGBin classFormatReader
-
getSizeX
public int getSizeX()Description copied from interface:IFormatReaderGets the size of the X dimension.- Specified by:
getSizeXin interfaceIFormatReader- Overrides:
getSizeXin classFormatReader
-
getSizeY
public int getSizeY()Description copied from interface:IFormatReaderGets the size of the Y dimension.- Specified by:
getSizeYin interfaceIFormatReader- Overrides:
getSizeYin classFormatReader
-
getSizeZ
public int getSizeZ()Description copied from interface:IFormatReaderGets the size of the Z dimension.- Specified by:
getSizeZin interfaceIFormatReader- Overrides:
getSizeZin classFormatReader
-
getSizeC
public int getSizeC()Description copied from interface:IFormatReaderGets the size of the C dimension.- Specified by:
getSizeCin interfaceIFormatReader- Overrides:
getSizeCin classFormatReader
-
getSizeT
public int getSizeT()Description copied from interface:IFormatReaderGets the size of the T dimension.- Specified by:
getSizeTin interfaceIFormatReader- Overrides:
getSizeTin classFormatReader
-
getPixelType
public int getPixelType()Description copied from interface:IFormatReaderGets the pixel type.- Specified by:
getPixelTypein interfaceIFormatReader- Overrides:
getPixelTypein classFormatReader- Returns:
- the pixel type as an enumeration from
FormatToolsstatic pixel types such asFormatTools.INT8.
-
getBitsPerPixel
public int getBitsPerPixel()Description copied from interface:IFormatReaderGets the number of valid bits per pixel. The number of valid bits per pixel is always less than or equal to the number of bits per pixel that correspond toIFormatReader.getPixelType().- Specified by:
getBitsPerPixelin interfaceIFormatReader- Overrides:
getBitsPerPixelin classFormatReader
-
getEffectiveSizeC
public int getEffectiveSizeC()Description copied from interface:IFormatReaderGets the effective size of the C dimension, guaranteeing that getEffectiveSizeC() * getSizeZ() * getSizeT() == getImageCount() regardless of the result of isRGB().- Specified by:
getEffectiveSizeCin interfaceIFormatReader- Overrides:
getEffectiveSizeCin classFormatReader
-
getRGBChannelCount
public int getRGBChannelCount()Description copied from interface:IFormatReaderGets the number of channels returned with each call to openBytes. The most common case where this value is greater than 1 is for interleaved RGB data, such as a 24-bit color image plane. However, it is possible for this value to be greater than 1 for non-interleaved data, such as an RGB TIFF with Planar rather than Chunky configuration.- Specified by:
getRGBChannelCountin interfaceIFormatReader- Overrides:
getRGBChannelCountin classFormatReader
-
isIndexed
public boolean isIndexed()Description copied from interface:IFormatReaderGets whether the image planes are indexed color. This value has no impact onIFormatReader.getSizeC(),IFormatReader.getEffectiveSizeC()orIFormatReader.getRGBChannelCount().- Specified by:
isIndexedin interfaceIFormatReader- Overrides:
isIndexedin classFormatReader
-
isFalseColor
public boolean isFalseColor()Description copied from interface:IFormatReaderReturns false ifIFormatReader.isIndexed()is false, or ifIFormatReader.isIndexed()is true and the lookup table represents "real" color data. Returns true ifIFormatReader.isIndexed()is true and the lookup table is only present to aid in visualization.- Specified by:
isFalseColorin interfaceIFormatReader- Overrides:
isFalseColorin classFormatReader
-
get8BitLookupTable
Description copied from interface:IFormatReaderGets the 8-bit color lookup table associated with the most recently opened image. If no image planes have been opened, or ifIFormatReader.isIndexed()returns false, then this may return null. Also, ifIFormatReader.getPixelType()returns anything other thanFormatTools.INT8orFormatTools.UINT8, this method will return null.- Specified by:
get8BitLookupTablein interfaceIFormatReader- Overrides:
get8BitLookupTablein classFormatReader- Throws:
FormatExceptionIOException
-
get16BitLookupTable
Description copied from interface:IFormatReaderGets the 16-bit color lookup table associated with the most recently opened image. If no image planes have been opened, or ifIFormatReader.isIndexed()returns false, then this may return null. Also, ifIFormatReader.getPixelType()returns anything other thanFormatTools.INT16orFormatTools.UINT16, this method will return null.- Specified by:
get16BitLookupTablein interfaceIFormatReader- Overrides:
get16BitLookupTablein classFormatReader- Throws:
FormatExceptionIOException
-
getModuloZ
- Specified by:
getModuloZin interfaceIFormatReader- Overrides:
getModuloZin classFormatReader
-
getModuloC
- Specified by:
getModuloCin interfaceIFormatReader- Overrides:
getModuloCin classFormatReader
-
getModuloT
- Specified by:
getModuloTin interfaceIFormatReader- Overrides:
getModuloTin classFormatReader
-
getThumbSizeX
public int getThumbSizeX()Description copied from interface:IFormatReaderGet the size of the X dimension for the thumbnail.- Specified by:
getThumbSizeXin interfaceIFormatReader- Overrides:
getThumbSizeXin classFormatReader
-
getThumbSizeY
public int getThumbSizeY()Description copied from interface:IFormatReaderGet the size of the Y dimension for the thumbnail.- Specified by:
getThumbSizeYin interfaceIFormatReader- Overrides:
getThumbSizeYin classFormatReader
-
isLittleEndian
public boolean isLittleEndian()Description copied from interface:IFormatReaderGets whether the data is in little-endian format.- Specified by:
isLittleEndianin interfaceIFormatReader- Overrides:
isLittleEndianin classFormatReader
-
getDimensionOrder
Description copied from interface:IFormatReaderGets a five-character string representing the dimension order in which planes will be returned. Valid orders are:- XYCTZ
- XYCZT
- XYTCZ
- XYTZC
- XYZCT
- XYZTC
IFormatReader.isInterleaved()method will return true.- Specified by:
getDimensionOrderin interfaceIFormatReader- Overrides:
getDimensionOrderin classFormatReader
-
isOrderCertain
public boolean isOrderCertain()Description copied from interface:IFormatReaderGets whether the dimension order and sizes are known, or merely guesses.- Specified by:
isOrderCertainin interfaceIFormatReader- Overrides:
isOrderCertainin classFormatReader
-
isThumbnailSeries
public boolean isThumbnailSeries()Description copied from interface:IFormatReaderGets whether the current series is a lower resolution copy of a different series.- Specified by:
isThumbnailSeriesin interfaceIFormatReader- Overrides:
isThumbnailSeriesin classFormatReader
-
isInterleaved
public boolean isInterleaved()Description copied from interface:IFormatReaderGets whether or not the channels are interleaved. This method exists because X and Y must appear first in the dimension order. For interleaved data,IFormatReader.getDimensionOrder()returns XYCTZ or XYCZT, and this method returns true. Note that this flag returns whether or not the data returned byIFormatReader.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.- Specified by:
isInterleavedin interfaceIFormatReader- Overrides:
isInterleavedin classFormatReader
-
isInterleaved
public boolean isInterleaved(int subC) Description copied from interface:IFormatReaderGets whether or not the given sub-channel is interleaved. This method exists because some data with multiple rasterized sub-dimensions within C have one sub-dimension interleaved, and the other not—e.g.,SDTReaderhandles spectral-lifetime data with interleaved lifetime bins and non-interleaved spectral channels.- Specified by:
isInterleavedin interfaceIFormatReader- Overrides:
isInterleavedin classFormatReader
-
openBytes
Description copied from interface:IFormatReaderObtains the specified image plane from the current file as a byte array.- Specified by:
openBytesin interfaceIFormatReader- Overrides:
openBytesin classFormatReader- Throws:
FormatExceptionIOException- See Also:
-
openBytes
Description copied from interface:IFormatReaderObtains a sub-image of the specified image plane, whose upper-left corner is given by (x, y).- Specified by:
openBytesin interfaceIFormatReader- Overrides:
openBytesin classFormatReader- Throws:
FormatExceptionIOException
-
openBytes
Description copied from interface:IFormatReaderObtains the specified image plane from the current file into a pre-allocated byte array of (sizeX * sizeY * bytesPerPixel * RGB channel count).- Specified by:
openBytesin interfaceIFormatReader- Overrides:
openBytesin classFormatReader- Parameters:
no- the plane index within the current series.buf- a pre-allocated buffer.- Returns:
- the pre-allocated buffer
buffor convenience. - Throws:
FormatException- if there was a problem parsing the metadata of the file.IOException- if there was a problem reading the file.
-
openBytes
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException Description copied from interface:IFormatReaderObtains a sub-image of the specified image plane into a pre-allocated byte array.- Specified by:
openBytesin interfaceIFormatReader- Specified by:
openBytesin classFormatReader- Parameters:
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-image- Returns:
- the pre-allocated buffer
buffor convenience. - Throws:
FormatException- if there was a problem parsing the metadata of the file.IOException- if there was a problem reading the file.
-
openPlane
Description copied from interface:IFormatReaderObtains the specified image plane (or sub-image thereof) in the reader's native data structure. For most readers this is a byte array; however, some readers call external APIs that work with other types such asBufferedImage. The openPlane method exists to maintain generality and efficiency while avoiding pollution of the API with AWT-specific logic.- Specified by:
openPlanein interfaceIFormatReader- Overrides:
openPlanein classFormatReader- Throws:
FormatExceptionIOException- See Also:
-
openThumbBytes
Description copied from interface:IFormatReaderObtains a thumbnail for the specified image plane from the current file, as a byte array.- Specified by:
openThumbBytesin interfaceIFormatReader- Overrides:
openThumbBytesin classFormatReader- Throws:
FormatExceptionIOException
-
close
Description copied from interface:IFormatReaderCloses the currently open file. If the flag is set, this is all that happens; if unset, it is equivalent to callingCloseable.close().- Specified by:
closein interfaceIFormatReader- Overrides:
closein classFormatReader- Throws:
IOException
-
getSeriesCount
public int getSeriesCount()Description copied from interface:IFormatReaderGets the number of series in this file.- Specified by:
getSeriesCountin interfaceIFormatReader- Overrides:
getSeriesCountin classFormatReader
-
setSeries
public void setSeries(int no) Description copied from interface:IFormatReaderActivates the specified series. This also resets the resolution to 0.- Specified by:
setSeriesin interfaceIFormatReader- Overrides:
setSeriesin classFormatReader
-
getSeries
public int getSeries()Description copied from interface:IFormatReaderGets the currently active series.- Specified by:
getSeriesin interfaceIFormatReader- Overrides:
getSeriesin classFormatReader
-
isMetadataComplete
public boolean isMetadataComplete()Description copied from interface:IFormatReaderReturns true if this format's metadata is completely parsed.- Specified by:
isMetadataCompletein interfaceIFormatReader- Overrides:
isMetadataCompletein classFormatReader
-
getSeriesUsedFiles
Description copied from interface:IFormatReaderReturns an array of filenames needed to open the current series. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned. The first element in the array is expected to be the path passed toIFormatHandler.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.- Specified by:
getSeriesUsedFilesin interfaceIFormatReader- Overrides:
getSeriesUsedFilesin classFormatReader
-
getUsedFiles
Description copied from interface:IFormatReaderReturns an array of filenames needed to open this dataset. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned. The first element in the array is expected to be the path passed toIFormatHandler.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.- Specified by:
getUsedFilesin interfaceIFormatReader- Overrides:
getUsedFilesin classFormatReader
-
getIndex
public int getIndex(int z, int c, int t) Description copied from interface:IFormatReaderGets the rasterized index corresponding to the given Z, C and T coordinates (real sizes).- Specified by:
getIndexin interfaceIFormatReader- Overrides:
getIndexin classFormatReader
-
getZCTCoords
public int[] getZCTCoords(int index) Description copied from interface:IFormatReaderGets the Z, C and T coordinates (real sizes) corresponding to the given rasterized index value.- Specified by:
getZCTCoordsin interfaceIFormatReader- Overrides:
getZCTCoordsin classFormatReader
-
getMetadataValue
Description copied from interface:IFormatReaderObtains the specified metadata field's value for the current file.- Specified by:
getMetadataValuein interfaceIFormatReader- Overrides:
getMetadataValuein classFormatReader- Parameters:
field- the name associated with the metadata field- Returns:
- the value, or null if the field doesn't exist
-
getSeriesMetadataValue
Description copied from interface:IFormatReaderObtains the specified metadata field's value for the current series in the current file.- Specified by:
getSeriesMetadataValuein interfaceIFormatReader- Overrides:
getSeriesMetadataValuein classFormatReader- Parameters:
field- the name associated with the metadata field- Returns:
- the value, or null if the field doesn't exist
-
getGlobalMetadata
Description copied from interface:IFormatReaderObtains the hashtable containing the metadata field/value pairs from the current file.- Specified by:
getGlobalMetadatain interfaceIFormatReader- Overrides:
getGlobalMetadatain classFormatReader- Returns:
- the hashtable containing all non-series-specific metadata from the file
-
getSeriesMetadata
Description copied from interface:IFormatReaderObtains the hashtable containing metadata field/value pairs from the current series in the current file.- Specified by:
getSeriesMetadatain interfaceIFormatReader- Overrides:
getSeriesMetadatain classFormatReader
-
getCoreMetadataList
Description copied from interface:IFormatReaderObtains the core metadata values for the current file.- Specified by:
getCoreMetadataListin interfaceIFormatReader- Overrides:
getCoreMetadataListin classFormatReader
-
getMetadataStoreRoot
Description copied from interface:IFormatReaderRetrieves the current metadata store's root object. It is guaranteed that all file parsing has been performed by the reader prior to retrieval. Requests for a full populated root object should be made using this method.- Specified by:
getMetadataStoreRootin interfaceIFormatReader- Overrides:
getMetadataStoreRootin classFormatReader- Returns:
- Current metadata store's root object fully populated.
-
getUnderlyingReaders
Description copied from interface:IFormatReaderRetrieves all underlying readers. Returns null if there are no underlying readers.- Specified by:
getUnderlyingReadersin interfaceIFormatReader- Overrides:
getUnderlyingReadersin classFormatReader
-
isSingleFile
Description copied from interface:IFormatReaderReturns true if the named file is expected to be the only file in the dataset. For single-file formats, always returns true.- Specified by:
isSingleFilein interfaceIFormatReader- Overrides:
isSingleFilein classFormatReader- Throws:
FormatExceptionIOException
-
getDatasetStructureDescription
Description copied from interface:IFormatReaderReturns a short description of the dataset structure.- Specified by:
getDatasetStructureDescriptionin interfaceIFormatReader- Overrides:
getDatasetStructureDescriptionin classFormatReader
-
hasCompanionFiles
public boolean hasCompanionFiles()Description copied from interface:IFormatReaderReturns true if this format supports multi-file datasets.- Specified by:
hasCompanionFilesin interfaceIFormatReader- Overrides:
hasCompanionFilesin classFormatReader
-
getPossibleDomains
Description copied from interface:IFormatReaderReturns a list of scientific domains in which this format is used.- Specified by:
getPossibleDomainsin interfaceIFormatReader- Overrides:
getPossibleDomainsin classFormatReader- Throws:
FormatExceptionIOException
-
getDomains
Description copied from interface:IFormatReaderReturns the list of domains represented by the current file.- Specified by:
getDomainsin interfaceIFormatReader- Overrides:
getDomainsin classFormatReader
-
getOptimalTileWidth
public int getOptimalTileWidth()Description copied from interface:IFormatReaderReturns the optimal sub-image width for use with openBytes.- Specified by:
getOptimalTileWidthin interfaceIFormatReader- Overrides:
getOptimalTileWidthin classFormatReader
-
getOptimalTileHeight
public int getOptimalTileHeight()Description copied from interface:IFormatReaderReturns the optimal sub-image height for use with openBytes.- Specified by:
getOptimalTileHeightin interfaceIFormatReader- Overrides:
getOptimalTileHeightin classFormatReader
-
getCoreIndex
public int getCoreIndex()Description copied from interface:IFormatReaderReturn the index into CoreMetadata of the current resolution/series.- Specified by:
getCoreIndexin interfaceIFormatReader- Overrides:
getCoreIndexin classFormatReader
-
setCoreIndex
public void setCoreIndex(int no) Description copied from interface:IFormatReaderSet the current resolution/series (ignores subresolutions). Equivalent to setSeries, but with flattened resolutions always set to false.- Specified by:
setCoreIndexin interfaceIFormatReader- Overrides:
setCoreIndexin classFormatReader
-
seriesToCoreIndex
public int seriesToCoreIndex(int series) Description copied from interface:IFormatReaderReturns the first core index corresponding to the specified series.- Specified by:
seriesToCoreIndexin interfaceIFormatReader- Overrides:
seriesToCoreIndexin classFormatReader
-
coreIndexToSeries
public int coreIndexToSeries(int index) Description copied from interface:IFormatReaderReturns the series corresponding to the specified core index.- Specified by:
coreIndexToSeriesin interfaceIFormatReader- Overrides:
coreIndexToSeriesin classFormatReader
-
getResolutionCount
public int getResolutionCount()Description copied from interface:IPyramidHandlerReturn the number of resolutions for the current series. Resolutions are stored in descending order, so the largest resolution is first and the smallest resolution is last.- Specified by:
getResolutionCountin interfaceIPyramidHandler- Overrides:
getResolutionCountin classFormatReader
-
setResolution
public void setResolution(int no) Description copied from interface:IPyramidHandlerSet the resolution level.- Specified by:
setResolutionin interfaceIPyramidHandler- Overrides:
setResolutionin classFormatReader- See Also:
-
getResolution
public int getResolution()Description copied from interface:IPyramidHandlerGet the current resolution level.- Specified by:
getResolutionin interfaceIPyramidHandler- Overrides:
getResolutionin classFormatReader- See Also:
-
getNativeDataType
Description copied from interface:IFormatHandlerReturns the native data type of image planes for this reader, as returned byIFormatReader.openPlane(int, int, int, int, int)orIFormatWriter.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 asBufferedImage.- Specified by:
getNativeDataTypein interfaceIFormatHandler- Overrides:
getNativeDataTypein classFormatHandler
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFormatReader- Throws:
IOException
-
callDeferredSetters
A helper may not exist before initFile() is called. This mean setters that would otherwise be called on the helper are instead called on this wrapper, and can be passed to the helper by calling this method- Parameters:
helper- The wrapped helper
-