public class IM3Reader extends FormatReader
| Modifier and Type | Class and Description |
|---|---|
protected static class |
IM3Reader.BooleanIM3Record
A record containing boolean values
|
protected static class |
IM3Reader.ContainerRecord |
protected static class |
IM3Reader.FloatIM3Record |
protected static class |
IM3Reader.IM3Record |
protected static class |
IM3Reader.IntIM3Record |
static class |
IM3Reader.Spectrum |
protected static class |
IM3Reader.StringIM3Record |
| Modifier and Type | Field and Description |
|---|---|
private static int |
COOKIE
First 4 bytes of file is "1985"
|
private byte[] |
data |
private java.util.List<IM3Reader.ContainerRecord> |
dataSets |
private static java.lang.String |
EMPTY_STRING |
private static java.lang.String |
FIELD_AUX_FLAGS |
private static java.lang.String |
FIELD_BAND_INDEX |
private static java.lang.String |
FIELD_BANDS |
private static java.lang.String |
FIELD_CLASS_ID |
private static java.lang.String |
FIELD_DATA |
private static java.lang.String |
FIELD_DATA_SET |
private static java.lang.String |
FIELD_EXPOSURE |
private static java.lang.String |
FIELD_FILE_VERSION |
private static java.lang.String |
FIELD_FILTER_PAIR |
private static java.lang.String |
FIELD_FIXED_FILTER |
private static java.lang.String |
FIELD_HOMOGENEOUS |
private static java.lang.String |
FIELD_MAGNITUDES |
private static java.lang.String |
FIELD_MANUFACTURER |
private static java.lang.String |
FIELD_MILLIMETERS_PER_PIXEL |
private static java.lang.String |
FIELD_NAME |
private static java.lang.String |
FIELD_NUANCE_FLAGS |
private static java.lang.String |
FIELD_OBJECTIVE |
private static java.lang.String |
FIELD_PART_NUMBER |
private static java.lang.String |
FIELD_PROTOCOL |
private static java.lang.String |
FIELD_PROXY_PARENT_FILE_NAME |
private static java.lang.String |
FIELD_SAMPLE_ID |
private static java.lang.String |
FIELD_SHAPE |
private static java.lang.String |
FIELD_SOURCE_FILE_NAME |
private static java.lang.String |
FIELD_SPECTRA |
private static java.lang.String |
FIELD_SPECTRAL_BASIS_INFO |
private static java.lang.String |
FIELD_SPECTRAL_LIBRARY |
private static java.lang.String |
FIELD_SPECTRUM |
private static java.lang.String |
FIELD_THUMBNAIL |
private static java.lang.String |
FIELD_TIMESTAMP |
private static java.lang.String |
FIELD_TYPE_ID |
private static java.lang.String |
FIELD_USER_COMMENTS |
private static java.lang.String |
FIELD_VALUES |
private static java.lang.String |
FIELD_WAVELENGTH |
private static java.lang.String |
FIELD_WAVELENGTHS |
private static org.slf4j.Logger |
LOGGER
Logger for outputting summary diagnostics.
|
private static int |
REC_BOOLEAN |
private static int |
REC_CONTAINER
A record that is a container of
other records.
|
private static int |
REC_FLOAT |
private static int |
REC_IMAGE
Image format
int: pixel type? 3 = RGBA
int: width
int: height
int: depth
data bytes follow
|
private static int |
REC_INT
32-bit integer values
|
private static int |
REC_NESTED
A nested record of records
|
private static int |
REC_STRING
A string
int: ?
int: length
8-byte characters follow
|
private java.util.List<IM3Reader.IM3Record> |
records |
private java.util.List<IM3Reader.Spectrum> |
spectra |
core, coreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
IM3Reader()
Construct an uninitialized reader of .im3 files.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
java.util.List<IM3Reader.Spectrum> |
getSpectra()
If a Nuance file is a spectral library set (.csl) file,
there is a spectral library inside that contains a profile
of spectral bin magnitudes for each of several measured
fluorophores (or auto fluorescence).
|
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.
|
static void |
main(java.lang.String[] args)
Write a summary of each record to STDOUT
|
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.
|
byte[] |
openRaw()
Open the current series in raw-mode, returning the
interleaved image bytes.
|
private static IM3Reader.IM3Record |
parseRecord(loci.common.IRandomAccess is)
Parse an IM3 record at the current file pointer location
|
protected static java.lang.String |
parseString(loci.common.IRandomAccess is)
Parse a string from the IM3 file at the current file pointer loc
|
void |
setSeries(int no)
Activates the specified series.
|
void |
writeSummary()
Write a summary of each field in the IM3 file to the writer
|
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, updateMetadataListscheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionsprivate static final org.slf4j.Logger LOGGER
private static final int COOKIE
private static final int REC_CONTAINER
private static final int REC_IMAGE
private static final int REC_NESTED
private static final int REC_INT
private static final int REC_FLOAT
private static final int REC_BOOLEAN
private static final int REC_STRING
private static final java.lang.String FIELD_DATA_SET
private static final java.lang.String FIELD_TIMESTAMP
private static final java.lang.String FIELD_AUX_FLAGS
private static final java.lang.String FIELD_NUANCE_FLAGS
private static final java.lang.String FIELD_SPECTRA
private static final java.lang.String FIELD_VALUES
private static final java.lang.String FIELD_PROTOCOL
private static final java.lang.String FIELD_OBJECTIVE
private static final java.lang.String FIELD_SPECTRAL_BASIS_INFO
private static final java.lang.String FIELD_FILTER_PAIR
private static final java.lang.String FIELD_FIXED_FILTER
private static final java.lang.String FIELD_BANDS
private static final java.lang.String FIELD_SPECTRAL_LIBRARY
private static final java.lang.String FIELD_SPECTRUM
private static final java.lang.String FIELD_THUMBNAIL
private static final java.lang.String FIELD_DATA
private static final java.lang.String FIELD_FILE_VERSION
private static final java.lang.String FIELD_CLASS_ID
private static final java.lang.String FIELD_TYPE_ID
private static final java.lang.String FIELD_SHAPE
private static final java.lang.String FIELD_BAND_INDEX
private static final java.lang.String FIELD_NAME
private static final java.lang.String FIELD_SAMPLE_ID
private static final java.lang.String FIELD_USER_COMMENTS
private static final java.lang.String FIELD_SOURCE_FILE_NAME
private static final java.lang.String FIELD_PROXY_PARENT_FILE_NAME
private static final java.lang.String FIELD_MANUFACTURER
private static final java.lang.String FIELD_PART_NUMBER
private static final java.lang.String FIELD_MILLIMETERS_PER_PIXEL
private static final java.lang.String FIELD_EXPOSURE
private static final java.lang.String FIELD_WAVELENGTH
private static final java.lang.String FIELD_WAVELENGTHS
private static final java.lang.String FIELD_MAGNITUDES
private static final java.lang.String FIELD_HOMOGENEOUS
private java.util.List<IM3Reader.IM3Record> records
private java.util.List<IM3Reader.ContainerRecord> dataSets
private java.util.List<IM3Reader.Spectrum> spectra
private byte[] data
private static final java.lang.String EMPTY_STRING
public byte[] openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class FormatReaderno - 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.java.io.IOException - if there was a problem reading the file.public byte[] openRaw()
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<IM3Reader.Spectrum> getSpectra()
protected void initFile(java.lang.String id)
throws FormatException,
java.io.IOException
FormatReaderinitFile in class FormatReaderFormatException - if a parsing error occurs processing the file.java.io.IOException - if an I/O error occurs processing the fileprotected static java.lang.String parseString(loci.common.IRandomAccess is)
throws java.io.IOException
is - stream to read fromjava.io.IOExceptionprivate static IM3Reader.IM3Record parseRecord(loci.common.IRandomAccess is) throws java.io.IOException
is - random access stream, pointing at the record's start
(the length-quadword of the record's tag name)java.io.IOException - on file misparsing leading to overrun and otherpublic boolean isThisType(loci.common.RandomAccessInputStream stream)
throws java.io.IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderstream - 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.IOExceptionpublic void setSeries(int no)
IFormatReadersetSeries in interface IFormatReadersetSeries in class FormatReaderpublic void close(boolean fileOnly)
throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class FormatReaderjava.io.IOExceptionpublic void writeSummary()
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.io.IOException
args - java.io.IOExceptionCopyright © 2020 Open Microscopy Environment