public class LIFReader extends FormatReader
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
LIFReader.ROI |
| Modifier and Type | Field and Description |
|---|---|
private double[] |
acquiredDate |
private java.util.List[] |
activeDetector |
private boolean |
alternateCenter |
private static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Integer> |
CHANNEL_PRIORITIES |
private java.lang.String[][] |
channelNames |
private java.lang.String[] |
corrections |
private java.util.List[] |
cutIns |
private java.util.List[] |
cutOuts |
private java.lang.String[] |
descriptions |
private java.util.HashMap[] |
detectorIndexes |
private java.util.List[] |
detectorModels |
private java.lang.Double[][] |
detectorOffsets |
private static java.lang.String |
ENCODING
The encoding used in this file.
|
private long |
endPointer |
private java.lang.Double[][] |
expTimes |
private java.lang.Double[][] |
exWaves |
private java.util.List<ome.units.quantity.Length> |
fieldPosX |
private java.util.List<ome.units.quantity.Length> |
fieldPosY |
private java.util.List[] |
filterModels |
private java.lang.Double[][] |
gains |
private java.lang.String[] |
imageNames |
private LIFReader.ROI[][] |
imageROIs |
private java.lang.String[] |
immersions |
private java.util.List[] |
laserActive |
private java.util.List[] |
laserFrap |
private java.util.List[] |
laserIntensity |
private java.util.List[] |
laserWavelength |
private int |
lastChannel |
private java.lang.Double[] |
lensNA |
static byte |
LIF_MAGIC_BYTE |
static byte |
LIF_MEMORY_BYTE |
private java.util.List<java.lang.String> |
lutNames |
private java.lang.Double[] |
magnification |
private java.lang.String[] |
microscopeModels |
private java.lang.String[] |
objectiveModels |
private java.util.List<java.lang.Long> |
offsets
Offsets to memory blocks, paired with their corresponding description.
|
static boolean |
OLD_PHYSICAL_SIZE_DEFAULT |
static java.lang.String |
OLD_PHYSICAL_SIZE_KEY |
private java.util.List<java.lang.Double> |
physicalSizeXs |
private java.util.List<java.lang.Double> |
physicalSizeYs |
private java.lang.Double[] |
pinholes |
private ome.units.quantity.Length[] |
posX |
private ome.units.quantity.Length[] |
posY |
private ome.units.quantity.Length[] |
posZ |
private int[][] |
realChannel |
private java.lang.Double[] |
refractiveIndex |
private java.lang.String[] |
serialNumber |
private long[] |
tileBytesInc |
private int[] |
tileCount |
private java.lang.Double[][] |
timestamps |
private java.lang.Double[] |
tSteps |
private java.lang.Double[] |
zooms |
private java.lang.Double[] |
zSteps |
core, coreIndex, datasetDescription, domains, 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 |
|---|
LIFReader()
Constructs a new Leica LIF reader.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addUserCommentMeta(org.w3c.dom.Element imageNode,
int image) |
void |
close(boolean fileOnly)
Closes the currently open file.
|
private static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Integer> |
createChannelPriorities() |
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.
|
private ome.xml.model.primitives.Color |
getChannelColor(int colorCode) |
private org.w3c.dom.NodeList |
getChannelDescriptionNodes(org.w3c.dom.Element root) |
private int |
getChannelIndex(org.w3c.dom.Element filterSetting) |
private org.w3c.dom.NodeList |
getDimensionDescriptionNodes(org.w3c.dom.Element root) |
private org.w3c.dom.Element |
getImageDescription(org.w3c.dom.Element root) |
private org.w3c.dom.Element |
getMetadataRoot(java.lang.String xml) |
private org.w3c.dom.NodeList |
getNodes(org.w3c.dom.Element root,
java.lang.String nodeName) |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
private int |
getTileIndex(int coreIndex) |
protected void |
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.).
|
private void |
initMetadata(java.lang.String xml)
Parses a string of XML and puts the values in a Hashtable.
|
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.
|
private double |
parseDouble(java.lang.String number) |
private void |
populateOriginalMetadata(org.w3c.dom.Element root,
java.util.Deque<java.lang.String> nameStack) |
private void |
seekStartOfPlane(int no,
long dataOffset,
long planeSize) |
private void |
translateAttachmentNodes(org.w3c.dom.Element imageNode,
int image) |
private void |
translateDetectors(org.w3c.dom.Element imageNode,
int image) |
private void |
translateFilterSettings(org.w3c.dom.Element imageNode,
int image) |
private void |
translateImageNames(org.w3c.dom.Element imageNode,
int image) |
private void |
translateImageNodes(org.w3c.dom.Element imageNode,
int i) |
private void |
translateLaserLines(org.w3c.dom.Element imageNode,
int image) |
private void |
translateMetadata(org.w3c.dom.Element root) |
private void |
translateROIs(org.w3c.dom.Element imageNode,
int image) |
private void |
translateScannerSettings(org.w3c.dom.Element imageNode,
int image) |
private void |
translateSingleROIs(org.w3c.dom.Element imageNode,
int image) |
private double |
translateSingleTimestamp(org.w3c.dom.Element timestamp) |
private double |
translateSingleTimestamp(java.lang.String timestamp) |
private void |
translateTimestamps(org.w3c.dom.Element imageNode,
int image) |
boolean |
useOldPhysicalSizeCalculation() |
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, coreIndexToSeries, fileGroupOption, flattenHashtables, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getOptimalTileWidth, 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, 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, openThumbBytes, readPlane, readPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeriescheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionspublic static final java.lang.String OLD_PHYSICAL_SIZE_KEY
public static final boolean OLD_PHYSICAL_SIZE_DEFAULT
public static final byte LIF_MAGIC_BYTE
public static final byte LIF_MEMORY_BYTE
private static final java.lang.String ENCODING
private static final com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Integer> CHANNEL_PRIORITIES
private java.util.List<java.lang.Long> offsets
private int[][] realChannel
private int lastChannel
private java.util.List<java.lang.String> lutNames
private java.util.List<java.lang.Double> physicalSizeXs
private java.util.List<java.lang.Double> physicalSizeYs
private java.util.List<ome.units.quantity.Length> fieldPosX
private java.util.List<ome.units.quantity.Length> fieldPosY
private java.lang.String[] descriptions
private java.lang.String[] microscopeModels
private java.lang.String[] serialNumber
private java.lang.Double[] pinholes
private java.lang.Double[] zooms
private java.lang.Double[] zSteps
private java.lang.Double[] tSteps
private java.lang.Double[] lensNA
private java.lang.Double[][] expTimes
private java.lang.Double[][] gains
private java.lang.Double[][] detectorOffsets
private java.lang.String[][] channelNames
private java.util.List[] detectorModels
private java.lang.Double[][] exWaves
private java.util.List[] activeDetector
private java.util.HashMap[] detectorIndexes
private java.lang.String[] immersions
private java.lang.String[] corrections
private java.lang.String[] objectiveModels
private java.lang.Double[] magnification
private ome.units.quantity.Length[] posX
private ome.units.quantity.Length[] posY
private ome.units.quantity.Length[] posZ
private java.lang.Double[] refractiveIndex
private java.util.List[] cutIns
private java.util.List[] cutOuts
private java.util.List[] filterModels
private java.lang.Double[][] timestamps
private java.util.List[] laserWavelength
private java.util.List[] laserIntensity
private java.util.List[] laserActive
private java.util.List[] laserFrap
private LIFReader.ROI[][] imageROIs
private boolean alternateCenter
private java.lang.String[] imageNames
private double[] acquiredDate
private int[] tileCount
private long[] tileBytesInc
private long endPointer
private static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Integer> createChannelPriorities()
public boolean useOldPhysicalSizeCalculation()
public int getOptimalTileHeight()
IFormatReadergetOptimalTileHeight in interface IFormatReadergetOptimalTileHeight in class FormatReaderpublic boolean isThisType(loci.common.RandomAccessInputStream stream)
throws java.io.IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderjava.io.IOExceptionpublic byte[][] get8BitLookupTable()
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 FormatReaderpublic short[][] get16BitLookupTable()
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 FormatReaderpublic 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 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.java.io.IOException - if there was a problem reading the file.IFormatReader.openBytes(int, byte[], int, int, int, int)private void seekStartOfPlane(int no,
long dataOffset,
long planeSize)
throws java.io.IOException
java.io.IOExceptionpublic void close(boolean fileOnly)
throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class FormatReaderjava.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 fileprivate void initMetadata(java.lang.String xml)
throws FormatException,
java.io.IOException
FormatExceptionjava.io.IOExceptionprivate org.w3c.dom.Element getMetadataRoot(java.lang.String xml)
throws FormatException,
java.io.IOException
FormatExceptionjava.io.IOExceptionprivate void translateMetadata(org.w3c.dom.Element root)
throws FormatException
FormatExceptionprivate void populateOriginalMetadata(org.w3c.dom.Element root,
java.util.Deque<java.lang.String> nameStack)
private void translateImageNames(org.w3c.dom.Element imageNode,
int image)
private void translateDetectors(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateROIs(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateSingleROIs(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateLaserLines(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateTimestamps(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate double translateSingleTimestamp(java.lang.String timestamp)
private double translateSingleTimestamp(org.w3c.dom.Element timestamp)
private void translateFilterSettings(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateScannerSettings(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateAttachmentNodes(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void addUserCommentMeta(org.w3c.dom.Element imageNode,
int image)
throws FormatException
FormatExceptionprivate void translateImageNodes(org.w3c.dom.Element imageNode,
int i)
throws FormatException
FormatExceptionprivate org.w3c.dom.NodeList getNodes(org.w3c.dom.Element root,
java.lang.String nodeName)
private org.w3c.dom.Element getImageDescription(org.w3c.dom.Element root)
private org.w3c.dom.NodeList getChannelDescriptionNodes(org.w3c.dom.Element root)
private org.w3c.dom.NodeList getDimensionDescriptionNodes(org.w3c.dom.Element root)
private int getChannelIndex(org.w3c.dom.Element filterSetting)
private double parseDouble(java.lang.String number)
private ome.xml.model.primitives.Color getChannelColor(int colorCode)
private int getTileIndex(int coreIndex)
Copyright © 2018 Open Microscopy Environment