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, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataOptions, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, LOGGER, suffixes
CAN_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 |
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 |
setMetadataCollected(boolean collect)
Deprecated.
|
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, addMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, close, coreIndexToSeries, fileGroupOption, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getChannelDimLengths, getChannelDimTypes, getCompression, getContrastMethod, getCoreIndex, getCoreMetadata, 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, getMetadata, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getNamingConvention, getPixelType, getPixelType, getPossibleDomains, getPulse, 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, isMetadataCollected, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, seriesToCoreIndex
checkSuffix, checkSuffix, getFormat, getNativeDataType, getSuffixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
protected 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 IMetadataConfigurable
getSupportedMetadataLevels
in class FormatReader
public MetadataOptions getMetadataOptions()
getMetadataOptions
in interface IMetadataConfigurable
getMetadataOptions
in class FormatReader
public void setMetadataOptions(MetadataOptions options)
setMetadataOptions
in interface IMetadataConfigurable
setMetadataOptions
in class FormatReader
public boolean isThisType(String name, boolean open)
FormatReader
FormatReader.isThisType(RandomAccessInputStream)
.isThisType
in interface IFormatReader
isThisType
in class FormatReader
open
- 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
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
IOException
public void setSeries(int no)
IFormatReader
setSeries
in interface IFormatReader
setSeries
in class FormatReader
public void setResolution(int resolution)
IFormatReader
setResolution
in interface IFormatReader
setResolution
in class FormatReader
IFormatReader.getResolutionCount()
public void setNormalized(boolean normalize)
IFormatReader
setNormalized
in interface IFormatReader
setNormalized
in class FormatReader
public void setMetadataCollected(boolean collect)
IFormatReader
setMetadataCollected
in interface IFormatReader
setMetadataCollected
in class FormatReader
IFormatReader.setMetadataCollected(boolean)
public void setOriginalMetadataPopulated(boolean populate)
IFormatReader
setOriginalMetadataPopulated
in interface IFormatReader
setOriginalMetadataPopulated
in class FormatReader
public void setGroupFiles(boolean group)
IFormatReader
setGroupFiles
in interface IFormatReader
setGroupFiles
in class FormatReader
public void setFlattenedResolutions(boolean flattened)
IFormatReader
setFlattenedResolutions
in interface IFormatReader
setFlattenedResolutions
in class FormatReader
public void setMetadataFiltered(boolean filter)
IFormatReader
setMetadataFiltered
in interface IFormatReader
setMetadataFiltered
in class FormatReader
public void setMetadataStore(MetadataStore store)
IFormatReader
setMetadataStore
in interface IFormatReader
setMetadataStore
in class FormatReader
store
- a metadata store implementation.public byte[][] get8BitLookupTable() throws FormatException, 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
IOException
public short[][] get16BitLookupTable() throws FormatException, 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
IOException
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class FormatReader
no
- 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
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
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
public void setId(String id) throws FormatException, IOException
IFormatHandler
setId
in interface IFormatHandler
setId
in class FormatReader
FormatException
IOException
Copyright © 2014 Open Microscopy Environment