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 boolean[] |
flipX |
private boolean[] |
flipY |
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 static java.lang.String |
LOGO_FILE |
private java.util.List<java.lang.String> |
lutNames |
private java.lang.Double[] |
magnification |
private static long |
METER_MULTIPLY |
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 static java.lang.String |
STYLESHEET_FILE |
private boolean[] |
swapXY |
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_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixes
CAN_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) |
private ome.units.quantity.Length |
checkFlip(boolean flip,
ome.units.quantity.Length pos) |
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.
|
java.lang.String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
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 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, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, 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, 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, setSeries, updateMetadataLists
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
public 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 java.lang.String LOGO_FILE
private static final java.lang.String STYLESHEET_FILE
private static final com.google.common.collect.ImmutableMap<java.lang.String,java.lang.Integer> CHANNEL_PRIORITIES
private static final long METER_MULTIPLY
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 boolean[] flipX
private boolean[] flipY
private boolean[] swapXY
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()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
in class FormatReader
public boolean isThisType(loci.common.RandomAccessInputStream stream) throws java.io.IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
stream
- A RandomAccessInputStream representing the file to check.
The first byte in the stream is assumed to be the first byte
in the file.java.io.IOException
public byte[][] get8BitLookupTable()
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
public short[][] get16BitLookupTable()
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
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, java.io.IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class FormatReader
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-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.IOException
public java.lang.String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
IFormatHandler.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 IFormatReader
getSeriesUsedFiles
in class FormatReader
public void close(boolean fileOnly) throws java.io.IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
java.io.IOException
protected void initFile(java.lang.String id) throws FormatException, java.io.IOException
FormatReader
initFile
in class FormatReader
FormatException
- 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
FormatException
java.io.IOException
private ome.units.quantity.Length checkFlip(boolean flip, ome.units.quantity.Length pos)
private org.w3c.dom.Element getMetadataRoot(java.lang.String xml) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void translateMetadata(org.w3c.dom.Element root) throws FormatException
FormatException
private 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
FormatException
private void translateROIs(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private void translateSingleROIs(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private void translateLaserLines(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private void translateTimestamps(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private 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
FormatException
private void translateScannerSettings(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private void translateAttachmentNodes(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private void addUserCommentMeta(org.w3c.dom.Element imageNode, int image) throws FormatException
FormatException
private void translateImageNodes(org.w3c.dom.Element imageNode, int i) throws FormatException
FormatException
private 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 ome.xml.model.primitives.Color getChannelColor(int colorCode)
private int getTileIndex(int coreIndex)
Copyright © 2020 Open Microscopy Environment