public class XLEFReader extends LMSFileReader
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
XLEFReader.PathComparator
Helper class to sort file paths by name and depth
|
LMSFileReader.ImageFormat| Modifier and Type | Field and Description |
|---|---|
private java.util.List<LMSFileReader> |
readers |
associatedXmlDoc, log, metaTemp, OLD_PHYSICAL_SIZE_DEFAULT, OLD_PHYSICAL_SIZE_KEYcore, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
XLEFReader()
Constructs a new Leica XLEF reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
int |
fileGroupOption(java.lang.String id)
Returns an indication of whether the files in a multi-file dataset can
be handled individually.
|
LMSFileReader.ImageFormat |
getImageFormat()
Returns the file format in which actual image bytes are stored
|
private int |
getReaderIndex(int seriesIndex)
Returns the index of the correct reader for the series index.
|
private byte[] |
getRgbChannel(int channel,
byte[] in)
Returns single channel data for an rgb plane
|
private int |
getSeriesPerReaderIndex(int series)
Returns the index of the series (tile) in the corresponding reader
|
java.lang.String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
java.lang.String[] |
getUsedFiles(boolean noPixels)
Returns an array of filenames needed to open this dataset.
|
protected void |
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.).
|
boolean |
isSingleFile(java.lang.String id)
Returns true if the named file is expected to be the only
file in the dataset.
|
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).
|
private byte[] |
openBytesJpeg(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Gets bytes of jpeg images.
|
void |
reopenFile()
Reopen any files that were closed, and which are expected to be open
while the reader is open.
|
private void |
setMetadataOfMultipleImagesReaders() |
private void |
sortMultipleImagesReaders()
Sorts frames of all MultipleImagesReaders as per core dimension sizes and order
|
private void |
sortPaths(java.util.List<java.lang.String> paths)
Sorts file paths by name and depth and moves current file path to the beginning
|
private int |
sum(int[] arr,
int start,
int end)
Sums up all values of an array, from start index to (including) end index
|
private void |
transformBytes8To16(byte[] in,
byte[] out,
int outRes)
Transforms an 8bit byte array to a 16bit byte array, optionally with bit upscaling (8-16bit)
|
addSeriesMeta, addSeriesMetaList, fileExists, getCore, makeFilterMetadata, setCore, translateMetadata, translateMetadata, useOldPhysicalSizeCalculationaddGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, close, coreIndexToSeries, flattenHashtables, get16BitLookupTable, get8BitLookupTable, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, 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, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, updateMetadataListscheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionsprivate java.util.List<LMSFileReader> readers
public 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 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.public byte[] openBytes(int no,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class FormatReaderFormatExceptionjava.io.IOExceptionprotected void initFile(java.lang.String id)
throws FormatException,
java.io.IOException
FormatReaderinitFile in class FormatReaderFormatException - if a parsing error occurs processing the file.java.io.IOException - if an I/O error occurs processing the filepublic boolean isSingleFile(java.lang.String id)
throws FormatException,
java.io.IOException
IFormatReaderisSingleFile in interface IFormatReaderisSingleFile in class FormatReaderFormatExceptionjava.io.IOExceptionpublic int fileGroupOption(java.lang.String id)
throws FormatException,
java.io.IOException
IFormatReaderfileGroupOption in interface IFormatReaderfileGroupOption in class FormatReaderid - a file in the multi-file datasetFormatTools.MUST_GROUP indicates that the
files cannot be handled separately; the reader will always detect and
read all files in the dataset. FormatTools.CAN_GROUP indicates
that the files may be handled separately, but file grouping must then
be disabled via IFormatReader.setGroupFiles(boolean).
FormatTools.CANNOT_GROUP indicates that the files must be handled
separately; the reader will not attempt to read all files in the dataset
(this is rare).FormatExceptionjava.io.IOExceptionFormatTools.MUST_GROUP,
FormatTools.CAN_GROUP,
FormatTools.CANNOT_GROUPpublic java.lang.String[] getUsedFiles(boolean noPixels)
IFormatReaderIFormatHandler.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.getUsedFiles in interface IFormatReadergetUsedFiles in class FormatReaderpublic java.lang.String[] getSeriesUsedFiles(boolean noPixels)
IFormatReaderIFormatHandler.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.getSeriesUsedFiles in interface IFormatReadergetSeriesUsedFiles in class FormatReaderpublic void close(boolean fileOnly)
throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class LMSFileReaderjava.io.IOExceptionpublic 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 LMSFileReader.ImageFormat getImageFormat()
LMSFileReadergetImageFormat in class LMSFileReaderprivate int getReaderIndex(int seriesIndex)
seriesIndex - index of seriesprivate int getSeriesPerReaderIndex(int series)
series - index of the series over all readersprivate byte[] openBytesJpeg(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
no - the plane index within the current seriesbuf - a pre-allocated bufferx - 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-imageFormatExceptionjava.io.IOExceptionprivate void sortMultipleImagesReaders()
throws FormatException
FormatExceptionprivate void setMetadataOfMultipleImagesReaders()
private void transformBytes8To16(byte[] in,
byte[] out,
int outRes)
in - 8bit buffer with dataout - 16bit buffer to be filledoutRes - resolution to which data shall be upscaled (8-16)private byte[] getRgbChannel(int channel,
byte[] in)
channel - Index of channel that shall be readin - channel separated bufferprivate int sum(int[] arr,
int start,
int end)
arr - start - first array position whose value shall be addedend - last array position whose value shall be addedprivate void sortPaths(java.util.List<java.lang.String> paths)
paths - Copyright © 2023 Open Microscopy Environment