Class IM3Reader

java.lang.Object
loci.formats.FormatHandler
loci.formats.FormatReader
loci.formats.in.IM3Reader
All Implemented Interfaces:
Closeable, AutoCloseable, loci.formats.ICompressedTileReader, loci.formats.IFormatHandler, loci.formats.IFormatReader, loci.formats.IMetadataConfigurable, loci.formats.IPyramidHandler

public class IM3Reader extends loci.formats.FormatReader
Author:
Lee Kamentsky This is a FormatReader for the Perkin-Elmer Nuance line of multispectral imaging microscopes' .im3 file format. The .im3 format stores 63 planes representing intensity measurements taken on separate spectral bands. The pixel intensity at a single band might be used as a proxy for fluorophore presence, but the best results are obtained if the whole spectrum is used to synthesize an intensity. The most efficient strategy is to use IM3Reader.openRaw() to fetch the entire image which may then be scanned sequentially to create one planar image per desired signal. IM3Reader may be run as a Java application to dump a per-record description of the file to standard output
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    A record containing boolean values
    protected static class 
     
    protected static class 
     
    protected static class 
     
    protected static class 
     
    static class 
     
    protected static class 
     
  • Field Summary

    Fields inherited from class loci.formats.FormatReader

    core, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION

    Fields inherited from class loci.formats.FormatHandler

    COMPRESSION_SUFFIXES, currentId, format, metadataOptions, suffixes

    Fields inherited from interface loci.formats.IFormatReader

    CAN_GROUP, CANNOT_GROUP, MUST_GROUP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct an uninitialized reader of .im3 files.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean fileOnly)
     
    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
     
    boolean
    isThisType(loci.common.RandomAccessInputStream stream)
     
    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)
     
    byte[]
    Open the current series in raw-mode, returning the interleaved image bytes.
    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)
     
    void
    Write a summary of each field in the IM3 file to the writer

    Methods inherited from class loci.formats.FormatReader

    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, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, 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, getTileColumns, getTileRows, 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, readPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, updateMetadataLists

    Methods inherited from class loci.formats.FormatHandler

    checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptions

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface loci.formats.ICompressedTileReader

    getTileBoundingBox, getTileCodec, getTileCodecOptions, openCompressedBytes, openCompressedBytes

    Methods inherited from interface loci.formats.IFormatHandler

    getFormat, getNativeDataType, getSuffixes

    Methods inherited from interface loci.formats.IMetadataConfigurable

    getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
  • Constructor Details

    • IM3Reader

      public IM3Reader()
      Construct an uninitialized reader of .im3 files.
  • Method Details

    • openBytes

      public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException
      Specified by:
      openBytes in interface loci.formats.IFormatReader
      Specified by:
      openBytes in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • openRaw

      public byte[] openRaw() throws IOException
      Open the current series in raw-mode, returning the interleaved image bytes. The data format for a pixel is a run of 63 unsigned short little endian values.
      Returns:
      a byte array containing the data organized by spectral channel, then x, then y. Returns null if, for some incomprehensible reason, the DATA block was missing.
      Throws:
      IOException
    • getSpectra

      public 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). This method finds the spectral library and returns the spectra inside.
      Returns:
      a list of the Spectrum records contained in the library
    • initFile

      protected void initFile(String id) throws loci.formats.FormatException, IOException
      Overrides:
      initFile in class loci.formats.FormatReader
      Throws:
      loci.formats.FormatException
      IOException
    • parseString

      protected static String parseString(loci.common.IRandomAccess is) throws IOException
      Parse a string from the IM3 file at the current file pointer loc
      Parameters:
      is - stream to read from
      Returns:
      parsed string or null for string of zero length
      Throws:
      IOException
    • isThisType

      public boolean isThisType(loci.common.RandomAccessInputStream stream) throws IOException
      Specified by:
      isThisType in interface loci.formats.IFormatReader
      Overrides:
      isThisType in class loci.formats.FormatReader
      Throws:
      IOException
    • setSeries

      public void setSeries(int no)
      Specified by:
      setSeries in interface loci.formats.IFormatReader
      Overrides:
      setSeries in class loci.formats.FormatReader
    • close

      public void close(boolean fileOnly) throws IOException
      Specified by:
      close in interface loci.formats.IFormatReader
      Overrides:
      close in class loci.formats.FormatReader
      Throws:
      IOException
    • writeSummary

      public void writeSummary() throws IOException
      Write a summary of each field in the IM3 file to the writer
      Throws:
      IOException
    • main

      public static void main(String[] args) throws IOException
      Write a summary of each record to STDOUT
      Parameters:
      args -
      Throws:
      IOException