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.
|
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(String alias,
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(String id)
Returns an int indicating that we cannot, must, or might group the files
in a given dataset.
|
private String[] |
findFiles(loci.common.Location baseFile)
Search for files that correspond to the given file.
|
private String[] |
findFiles(loci.common.Location baseFile,
String[] suffixes) |
private int |
firstWellPlanes()
Returns the number of planes in the first well that has data.
|
private int |
getField(String file) |
private loci.common.IRandomAccess |
getFileHandle(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.
|
String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
private int[] |
getWell(String file)
Returns a two-element array containing the well row and well column
corresponding to the given file.
|
private void |
groupFiles(String[] fileList,
MetadataStore store) |
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
private void |
initFlexFile(String id) |
private void |
initMeaFile(String id)
Initialize the dataset from a .mea file.
|
private void |
initResFile(String id)
Initialize the dataset from a .res file.
|
boolean |
isSingleFile(String id)
Returns true if this is a single-file format.
|
private FlexReader.FlexFile |
lookupFile(int fileSeries) |
private FlexReader.FlexFile |
lookupFile(int wellRow,
int wellColumn,
int field) |
static void |
mapServer(String alias,
String realName)
Map the server named 'alias' to the path 'realName'.
|
static void |
mapServer(String alias,
String[] realNames)
Map the server named 'alias' to the paths in 'realNames'.
|
static void |
mapServersFromConfigurationFile(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(String id) |
private void |
populateCoreMetadata(int wellRow,
int wellCol,
int field,
List<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, 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, 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, reopenFile, seriesToCoreIndex, setCoreIndex, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries
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 String FLEX_SUFFIX
public static final String MEA_SUFFIX
public static final String RES_SUFFIX
public static final String[] MEASUREMENT_SUFFIXES
public static final String[] SUFFIXES
public static final String SCREENING
public static final String ARCHIVE
private static HashMap<String,String[]> serverMap
private int binX
private int binY
private int plateCount
private int wellCount
private int fieldCount
private int wellRows
private int wellColumns
private String[] channelNames
private HashMap<String,FlexReader.FilterGroup> filterSetMap
private String plateName
private String plateBarcode
private int nRows
private int nCols
private String plateAcqStartTime
private ArrayList<ome.units.quantity.Length> planePositionX
private ArrayList<ome.units.quantity.Length> planePositionY
private ArrayList<ome.units.quantity.Length> planePositionZ
private ArrayList<FlexReader.FlexFile> flexFiles
private int nFiles
private int effectiveFieldCount
private int[][] wellNumber
public int fileGroupOption(String id) throws FormatException, IOException
IFormatReader
fileGroupOption
in interface IFormatReader
fileGroupOption
in class FormatReader
FormatException
IOException
public boolean isSingleFile(String id) throws FormatException, IOException
IFormatReader
isSingleFile
in interface IFormatReader
isSingleFile
in class FormatReader
FormatException
IOException
public String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
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, 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 initResFile(String id) throws FormatException, IOException
FormatException
IOException
private void initMeaFile(String id) throws FormatException, IOException
FormatException
IOException
private void initFlexFile(String id) throws FormatException, IOException
FormatException
IOException
private void populateMetadataStore(MetadataStore store) throws FormatException
FormatException
private void parseResFile(String id) throws IOException
IOException
private int[] getWell(String file)
private int getField(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, IOException
FormatException
IOException
private void populateCoreMetadata(int wellRow, int wellCol, int field, List<String> imageNames) throws FormatException
FormatException
private String[] findFiles(loci.common.Location baseFile) throws IOException
IOException
private String[] findFiles(loci.common.Location baseFile, String[] suffixes) throws IOException
IOException
private void groupFiles(String[] fileList, MetadataStore store) throws FormatException, IOException
FormatException
IOException
private loci.common.IRandomAccess getFileHandle(String flexFile) throws IOException
IOException
private FlexReader.FlexFile lookupFile(int wellRow, int wellColumn, int field)
private FlexReader.FlexFile lookupFile(int fileSeries)
public static void appendServerMap(String alias, String realName) throws FormatException
FormatException
- if 'realName' does not existpublic static void mapServer(String alias, String realName)
public static void mapServer(String alias, String[] realNames)
public static void mapServersFromConfigurationFile(String configFile) throws FormatException, IOException
FormatException
- if configFile does not exist.IOException
mapServer(String, String)
Copyright © 2017 Open Microscopy Environment