public class GatanReader extends FormatReader
Modifier and Type | Class and Description |
---|---|
(package private) class |
GatanReader.ROIShape |
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 |
ELLIPSE |
private static int |
FLOAT |
private boolean |
foundMontage |
private double |
gamma |
private static int |
GROUP
Tag types.
|
private java.lang.String |
info |
private static int |
INT |
private static int |
LINE
Shape types
|
private double |
mag |
private long |
numPixelBytes |
private long |
pixelOffset
Offset to pixel data.
|
private java.util.List<java.lang.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 static int |
RECTANGLE |
private double |
sampleTime |
private java.util.List<GatanReader.ROIShape> |
shapes |
private static int |
SHORT |
private boolean |
signed |
static java.lang.String |
SPLIT_MONTAGE |
static boolean |
SPLIT_MONTAGE_DEFAULT |
private java.util.List<ome.units.quantity.Length> |
stageX |
private java.util.List<ome.units.quantity.Length> |
stageY |
private java.util.List<ome.units.quantity.Length> |
stageZ |
private static int |
TEXT |
private long |
timestamp |
private static int |
UBYTE |
private static int |
UINT |
private java.util.List<java.lang.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(java.lang.String units) |
private java.lang.String |
createROI(MetadataStore store,
int index)
Create an empty ROI and link it to the Image.
|
protected java.util.ArrayList<java.lang.String> |
getAvailableOptions()
Returns the list of available metadata options.
|
private int |
getNumBytes(int type) |
protected void |
initFile(java.lang.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,
java.lang.String parent,
java.lang.String indent)
Parses Gatan DM3 tags.
|
private double |
readValue(int type) |
private void |
skipPadding() |
boolean |
splitMontage() |
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, 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, 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, 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 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 static final int LINE
private static final int RECTANGLE
private static final int ELLIPSE
private static final int TEXT
public static final java.lang.String SPLIT_MONTAGE
public static final boolean SPLIT_MONTAGE_DEFAULT
private long pixelOffset
private java.util.List<java.lang.Double> pixelSizes
private java.util.List<java.lang.String> units
private long numPixelBytes
private boolean signed
private long timestamp
private double gamma
private double mag
private double voltage
private java.lang.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
private transient java.util.List<GatanReader.ROIShape> shapes
private transient boolean foundMontage
private transient java.util.List<ome.units.quantity.Length> stageX
private transient java.util.List<ome.units.quantity.Length> stageY
private transient java.util.List<ome.units.quantity.Length> stageZ
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 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
protected java.util.ArrayList<java.lang.String> getAvailableOptions()
FormatReader
getAvailableOptions
in class FormatReader
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 filepublic boolean splitMontage()
private void parseTags(int numTags, java.lang.String parent, java.lang.String indent) throws FormatException, java.io.IOException, java.text.ParseException
FormatException
java.io.IOException
java.text.ParseException
private double readValue(int type) throws java.io.IOException
java.io.IOException
private int getNumBytes(int type)
private void skipPadding() throws java.io.IOException
java.io.IOException
private ome.units.unit.Unit<ome.units.quantity.Length> convertUnits(java.lang.String units)
private java.lang.String createROI(MetadataStore store, int index)
store
- MetadataStore in which to create the ROIindex
- ROI indexCopyright © 2020 Open Microscopy Environment