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 List[] |
activeDetector |
private boolean |
alternateCenter |
private static com.google.common.collect.ImmutableMap<String,Integer> |
CHANNEL_PRIORITIES |
private String[][] |
channelNames |
private String[] |
corrections |
private List[] |
cutIns |
private List[] |
cutOuts |
private String[] |
descriptions |
private HashMap[] |
detectorIndexes |
private List[] |
detectorModels |
private Double[][] |
detectorOffsets |
private static String |
ENCODING
The encoding used in this file.
|
private long |
endPointer |
private Double[][] |
expTimes |
private Double[][] |
exWaves |
private List<Length> |
fieldPosX |
private List<Length> |
fieldPosY |
private List[] |
filterModels |
private Double[][] |
gains |
private String[] |
imageNames |
private LIFReader.ROI[][] |
imageROIs |
private String[] |
immersions |
private List[] |
laserActive |
private List[] |
laserFrap |
private List[] |
laserIntensity |
private List[] |
laserWavelength |
private int |
lastChannel |
private Double[] |
lensNA |
static byte |
LIF_MAGIC_BYTE |
static byte |
LIF_MEMORY_BYTE |
private List<String> |
lutNames |
private Double[] |
magnification |
private String[] |
microscopeModels |
private String[] |
objectiveModels |
private List<Long> |
offsets
Offsets to memory blocks, paired with their corresponding description.
|
private List<Double> |
physicalSizeXs |
private List<Double> |
physicalSizeYs |
private Double[] |
pinholes |
private Length[] |
posX |
private Length[] |
posY |
private Length[] |
posZ |
private int[][] |
realChannel |
private Double[] |
refractiveIndex |
private String[] |
serialNumber |
private int[] |
tileCount |
private double[][] |
timestamps |
private Double[] |
tSteps |
private Double[] |
zooms |
private 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(Element imageNode,
int image) |
void |
close(boolean fileOnly)
Closes the currently open file.
|
private static com.google.common.collect.ImmutableMap<String,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 Color |
getChannelColor(int colorCode) |
private NodeList |
getChannelDescriptionNodes(Element root) |
private int |
getChannelIndex(Element filterSetting) |
private NodeList |
getDimensionDescriptionNodes(Element root) |
private Element |
getImageDescription(Element root) |
private Element |
getMetadataRoot(String xml) |
private NodeList |
getNodes(Element root,
String nodeName) |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
private int |
getTileIndex(int coreIndex) |
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
private void |
initMetadata(String xml)
Parses a string of XML and puts the values in a Hashtable.
|
boolean |
isThisType(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(String number) |
private void |
populateOriginalMetadata(Element root,
Deque<String> nameStack) |
private void |
translateAttachmentNodes(Element imageNode,
int image) |
private void |
translateDetectors(Element imageNode,
int image) |
private void |
translateFilterSettings(Element imageNode,
int image) |
private void |
translateImageNames(Element imageNode,
int image) |
private void |
translateImageNodes(Element imageNode,
int i) |
private void |
translateLaserLines(Element imageNode,
int image) |
private void |
translateMetadata(Element root) |
private void |
translateROIs(Element imageNode,
int image) |
private void |
translateScannerSettings(Element imageNode,
int image) |
private void |
translateSingleROIs(Element imageNode,
int image) |
private void |
translateTimestamps(Element imageNode,
int image) |
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 byte LIF_MAGIC_BYTE
public static final byte LIF_MEMORY_BYTE
private static final String ENCODING
private static final com.google.common.collect.ImmutableMap<String,Integer> CHANNEL_PRIORITIES
private List<Long> offsets
private int[][] realChannel
private int lastChannel
private String[] descriptions
private String[] microscopeModels
private String[] serialNumber
private Double[] pinholes
private Double[] zooms
private Double[] zSteps
private Double[] tSteps
private Double[] lensNA
private Double[][] expTimes
private Double[][] gains
private Double[][] detectorOffsets
private String[][] channelNames
private List[] detectorModels
private Double[][] exWaves
private List[] activeDetector
private HashMap[] detectorIndexes
private String[] immersions
private String[] corrections
private String[] objectiveModels
private Double[] magnification
private Length[] posX
private Length[] posY
private Length[] posZ
private Double[] refractiveIndex
private List[] cutIns
private List[] cutOuts
private List[] filterModels
private double[][] timestamps
private List[] laserWavelength
private List[] laserIntensity
private List[] laserActive
private List[] laserFrap
private LIFReader.ROI[][] imageROIs
private boolean alternateCenter
private String[] imageNames
private double[] acquiredDate
private int[] tileCount
private long endPointer
private static com.google.common.collect.ImmutableMap<String,Integer> createChannelPriorities()
public int getOptimalTileHeight()
IFormatReadergetOptimalTileHeight in interface IFormatReadergetOptimalTileHeight in class FormatReaderpublic boolean isThisType(RandomAccessInputStream stream) throws IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderIOExceptionpublic 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,
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.IFormatReader.openBytes(int, byte[], int, int, int, int)public void close(boolean fileOnly)
throws IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class FormatReaderIOExceptionprotected void initFile(String id) throws FormatException, IOException
FormatReaderinitFile in class FormatReaderFormatException - if a parsing error occurs processing the file.IOException - if an I/O error occurs processing the fileprivate void initMetadata(String xml) throws FormatException, IOException
FormatExceptionIOExceptionprivate Element getMetadataRoot(String xml) throws FormatException, IOException
FormatExceptionIOExceptionprivate void translateMetadata(Element root) throws FormatException
FormatExceptionprivate void populateOriginalMetadata(Element root, Deque<String> nameStack)
private void translateImageNames(Element imageNode, int image)
private void translateDetectors(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateROIs(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateSingleROIs(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateLaserLines(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateTimestamps(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateFilterSettings(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateScannerSettings(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateAttachmentNodes(Element imageNode, int image) throws FormatException
FormatExceptionprivate void addUserCommentMeta(Element imageNode, int image) throws FormatException
FormatExceptionprivate void translateImageNodes(Element imageNode, int i) throws FormatException
FormatExceptionprivate int getChannelIndex(Element filterSetting)
private double parseDouble(String number)
private Color getChannelColor(int colorCode)
private int getTileIndex(int coreIndex)
Copyright © 2016 Open Microscopy Environment