public class CellVoyagerReader extends FormatReader
This reader opens the dataset generated by the Yokagawa Cellvoyager automated
microscope. The user should point the reader to the file named
MeasurementResult.xml
in the dataset folder.
The file format itself consists of several nested folder containing a lot of - sometimes redundant - information. This specific reader exploits the following files:
MeasurementResult.xml
that contains high level information
about image geometry, well (if any) organization, fields arrangement, etc..
MeasurementResult.ome.xml
is a malformed OME xml file that
contains information on one of the numerous TIF files that compose the pixel
data. It is used to easily extract common metadata.
Image
folder: They contain the
pixel data itself. Each well (if any) can have several Areas (fields in the
HCS vocable), in turn composed of several tiles that are to be stitched
border to border, without the possibility of a more subtle stitching process.
This reader version was derived from reverse-engineering data files generated
on a system hosted by the imaging facility of the Institut Pasteur, Paris
(Imagopole / PFID). It spits file versioned 1.0
. The file format
contains several obvious typos, notably in some XML tags, and as mentionned
above, the ome.xml
is malformed. It is likely that that
subsequent versions of the CellVoyager format will fix these problems, alas
incapacitating this reader. Should it happen, mail the author to help them
update this reader.
Modifier and Type | Class and Description |
---|---|
private static class |
CellVoyagerReader.AreaInfo |
private static class |
CellVoyagerReader.ChannelInfo |
private static class |
CellVoyagerReader.FieldInfo |
private static class |
CellVoyagerReader.WellInfo |
Modifier and Type | Field and Description |
---|---|
private List<CellVoyagerReader.ChannelInfo> |
channelInfos |
private loci.common.Location |
imageFolder |
private loci.common.Location |
measurementFolder |
private loci.common.Location |
measurementResultFile |
private loci.common.Location |
omeMeasurementFile |
private static String |
SINGLE_TIFF_PATH_BUILDER |
private List<Integer> |
timePoints |
private List<CellVoyagerReader.WellInfo> |
wells |
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 |
---|
CellVoyagerReader() |
Modifier and Type | Method and Description |
---|---|
int |
fileGroupOption(String id)
Returns an int indicating that we cannot, must, or might group the files
in a given dataset.
|
private static Element |
getChild(Element parent,
String childName) |
private static Element |
getChild(Element parent,
String[] path) |
private static List<Element> |
getChildren(Element parent,
String name) |
private static String |
getChildText(Element parent,
String childName) |
private static String |
getChildText(Element parent,
String[] path) |
int |
getRequiredDirectories(String[] files)
Returns the number of parent directories that are important when
processing the given list of files.
|
String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
boolean |
isSingleFile(String id)
Returns true if this is a single-file format.
|
boolean |
isThisType(String name,
boolean open)
Checks if a file matches the type of this format reader.
|
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 CellVoyagerReader.AreaInfo |
readArea(Element areaEl,
int startingFieldIndex,
double pixelWidth,
double pixelHeight,
int tileWidth,
int tileHeight) |
private CellVoyagerReader.ChannelInfo |
readChannel(Element channelEl) |
private CellVoyagerReader.FieldInfo |
readField(Element fieldEl) |
private double |
readFrameInterval(Document document) |
private void |
readInfo(Document msDocument,
Document omeDocument) |
private List<Integer> |
readTimePoints(Document document) |
private CellVoyagerReader.WellInfo |
readWellInfo(Element wellEl,
double pixelWidth,
double pixelHeight,
int tileWidth,
int tileHeight) |
private int[] |
seriesToWellArea(int series)
Returns the well index (in the field
wells ) and the area index
(in the field CellVoyagerReader.WellInfo.areas corresponding to the specified
series. |
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, 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, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, 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, 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
private static final String SINGLE_TIFF_PATH_BUILDER
private loci.common.Location measurementFolder
private loci.common.Location imageFolder
private List<CellVoyagerReader.ChannelInfo> channelInfos
private List<CellVoyagerReader.WellInfo> wells
private loci.common.Location measurementResultFile
private loci.common.Location omeMeasurementFile
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.public int fileGroupOption(String id) throws FormatException, IOException
IFormatReader
fileGroupOption
in interface IFormatReader
fileGroupOption
in class FormatReader
FormatException
IOException
public int getRequiredDirectories(String[] files) throws FormatException, IOException
IFormatReader
getRequiredDirectories
in interface IFormatReader
getRequiredDirectories
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 boolean isThisType(String name, boolean open)
FormatReader
FormatReader.isThisType(RandomAccessInputStream)
.isThisType
in interface IFormatReader
isThisType
in class FormatReader
open
- If true, and the file extension is insufficient to determine
the file type, the (existing) file is opened for further analysis.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 filepublic String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
getSeriesUsedFiles
in interface IFormatReader
getSeriesUsedFiles
in class FormatReader
private int[] seriesToWellArea(int series)
wells
) and the area index
(in the field CellVoyagerReader.WellInfo.areas
corresponding to the specified
series.series
- the desired series.int[] { well, area }
.private void readInfo(Document msDocument, Document omeDocument) throws FormatException
FormatException
private CellVoyagerReader.ChannelInfo readChannel(Element channelEl)
private CellVoyagerReader.WellInfo readWellInfo(Element wellEl, double pixelWidth, double pixelHeight, int tileWidth, int tileHeight)
private CellVoyagerReader.AreaInfo readArea(Element areaEl, int startingFieldIndex, double pixelWidth, double pixelHeight, int tileWidth, int tileHeight)
private CellVoyagerReader.FieldInfo readField(Element fieldEl)
private double readFrameInterval(Document document)
Copyright © 2017 Open Microscopy Environment