public class MetamorphReader extends BaseTiffReader
Modifier and Type | Field and Description |
---|---|
private String |
binning |
private boolean |
bizarreMultichannelAcquisition |
private boolean |
canLookForND |
private long[] |
emWavelength
The TIFF's emWavelength
|
private Double |
exposureTime |
private boolean[] |
firstSeriesChannels |
private Double |
gain |
private boolean |
hasAbsoluteZ |
private boolean |
hasAbsoluteZValid |
private boolean |
hasChipOffsets |
private boolean |
hasStagePositions |
private String |
imageCreationDate
The TIFF's creation date
|
private String |
imageName
The TIFF's name
|
private long[] |
internalStamps |
private static org.slf4j.Logger |
LOGGER
Logger for this class.
|
static String |
LONG_DATE_FORMAT |
private static int |
METAMORPH_ID |
private int |
mmPlanes |
static String[] |
ND_SUFFIX |
private String |
ndFilename |
private int |
openFiles |
static String |
SHORT_DATE_FORMAT |
private Double |
sizeX |
private Double |
sizeY |
private List<String> |
stageNames |
private ome.units.quantity.Length[] |
stageX |
private ome.units.quantity.Length[] |
stageY |
private double |
stepSize |
static String[] |
STK_SUFFIX |
private MetamorphReader[][] |
stkReaders |
private String[][] |
stks
List of STK files in the dataset.
|
private double |
tempZ |
private static int |
UIC1TAG |
private static int |
UIC2TAG |
private static int |
UIC3TAG |
private static int |
UIC4TAG |
private boolean |
validZ |
private double[] |
wave |
private List<String> |
waveNames |
private double[] |
zDistances |
private double |
zoom |
private double |
zStart |
DATE_FORMATS
equalStrips, ifds, lastPlane, noSubresolutions, subResolutionIFDs, thumbnailIFDs, tiffParser, use64Bit
core, coreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixes
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
Constructor and Description |
---|
MetamorphReader()
Constructs a new Metamorph reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
static String |
decodeDate(int julian)
Converts a Julian date value into a human-readable string.
|
static String |
decodeTime(int millis)
Converts a time value in milliseconds into a human-readable string.
|
int |
fileGroupOption(String id)
Returns an int indicating that we cannot, must, or might group the files
in a given dataset.
|
private String |
getComment(int i,
int no) |
private String |
getFirstComment(int i)
Returns the TIFF comment from the first IFD of the first STK file in the
given series.
|
private String |
getKey(int id) |
private String |
getRealSTKFile(loci.common.Location l)
Check that the given STK file exists.
|
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.).
|
protected void |
initStandardMetadata()
Parses standard metadata.
|
static String |
intFormat(int myint,
int digits)
Formats an integer value with leading 0s if needed.
|
static String |
intFormatMax(int myint,
int maxint)
Formats an integer with leading 0 using maximum sequence number.
|
boolean |
isSingleFile(String id)
Returns true if this is a single-file format.
|
boolean |
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
boolean |
isThisType(String name,
boolean open)
Checks if a file matches the type of this format reader.
|
private String |
locateFirstValidFile()
Locates the first valid file in the STK arrays.
|
private String |
makeImageName(int i)
Create an appropriate name for the given series.
|
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 |
parseUIC1Tags(long uic1offset,
int uic1count)
UIC1 entry parser
|
(package private) void |
parseUIC2Tags(long uic2offset)
Populates metadata fields with some contained in MetaMorph UIC2 Tag.
|
private void |
parseUIC4Tags(long uic4offset)
UIC4 metadata parser
UIC4 Table contains per-plane blocks of metadata
stage X/Y positions,
camera chip offsets,
stage labels...
|
(package private) void |
readAbsoluteZValid() |
private void |
readPlaneData() |
private TiffRational |
readRational(loci.common.RandomAccessInputStream s) |
private TiffRational |
readRational(loci.common.RandomAccessInputStream s,
long offset) |
private void |
readRationals(String[] labels) |
(package private) void |
readStageLabels() |
private void |
readStagePositions() |
private void |
setCanLookForND(boolean v) |
getExifTagName, getImageCreationDate, initMetadata, initMetadataStore, put, put, put, put, put, put, put, put, put, put, putInt, putString
get16BitLookupTable, get8BitLookupTable, getIFDs, getOptimalTileHeight, getOptimalTileWidth, getThumbnailIFDs, getThumbSizeX, getThumbSizeY, initTiffParser, openThumbBytes, reopenFile, setResolutionLevel
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, 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, 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, readPlane, readPlane, 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 org.slf4j.Logger LOGGER
public static final String SHORT_DATE_FORMAT
public static final String LONG_DATE_FORMAT
public static final String[] ND_SUFFIX
public static final String[] STK_SUFFIX
private static final int METAMORPH_ID
private static final int UIC1TAG
private static final int UIC2TAG
private static final int UIC3TAG
private static final int UIC4TAG
private String imageName
private String imageCreationDate
private long[] emWavelength
private double[] wave
private String binning
private double zoom
private double stepSize
private Double exposureTime
private long[] internalStamps
private double[] zDistances
private ome.units.quantity.Length[] stageX
private ome.units.quantity.Length[] stageY
private double zStart
private Double sizeX
private Double sizeY
private double tempZ
private boolean validZ
private Double gain
private int mmPlanes
private MetamorphReader[][] stkReaders
private String[][] stks
private String ndFilename
private boolean canLookForND
private boolean[] firstSeriesChannels
private boolean bizarreMultichannelAcquisition
private int openFiles
private boolean hasStagePositions
private boolean hasChipOffsets
private boolean hasAbsoluteZ
private boolean hasAbsoluteZValid
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.public boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class MinimalTiffReader
IOException
public boolean isSingleFile(String id) throws FormatException, IOException
IFormatReader
isSingleFile
in interface IFormatReader
isSingleFile
in class FormatReader
FormatException
IOException
public int fileGroupOption(String id) throws FormatException, IOException
IFormatReader
fileGroupOption
in interface IFormatReader
fileGroupOption
in class FormatReader
FormatException
IOException
public String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
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, IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class MinimalTiffReader
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 MinimalTiffReader
IOException
protected void initFile(String id) throws FormatException, IOException
FormatReader
initFile
in class BaseTiffReader
FormatException
- if a parsing error occurs processing the file.IOException
- if an I/O error occurs processing the fileprotected void initStandardMetadata() throws FormatException, IOException
BaseTiffReader
initStandardMetadata
in class BaseTiffReader
FormatException
IOException
private String getRealSTKFile(loci.common.Location l)
private String getFirstComment(int i) throws IOException
IOException
private String getComment(int i, int no) throws IOException
IOException
private String makeImageName(int i)
void parseUIC2Tags(long uic2offset) throws IOException
uic2offset
- offset to UIC2 (33629) tag entries
not a regular tiff tag (6*N entries, N being the tagCount)IOException
private void parseUIC4Tags(long uic4offset) throws IOException
uic4offset
- offset of UIC4 table (not tiff-compliant)IOException
private void readStagePositions() throws IOException
IOException
private void readRationals(String[] labels) throws IOException
IOException
void readStageLabels() throws IOException
IOException
void readAbsoluteZValid() throws IOException
IOException
private void parseUIC1Tags(long uic1offset, int uic1count) throws IOException
uic1offset
- offset as found in the tiff tag 33628 (UIC1Tag)uic1count
- number of entries in UIC1 table (not tiff-compliant)IOException
public static String decodeDate(int julian)
public static String decodeTime(int millis)
public static String intFormat(int myint, int digits)
public static String intFormatMax(int myint, int maxint)
myint
- integer to formatmaxint
- max of "myint"private String locateFirstValidFile()
private TiffRational readRational(loci.common.RandomAccessInputStream s) throws IOException
IOException
private TiffRational readRational(loci.common.RandomAccessInputStream s, long offset) throws IOException
IOException
private void setCanLookForND(boolean v)
private void readPlaneData() throws IOException
IOException
private String getKey(int id)
Copyright © 2017 Open Microscopy Environment