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 List<IM3Reader.ContainerRecord> |
dataSets |
private static String |
EMPTY_STRING |
private static String |
FIELD_AUX_FLAGS |
private static String |
FIELD_BAND_INDEX |
private static String |
FIELD_BANDS |
private static String |
FIELD_CLASS_ID |
private static String |
FIELD_DATA |
private static String |
FIELD_DATA_SET |
private static String |
FIELD_EXPOSURE |
private static String |
FIELD_FILE_VERSION |
private static String |
FIELD_FILTER_PAIR |
private static String |
FIELD_FIXED_FILTER |
private static String |
FIELD_HOMOGENEOUS |
private static String |
FIELD_MAGNITUDES |
private static String |
FIELD_MANUFACTURER |
private static String |
FIELD_MILLIMETERS_PER_PIXEL |
private static String |
FIELD_NAME |
private static String |
FIELD_NUANCE_FLAGS |
private static String |
FIELD_OBJECTIVE |
private static String |
FIELD_PART_NUMBER |
private static String |
FIELD_PROTOCOL |
private static String |
FIELD_PROXY_PARENT_FILE_NAME |
private static String |
FIELD_SAMPLE_ID |
private static String |
FIELD_SHAPE |
private static String |
FIELD_SOURCE_FILE_NAME |
private static String |
FIELD_SPECTRA |
private static String |
FIELD_SPECTRAL_BASIS_INFO |
private static String |
FIELD_SPECTRAL_LIBRARY |
private static String |
FIELD_SPECTRUM |
private static String |
FIELD_THUMBNAIL |
private static String |
FIELD_TIMESTAMP |
private static String |
FIELD_TYPE_ID |
private static String |
FIELD_USER_COMMENTS |
private static String |
FIELD_VALUES |
private static String |
FIELD_WAVELENGTH |
private static 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 List<IM3Reader.IM3Record> |
records |
private List<IM3Reader.Spectrum> |
spectra |
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 |
---|
IM3Reader()
Construct an uninitialized reader of .im3 files.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
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(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(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 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, 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
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
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 String FIELD_DATA_SET
private static final String FIELD_TIMESTAMP
private static final String FIELD_AUX_FLAGS
private static final String FIELD_NUANCE_FLAGS
private static final String FIELD_SPECTRA
private static final String FIELD_VALUES
private static final String FIELD_PROTOCOL
private static final String FIELD_OBJECTIVE
private static final String FIELD_SPECTRAL_BASIS_INFO
private static final String FIELD_FILTER_PAIR
private static final String FIELD_FIXED_FILTER
private static final String FIELD_BANDS
private static final String FIELD_SPECTRAL_LIBRARY
private static final String FIELD_SPECTRUM
private static final String FIELD_THUMBNAIL
private static final String FIELD_DATA
private static final String FIELD_FILE_VERSION
private static final String FIELD_CLASS_ID
private static final String FIELD_TYPE_ID
private static final String FIELD_SHAPE
private static final String FIELD_BAND_INDEX
private static final String FIELD_NAME
private static final String FIELD_SAMPLE_ID
private static final String FIELD_USER_COMMENTS
private static final String FIELD_SOURCE_FILE_NAME
private static final String FIELD_PROXY_PARENT_FILE_NAME
private static final String FIELD_MANUFACTURER
private static final String FIELD_PART_NUMBER
private static final String FIELD_MILLIMETERS_PER_PIXEL
private static final String FIELD_EXPOSURE
private static final String FIELD_WAVELENGTH
private static final String FIELD_WAVELENGTHS
private static final String FIELD_MAGNITUDES
private static final String FIELD_HOMOGENEOUS
private List<IM3Reader.IM3Record> records
private List<IM3Reader.ContainerRecord> dataSets
private List<IM3Reader.Spectrum> spectra
private byte[] data
private static final String EMPTY_STRING
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.public byte[] openRaw() throws IOException
IOException
public List<IM3Reader.Spectrum> getSpectra()
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 fileprotected static String parseString(loci.common.IRandomAccess is) throws IOException
is
- stream to read fromIOException
private static IM3Reader.IM3Record parseRecord(loci.common.IRandomAccess is) throws IOException
is
- random access stream, pointing at the record's start
(the length-quadword of the record's tag name)IOException
- on file misparsing leading to overrun and otherpublic boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
IFormatReader
isThisType
in interface IFormatReader
isThisType
in class FormatReader
IOException
public void setSeries(int no)
IFormatReader
setSeries
in interface IFormatReader
setSeries
in class FormatReader
public void close(boolean fileOnly) throws IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
IOException
public void writeSummary() throws IOException
IOException
public static void main(String[] args) throws IOException
args
- IOException
Copyright © 2017 Open Microscopy Environment