public class GatanReader extends FormatReader
Modifier and Type | Field and Description |
---|---|
private boolean |
adjustEndianness |
private static int |
ARRAY
Data types.
|
private static int |
BYTE |
private static int |
CHAR |
static int |
DM3_MAGIC_BYTES |
static int |
DM4_MAGIC_BYTES |
private static int |
DOUBLE |
private static int |
FLOAT |
private double |
gamma |
private static int |
GROUP
Tag types.
|
private String |
info |
private static int |
INT |
private double |
mag |
private int |
numPixelBytes |
private long |
pixelOffset
Offset to pixel data.
|
private List<Double> |
pixelSizes
List of pixel sizes.
|
private ome.units.quantity.Length |
posX |
private ome.units.quantity.Length |
posY |
private ome.units.quantity.Length |
posZ |
private double |
sampleTime |
private static int |
SHORT |
private boolean |
signed |
private long |
timestamp |
private static int |
UBYTE |
private static int |
UINT |
private List<String> |
units |
private static int |
UNKNOWN |
private static int |
UNKNOWN2 |
private static int |
USHORT |
private static int |
VALUE |
private int |
version |
private double |
voltage |
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 |
---|
GatanReader()
Constructs a new Gatan reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
private ome.units.unit.Unit<ome.units.quantity.Length> |
convertUnits(String units) |
private int |
getNumBytes(int type) |
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
boolean |
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format.
|
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 |
parseTags(int numTags,
String parent,
String indent)
Parses Gatan DM3 tags.
|
private double |
readValue(int type) |
private void |
skipPadding() |
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, 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, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, 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, isSingleFile, 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 DM3_MAGIC_BYTES
public static final int DM4_MAGIC_BYTES
private static final int GROUP
private static final int VALUE
private static final int ARRAY
private static final int SHORT
private static final int USHORT
private static final int INT
private static final int UINT
private static final int FLOAT
private static final int DOUBLE
private static final int BYTE
private static final int UBYTE
private static final int CHAR
private static final int UNKNOWN
private static final int UNKNOWN2
private long pixelOffset
private int numPixelBytes
private boolean signed
private long timestamp
private double gamma
private double mag
private double voltage
private String info
private ome.units.quantity.Length posX
private ome.units.quantity.Length posY
private ome.units.quantity.Length posZ
private double sampleTime
private boolean adjustEndianness
private int version
public boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
IOException
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 parseTags(int numTags, String parent, String indent) throws FormatException, IOException, ParseException
FormatException
IOException
ParseException
private double readValue(int type) throws IOException
IOException
private int getNumBytes(int type)
private void skipPadding() throws IOException
IOException
private ome.units.unit.Unit<ome.units.quantity.Length> convertUnits(String units)
Copyright © 2017 Open Microscopy Environment