public class DeltavisionReader extends FormatReader
Modifier and Type | Class and Description |
---|---|
private static class |
DeltavisionReader.DVExtHdrFields
This private class structure holds the details for the extended header.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
backwardsStageX
Whether or not the stage moved backwards.
|
private boolean |
backwardsStageY |
static java.lang.String |
DATE_FORMAT
Deprecated.
Use
DATE_FORMATS instead |
static java.lang.String[] |
DATE_FORMATS |
private java.lang.String |
deconvolutionLogFile |
static int |
DV_MAGIC_BYTES_1 |
static int |
DV_MAGIC_BYTES_2 |
protected DeltavisionReader.DVExtHdrFields[] |
extHdrFields
Initialize an array of Extended Header Field structures.
|
private int |
extSize
Size of extended header.
|
private static int |
HEADER_LENGTH |
private static java.lang.String[] |
IMAGE_TYPES |
private java.lang.String |
imageSequence |
private int[] |
lengths |
private static short |
LITTLE_ENDIAN |
private java.lang.String |
logFile |
private static int |
MAX_CHANNELS |
private java.lang.Double[] |
ndFilters |
private static int |
NEW_TYPE |
private boolean |
newFileType |
protected int |
numFloatsPerSection |
protected int |
numIntsPerSection
The number of ints in each extended header section.
|
protected int |
panelSize |
protected boolean |
positionInT |
private boolean |
truncatedFileFlag |
protected int |
tSize
Size of one time element in the extended header.
|
protected int |
wSize
Size of one wave in the extended header.
|
private int |
xTiles
Number of tiles in X direction.
|
private int |
yTiles
Number of tiles in Y direction.
|
protected int |
zSize
Size of one z section in the extended header.
|
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 |
---|
DeltavisionReader()
Constructs a new Deltavision reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
private void |
findLogFiles()
Find the log files.
|
private java.lang.String |
getImageSequence(int imageSequence)
Get the image sequence string.
|
private java.lang.String |
getPixelString(int filePixelType)
Get a descriptive string representing the pixel type.
|
private int |
getPixelType(int filePixelType)
Get the OME pixel type from the pixel type stored in the file.
|
long |
getPlaneByteOffset(int currentZ,
int currentW,
int currentT)
Given any specific Z, W, and T of a plane, determine the absolute
byte offset of the plane in the file.
|
private int |
getPlaneIndex(int series,
int plane) |
java.lang.String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
private int |
getTotalPlaneHeaderSize() |
protected void |
initExtraMetadata() |
protected void |
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.).
|
protected void |
initPixels() |
boolean |
isSingleFile(java.lang.String id)
Returns true if the named file is expected to be the only
file in the dataset.
|
boolean |
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
boolean |
isThisType(java.lang.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 void |
parseDeconvolutionLog(loci.common.RandomAccessInputStream s,
MetadataStore store)
Parse deconvolution output, if it exists.
|
private boolean |
parseLogFile(MetadataStore store)
Extract metadata from associated log file, if it exists.
|
protected void |
populateObjective(MetadataStore store,
int lensID)
Populate an Objective based upon the lens ID.
|
private void |
readWavelength(int channel,
MetadataStore store) |
private void |
setOffsetInfo(int numZSections,
int numWaves,
int numTimes,
int numPanels)
This method calculates the size of a w, t, z section depending on which
sequence is being used
|
void |
setTruncatedFileFlag(boolean truncatedFileFlag)
This flag indicates if the file is known to be truncated.
|
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, 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, getOptimalTileHeight, getOptimalTileWidth, 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, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, 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 DV_MAGIC_BYTES_1
public static final int DV_MAGIC_BYTES_2
@Deprecated public static final java.lang.String DATE_FORMAT
DATE_FORMATS
insteadpublic static final java.lang.String[] DATE_FORMATS
private static final short LITTLE_ENDIAN
private static final int HEADER_LENGTH
private static final int NEW_TYPE
private static final int MAX_CHANNELS
private static final java.lang.String[] IMAGE_TYPES
private int extSize
protected int wSize
protected int zSize
protected int tSize
protected int panelSize
private int xTiles
private int yTiles
private boolean backwardsStageX
private boolean backwardsStageY
protected int numIntsPerSection
protected int numFloatsPerSection
protected DeltavisionReader.DVExtHdrFields[] extHdrFields
private java.lang.Double[] ndFilters
private int[] lengths
private java.lang.String logFile
private java.lang.String deconvolutionLogFile
private boolean truncatedFileFlag
private java.lang.String imageSequence
private boolean newFileType
protected boolean positionInT
public DeltavisionReader()
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 boolean isThisType(java.lang.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.public boolean isThisType(loci.common.RandomAccessInputStream stream) throws java.io.IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
stream
- A RandomAccessInputStream representing the file to check.
The first byte in the stream is assumed to be the first byte
in the file.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 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
public void setTruncatedFileFlag(boolean truncatedFileFlag)
FormatReader.setId(String)
is called.
Default is false.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 fileprotected void initPixels() throws FormatException, java.io.IOException
FormatException
java.io.IOException
protected void initExtraMetadata() throws FormatException, java.io.IOException
FormatException
java.io.IOException
private java.lang.String getPixelString(int filePixelType)
private int getPixelType(int filePixelType)
private java.lang.String getImageSequence(int imageSequence)
private void setOffsetInfo(int numZSections, int numWaves, int numTimes, int numPanels)
numZSections
- numWaves
- numTimes
- numPanels
- private int getTotalPlaneHeaderSize()
private int getPlaneIndex(int series, int plane)
public long getPlaneByteOffset(int currentZ, int currentW, int currentT)
currentZ
- currentW
- currentT
- private void findLogFiles() throws java.io.IOException
java.io.IOException
private boolean parseLogFile(MetadataStore store) throws FormatException, java.io.IOException
FormatException
java.io.IOException
private void parseDeconvolutionLog(loci.common.RandomAccessInputStream s, MetadataStore store) throws java.io.IOException
java.io.IOException
private void readWavelength(int channel, MetadataStore store) throws FormatException, java.io.IOException
FormatException
java.io.IOException
protected void populateObjective(MetadataStore store, int lensID) throws FormatException
FormatException
Copyright © 2020 Open Microscopy Environment