public class FlexReader extends FormatReader
-Dlurawave.license=XXXX
on the command line).Modifier and Type | Class and Description |
---|---|
(package private) class |
FlexReader.FilterGroup
Stores a grouping of filters.
|
(package private) class |
FlexReader.FlexFile |
class |
FlexReader.FlexHandler
SAX handler for parsing XML.
|
class |
FlexReader.MeaHandler
SAX handler for parsing XML from .mea files.
|
class |
FlexReader.ResHandler
SAX handler for parsing XML from .res files.
|
Modifier and Type | Field and Description |
---|---|
private java.util.HashMap<java.lang.Integer,ome.xml.model.primitives.Timestamp> |
acquisitionDates |
static java.lang.String |
ARCHIVE |
private java.util.List<java.lang.String> |
binnings |
private int |
binX
Camera binning values.
|
private int |
binY
Camera binning values.
|
private java.util.List<java.lang.String> |
cameraIDs |
private java.util.List<java.lang.String> |
cameraRefs |
private java.lang.String[] |
channelNames |
private java.util.HashMap<java.lang.String,java.lang.String> |
dichroicMap |
private int |
effectiveFieldCount |
private int |
fieldCount |
private java.util.HashMap<java.lang.String,java.lang.String> |
filterMap |
private java.util.HashMap<java.lang.String,FlexReader.FilterGroup> |
filterSetMap |
private java.util.List<java.lang.String> |
filterSets |
static int |
FLEX
Custom IFD entry for Flex XML.
|
static java.lang.String |
FLEX_SUFFIX |
private java.util.ArrayList<FlexReader.FlexFile> |
flexFiles |
private java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> |
lightSourceCombinationIDs |
private java.util.List<java.lang.String> |
lightSourceCombinationRefs |
private java.util.List<java.lang.String> |
lightSourceIDs |
static java.lang.String |
MEA_SUFFIX |
static java.lang.String[] |
MEASUREMENT_SUFFIXES |
private java.util.List<java.lang.String> |
measurementFiles |
private int |
nCols |
private int |
nFiles |
private int |
nRows |
private java.util.List<java.lang.String> |
objectiveIDs |
private java.util.List<java.lang.String> |
objectiveRefs |
private java.util.ArrayList<java.lang.Double> |
planeDeltaT |
private java.util.ArrayList<java.lang.Double> |
planeExposureTime |
private java.util.ArrayList<ome.units.quantity.Length> |
planePositionX |
private java.util.ArrayList<ome.units.quantity.Length> |
planePositionY |
private java.util.ArrayList<ome.units.quantity.Length> |
planePositionZ |
private java.lang.String |
plateAcqStartTime |
private java.lang.String |
plateBarcode |
private int |
plateCount |
private java.lang.String |
plateName |
static java.lang.String |
RES_SUFFIX |
private java.util.HashMap<java.lang.String,java.lang.String> |
reverseFileMapping |
static java.lang.String |
SCREENING |
private static java.util.HashMap<java.lang.String,java.lang.String[]> |
serverMap
Mapping from server names stored in the .mea file to actual server names.
|
static java.lang.String[] |
SUFFIXES |
private int |
wellColumns |
private int |
wellCount |
private int[][] |
wellNumber
Specifies the row and column index into 'flexFiles' for a given well.
|
private int |
wellRows |
private java.util.List<java.lang.Double> |
xPositions |
private java.util.List<java.lang.Double> |
xSizes |
private java.util.List<java.lang.Double> |
yPositions |
private java.util.List<java.lang.Double> |
ySizes |
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 |
---|
FlexReader()
Constructs a new Flex reader.
|
Modifier and Type | Method and Description |
---|---|
static void |
appendServerMap(java.lang.String alias,
java.lang.String realName)
Add the path 'realName' to the mapping for the server named 'alias'.
|
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.
|
private java.lang.String[] |
findFiles(loci.common.Location baseFile)
Search for files that correspond to the given file.
|
private java.lang.String[] |
findFiles(loci.common.Location baseFile,
java.lang.String[] suffixes) |
private int |
firstWellPlanes()
Returns the number of planes in the first well that has data.
|
private int |
getField(java.lang.String file) |
private loci.common.IRandomAccess |
getFileHandle(java.lang.String flexFile) |
int |
getOptimalTileHeight()
Returns the optimal sub-image height for use with openBytes.
|
int |
getOptimalTileWidth()
Returns the optimal sub-image width for use with openBytes.
|
java.lang.String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
private int[] |
getWell(java.lang.String file)
Returns a two-element array containing the well row and well column
corresponding to the given file.
|
private void |
groupFiles(java.lang.String[] fileList,
MetadataStore store) |
protected void |
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.).
|
private void |
initFlexFile(java.lang.String id) |
private void |
initMeaFile(java.lang.String id)
Initialize the dataset from a .mea file.
|
private void |
initResFile(java.lang.String id)
Initialize the dataset from a .res file.
|
boolean |
isSingleFile(java.lang.String id)
Returns true if the named file is expected to be the only
file in the dataset.
|
private FlexReader.FlexFile |
lookupFile(int fileSeries) |
private FlexReader.FlexFile |
lookupFile(int wellRow,
int wellColumn,
int field) |
static void |
mapServer(java.lang.String alias,
java.lang.String realName)
Map the server named 'alias' to the path 'realName'.
|
static void |
mapServer(java.lang.String alias,
java.lang.String[] realNames)
Map the server named 'alias' to the paths in 'realNames'.
|
static void |
mapServersFromConfigurationFile(java.lang.String configFile)
Read a configuration file with lines of the form:
<server alias>=<real server name>
and call mapServer(String, String) accordingly.
|
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 |
parseFlexFile(int currentWell,
int wellRow,
int wellCol,
int field,
boolean firstFile,
MetadataStore store)
Parses XML metadata from the Flex file corresponding to the given well.
|
private void |
parseResFile(java.lang.String id) |
private void |
populateCoreMetadata(int wellRow,
int wellCol,
int field,
java.util.List<java.lang.String> imageNames)
Populate core metadata using the given list of image names.
|
private void |
populateMetadataStore(MetadataStore store) |
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, 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, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, 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, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, 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 int FLEX
public static final java.lang.String FLEX_SUFFIX
public static final java.lang.String MEA_SUFFIX
public static final java.lang.String RES_SUFFIX
public static final java.lang.String[] MEASUREMENT_SUFFIXES
public static final java.lang.String[] SUFFIXES
public static final java.lang.String SCREENING
public static final java.lang.String ARCHIVE
private static java.util.HashMap<java.lang.String,java.lang.String[]> serverMap
private int binX
private int binY
private int plateCount
private int wellCount
private int fieldCount
private int wellRows
private int wellColumns
private java.lang.String[] channelNames
private java.util.List<java.lang.Double> xPositions
private java.util.List<java.lang.Double> yPositions
private java.util.List<java.lang.Double> xSizes
private java.util.List<java.lang.Double> ySizes
private java.util.List<java.lang.String> cameraIDs
private java.util.List<java.lang.String> objectiveIDs
private java.util.List<java.lang.String> lightSourceIDs
private java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> lightSourceCombinationIDs
private java.util.List<java.lang.String> cameraRefs
private java.util.List<java.lang.String> binnings
private java.util.List<java.lang.String> objectiveRefs
private java.util.List<java.lang.String> lightSourceCombinationRefs
private java.util.List<java.lang.String> filterSets
private java.util.HashMap<java.lang.String,FlexReader.FilterGroup> filterSetMap
private java.util.HashMap<java.lang.Integer,ome.xml.model.primitives.Timestamp> acquisitionDates
private java.util.List<java.lang.String> measurementFiles
private java.lang.String plateName
private java.lang.String plateBarcode
private int nRows
private int nCols
private java.lang.String plateAcqStartTime
private java.util.ArrayList<ome.units.quantity.Length> planePositionX
private java.util.ArrayList<ome.units.quantity.Length> planePositionY
private java.util.ArrayList<ome.units.quantity.Length> planePositionZ
private java.util.ArrayList<java.lang.Double> planeExposureTime
private java.util.ArrayList<java.lang.Double> planeDeltaT
private java.util.ArrayList<FlexReader.FlexFile> flexFiles
private int nFiles
private int effectiveFieldCount
private java.util.HashMap<java.lang.String,java.lang.String> reverseFileMapping
private java.util.HashMap<java.lang.String,java.lang.String> dichroicMap
private java.util.HashMap<java.lang.String,java.lang.String> filterMap
private int[][] wellNumber
public int fileGroupOption(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
fileGroupOption
in interface IFormatReader
fileGroupOption
in class FormatReader
id
- 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).FormatException
java.io.IOException
FormatTools.MUST_GROUP
,
FormatTools.CAN_GROUP
,
FormatTools.CANNOT_GROUP
public boolean isSingleFile(java.lang.String id) throws FormatException, java.io.IOException
IFormatReader
isSingleFile
in interface IFormatReader
isSingleFile
in class FormatReader
FormatException
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 int getOptimalTileWidth()
IFormatReader
getOptimalTileWidth
in interface IFormatReader
getOptimalTileWidth
in class FormatReader
public int getOptimalTileHeight()
IFormatReader
getOptimalTileHeight
in interface IFormatReader
getOptimalTileHeight
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)
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 initResFile(java.lang.String id) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void initMeaFile(java.lang.String id) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void initFlexFile(java.lang.String id) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void populateMetadataStore(MetadataStore store) throws FormatException
FormatException
private void parseResFile(java.lang.String id) throws java.io.IOException
java.io.IOException
private int[] getWell(java.lang.String file)
private int getField(java.lang.String file)
private int firstWellPlanes()
[0][0]
as the acquisition may have been column or row offset.private void parseFlexFile(int currentWell, int wellRow, int wellCol, int field, boolean firstFile, MetadataStore store) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void populateCoreMetadata(int wellRow, int wellCol, int field, java.util.List<java.lang.String> imageNames) throws FormatException
FormatException
private java.lang.String[] findFiles(loci.common.Location baseFile) throws java.io.IOException
java.io.IOException
private java.lang.String[] findFiles(loci.common.Location baseFile, java.lang.String[] suffixes) throws java.io.IOException
java.io.IOException
private void groupFiles(java.lang.String[] fileList, MetadataStore store) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private loci.common.IRandomAccess getFileHandle(java.lang.String flexFile) throws java.io.IOException
java.io.IOException
private FlexReader.FlexFile lookupFile(int wellRow, int wellColumn, int field)
private FlexReader.FlexFile lookupFile(int fileSeries)
public static void appendServerMap(java.lang.String alias, java.lang.String realName) throws FormatException
FormatException
- if 'realName' does not existpublic static void mapServer(java.lang.String alias, java.lang.String realName)
public static void mapServer(java.lang.String alias, java.lang.String[] realNames)
public static void mapServersFromConfigurationFile(java.lang.String configFile) throws FormatException, java.io.IOException
FormatException
- if configFile does not exist.java.io.IOException
mapServer(String, String)
Copyright © 2022 Open Microscopy Environment