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[] |
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, 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 |
---|
LIFReader()
Constructs a new Leica LIF reader.
|
Modifier and Type | Method and Description |
---|---|
private void |
addUserCommentMeta(Element imageNode) |
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, getLineCap, getMarker, getMedium, getMetadataOptions, 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, getSupportedMetadataLevels, 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, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries
checkSuffix, checkSuffix, getFormat, getNativeDataType, getSuffixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
public 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 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()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
in class FormatReader
public boolean isThisType(RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
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, 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.IFormatReader.openBytes(int, byte[], int, int, int, int)
public void close(boolean fileOnly) throws IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
IOException
protected void initFile(String id) throws FormatException, IOException
FormatReader
initFile
in class FormatReader
FormatException
- 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
FormatException
IOException
private Element getMetadataRoot(String xml) throws FormatException, IOException
FormatException
IOException
private void translateMetadata(Element root) throws FormatException
FormatException
private void populateOriginalMetadata(Element root, Deque<String> nameStack)
private void translateImageNames(Element imageNode, int image)
private void translateDetectors(Element imageNode, int image) throws FormatException
FormatException
private void translateROIs(Element imageNode, int image) throws FormatException
FormatException
private void translateSingleROIs(Element imageNode, int image) throws FormatException
FormatException
private void translateLaserLines(Element imageNode, int image) throws FormatException
FormatException
private void translateTimestamps(Element imageNode, int image) throws FormatException
FormatException
private void translateFilterSettings(Element imageNode, int image) throws FormatException
FormatException
private void translateScannerSettings(Element imageNode, int image) throws FormatException
FormatException
private void translateAttachmentNodes(Element imageNode, int image) throws FormatException
FormatException
private void addUserCommentMeta(Element imageNode) throws FormatException
FormatException
private void translateImageNodes(Element imageNode, int i) throws FormatException
FormatException
private int getChannelIndex(Element filterSetting)
private double parseDouble(String number)
private Color getChannelColor(int colorCode)
private int getTileIndex(int coreIndex)
Copyright © 2015 Open Microscopy Environment