public abstract class DelegateReader extends FormatReader
| Modifier and Type | Field and Description |
|---|---|
protected IFormatReader |
legacyReader
Legacy reader.
|
protected boolean |
legacyReaderInitialized
Flag indicating that the legacy reader was successfully initialized.
|
protected IFormatReader |
nativeReader
Native reader.
|
protected boolean |
nativeReaderInitialized
Flag indicating that the native reader was successfully initialized.
|
protected boolean |
useLegacy
Flag indicating whether to use legacy reader by default.
|
core, coreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataOptions, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, LOGGER, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
DelegateReader(String format,
String suffix)
Constructs a new delegate reader.
|
DelegateReader(String format,
String[] suffixes)
Constructs a new delegate reader.
|
| 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.
|
MetadataOptions |
getMetadataOptions() |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
int |
getOptimalTileWidth()
Returns the optimal sub-image width for use with openBytes.
|
Set<MetadataLevel> |
getSupportedMetadataLevels() |
boolean |
isLegacy()
Gets whether to use the legacy reader by default.
|
boolean |
isThisType(RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
boolean |
isThisType(String name,
boolean open)
Checks if a file matches the type of this format reader.
|
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.
|
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 group)
Specifies whether or not to force grouping in multi-file formats.
|
void |
setId(String id)
Sets the current file name.
|
void |
setLegacy(boolean legacy)
Sets whether to use the legacy reader by default.
|
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 resolution)
Set the resolution level.
|
void |
setSeries(int no)
Activates the specified series.
|
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, coreIndexToSeries, fileGroupOption, flattenHashtables, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getChannelDimLengths, getChannelDimTypes, getCompression, getContrastMethod, getCoreIndex, getCoreMetadata, getCoreMetadataList, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getLaserMedium, getLaserType, getLineCap, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, hasCompanionFiles, hasFlattenedResolutions, initFile, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, seriesToCoreIndexcheckSuffix, checkSuffix, getFormat, getNativeDataType, getSuffixesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesprotected boolean useLegacy
protected IFormatReader nativeReader
protected IFormatReader legacyReader
protected boolean nativeReaderInitialized
protected boolean legacyReaderInitialized
public DelegateReader(String format, String suffix)
public void setLegacy(boolean legacy)
public boolean isLegacy()
public Set<MetadataLevel> getSupportedMetadataLevels()
getSupportedMetadataLevels in interface IMetadataConfigurablegetSupportedMetadataLevels in class FormatReaderpublic MetadataOptions getMetadataOptions()
getMetadataOptions in interface IMetadataConfigurablegetMetadataOptions in class FormatReaderpublic void setMetadataOptions(MetadataOptions options)
setMetadataOptions in interface IMetadataConfigurablesetMetadataOptions in class FormatReaderpublic boolean isThisType(String name, boolean open)
FormatReaderFormatReader.isThisType(RandomAccessInputStream).isThisType in interface IFormatReaderisThisType in class FormatReaderopen - If true, and the file extension is insufficient to determine
the file type, the (existing) file is opened for further analysis.public boolean isThisType(RandomAccessInputStream stream) throws IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderIOExceptionpublic void setSeries(int no)
IFormatReadersetSeries in interface IFormatReadersetSeries in class FormatReaderpublic void setCoreIndex(int no)
IFormatReadersetCoreIndex in interface IFormatReadersetCoreIndex in class FormatReaderpublic void setResolution(int resolution)
IFormatReadersetResolution in interface IFormatReadersetResolution in class FormatReaderIFormatReader.getResolutionCount()public void setNormalized(boolean normalize)
IFormatReadersetNormalized in interface IFormatReadersetNormalized in class FormatReaderpublic void setOriginalMetadataPopulated(boolean populate)
IFormatReadersetOriginalMetadataPopulated in interface IFormatReadersetOriginalMetadataPopulated in class FormatReaderpublic void setGroupFiles(boolean group)
IFormatReadersetGroupFiles in interface IFormatReadersetGroupFiles in class FormatReaderpublic void setFlattenedResolutions(boolean flattened)
IFormatReadersetFlattenedResolutions in interface IFormatReadersetFlattenedResolutions in class FormatReaderpublic void setMetadataFiltered(boolean filter)
IFormatReadersetMetadataFiltered in interface IFormatReadersetMetadataFiltered in class FormatReaderpublic void setMetadataStore(MetadataStore store)
IFormatReadersetMetadataStore in interface IFormatReadersetMetadataStore in class FormatReaderstore - a metadata store implementation.public byte[][] get8BitLookupTable()
throws FormatException,
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 FormatReaderFormatExceptionIOExceptionpublic short[][] get16BitLookupTable()
throws FormatException,
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 FormatReaderFormatExceptionIOExceptionpublic byte[] openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
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.IOException - if there was a problem reading the file.public void close(boolean fileOnly)
throws IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class FormatReaderIOExceptionpublic int getOptimalTileWidth()
IFormatReadergetOptimalTileWidth in interface IFormatReadergetOptimalTileWidth in class FormatReaderpublic int getOptimalTileHeight()
IFormatReadergetOptimalTileHeight in interface IFormatReadergetOptimalTileHeight in class FormatReaderpublic void setId(String id) throws FormatException, IOException
IFormatHandlersetId in interface IFormatHandlersetId in class FormatReaderFormatExceptionIOExceptionCopyright © 2014 Open Microscopy Environment