Class FileICS

java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileICS

public class FileICS extends FileBase
Reference: 1. Proposed Standard for Image Cytometry Data Files by Philip Dean, Laura Mascio, David Ow, Damir Sudar, and James Mullikin, Cytometry, 11, pp. 561- 569, 1990.

2. libics v.1.3 Online Documentation, copyright 2000-2002 by Cris Luengo. http://www.ph.tn.tudelft.nl/~cris/libics

Author:
William Gandler
See Also:
  • Field Details

    • RGB_FIRST

      private static final int RGB_FIRST
      DOCUMENT ME!
      See Also:
    • RGB_BETWEEN_SPACEANDTIME

      private static final int RGB_BETWEEN_SPACEANDTIME
      DOCUMENT ME!
      See Also:
    • RGB_LAST

      private static final int RGB_LAST
      DOCUMENT ME!
      See Also:
    • actualHistory

      private String[] actualHistory
      DOCUMENT ME!
    • bufferSize

      private int bufferSize
      DOCUMENT ME!
    • captureVersion

      private String captureVersion
      DOCUMENT ME!
    • category

      private String category
      DOCUMENT ME!
    • channels

      private String[] channels
      DOCUMENT ME!
    • colorSpacing

      private int colorSpacing
      DOCUMENT ME!
    • compression

      private String compression
      DOCUMENT ME!
    • dataFileName

      private String dataFileName
      DOCUMENT ME!
    • dataOffset

      private long dataOffset
      DOCUMENT ME!
    • dataSetFileName

      private String dataSetFileName
      DOCUMENT ME!
    • dataType

      private int dataType
      DOCUMENT ME!
    • endBytes

      private int endBytes
      DOCUMENT ME!
    • endFloats

      private int endFloats
      DOCUMENT ME!
    • endianess

      private boolean endianess
      DOCUMENT ME!
    • endShorts

      private int endShorts
      DOCUMENT ME!
    • exchangeXY

      private boolean exchangeXY
      DOCUMENT ME!
    • exPhotonCnt

      private String[] exPhotonCnt
      DOCUMENT ME!
    • fieldSeparator

      private byte fieldSeparator
      DOCUMENT ME!
    • file

      private File file
      DOCUMENT ME!
    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileInfo

      private FileInfoICS fileInfo
      DOCUMENT ME!
    • fileInfoCopy

      private FileInfoICS fileInfoCopy
    • fileName

      private String fileName
      DOCUMENT ME!
    • filterExposureTimeX

      private String filterExposureTimeX
      DOCUMENT ME!
    • filterFluorophoreX

      private String[] filterFluorophoreX
      DOCUMENT ME!
    • format

      private String format
      DOCUMENT ME!
    • headerFileName

      private String headerFileName
      DOCUMENT ME!
    • history

      private String[] history
      DOCUMENT ME!
    • historyNumber

      private int historyNumber
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • imgBuffer

      private float[] imgBuffer
      DOCUMENT ME!
    • imgBuffer2

      private float[] imgBuffer2
      DOCUMENT ME!
    • imgBufferI

      private float[] imgBufferI
      DOCUMENT ME!
    • imgBufferI2

      private float[] imgBufferI2
      DOCUMENT ME!
    • imgDBuffer

      private double[] imgDBuffer
      DOCUMENT ME!
    • imgDBuffer2

      private double[] imgDBuffer2
      DOCUMENT ME!
    • imgDBufferI

      private double[] imgDBufferI
      DOCUMENT ME!
    • imgDBufferI2

      private double[] imgDBufferI2
      DOCUMENT ME!
    • imgExtents

      private int[] imgExtents
      DOCUMENT ME!
    • imgLBuffer

      private long[] imgLBuffer
      DOCUMENT ME!
    • imgLBuffer2

      private long[] imgLBuffer2
      DOCUMENT ME!
    • imgResols

      private float[] imgResols
      DOCUMENT ME!
    • invertY

      private boolean invertY
      DOCUMENT ME!
    • labels

      private String[] labels
      DOCUMENT ME!
    • lambdaEm

      private String[] lambdaEm
      DOCUMENT ME!
    • lambdaEx

      private String[] lambdaEx
      DOCUMENT ME!
    • LUT

      private ModelLUT LUT
      DOCUMENT ME!
    • mapchannel

      private String[] mapchannel
      DOCUMENT ME!
    • nDims

      private int nDims
      DOCUMENT ME!
    • numAperture

      private String[] numAperture
      DOCUMENT ME!
    • numberSlices

      private int numberSlices
      DOCUMENT ME!
    • numberSpaceSlices

      private int numberSpaceSlices
      DOCUMENT ME!
    • numColors

      private int numColors
      DOCUMENT ME!
    • numValues

      private int numValues
      DOCUMENT ME!
    • order

      private String[] order
      DOCUMENT ME!
    • origin

      private float[] origin
      DOCUMENT ME!
    • parameters

      private int parameters
      DOCUMENT ME!
    • pinholeRadius

      private String[] pinholeRadius
      DOCUMENT ME!
    • plateChamberID

      private String plateChamberID
      DOCUMENT ME!
    • plateVesselID

      private String plateVesselID
      DOCUMENT ME!
    • probe

      private String[] probe
      DOCUMENT ME!
    • refrInxLensMedium

      private String[] refrInxLensMedium
      DOCUMENT ME!
    • refrInxMedium

      private String[] refrInxMedium
      DOCUMENT ME!
    • rgbPos

      private int rgbPos
      DOCUMENT ME!
    • scale

      private float[] scale
      DOCUMENT ME!
    • scilType

      private String scilType
      DOCUMENT ME!
    • sensorModel

      private String sensorModel
      DOCUMENT ME!
    • sensorType

      private String sensorType
      DOCUMENT ME!
    • sign

      private String sign
      DOCUMENT ME!
    • significant_bits

      private int significant_bits
    • sizes

      private int[] sizes
      DOCUMENT ME!
    • specimen

      private String[] specimen
      DOCUMENT ME!
    • specimenSpecies

      private String[] specimenSpecies
      DOCUMENT ME!
    • startLocations

      private float[] startLocations
      DOCUMENT ME!
    • subcategory

      private String subcategory
      DOCUMENT ME!
    • tPos

      private int tPos
      DOCUMENT ME!
    • units

      private String[] units
      DOCUMENT ME!
    • unitsOfMeasure

      private int[] unitsOfMeasure
      DOCUMENT ME!
    • unitsStr

      private String[] unitsStr
      DOCUMENT ME!
    • useGZIP

      private boolean useGZIP
      DOCUMENT ME!
    • values

      private String[] values
      DOCUMENT ME!
    • version

      private String version
      DOCUMENT ME!
    • xPos

      private int xPos
      DOCUMENT ME!
    • yPos

      private int yPos
      DOCUMENT ME!
    • zPos

      private int zPos
      DOCUMENT ME!
    • hasRGB

      private boolean hasRGB
  • Constructor Details

    • FileICS

      public FileICS(String fileName, String fileDir) throws IOException
      ICS reader constructor.
      Parameters:
      fileName - file name
      fileDir - file directory
      Throws:
      IOException - if there is an error making the file
  • Method Details

    • finalize

      public void finalize()
      Prepares this class for cleanup. Calls the finalize method for existing elements, closes any open files and sets other elements to null.
      Overrides:
      finalize in class FileBase
    • getFileInfo

      public FileInfoBase getFileInfo()
      getFileInfo - accessor that returns the file info.
      Returns:
      FileInfoBase containing the file info
    • getImageBuffer

      public float[] getImageBuffer()
      getImageBuffer - accessor that returns the image buffer.
      Returns:
      buffer of image.
    • getModelLUT

      public ModelLUT getModelLUT()
      getModelLUT - returns LUT if defined.
      Returns:
      the LUT if defined else it is null
    • readImage

      public ModelImage readImage() throws IOException
      readImage.
      Returns:
      returns the image
      Throws:
      IOException - if there is an error reading the file
    • writeImage

      public void writeImage(ModelImage image, FileWriteOptions options) throws IOException
      Writes an ICS format type image.
      Parameters:
      image - Image model of data to write.
      options - options such as starting and ending slices and times
      Throws:
      IOException - if there is an error writing the file
    • readBuffer

      private void readBuffer(int slice, float[] buffer) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      slice - offset into the file stored in the dataOffset array
      buffer - buffer where the info is stored
      Throws:
      IOException - if there is an error reading the file
    • readComplexBuffer

      private void readComplexBuffer(int slice, float[] bufferR, float[] bufferI) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      slice - offset into the file stored in the dataOffset array
      bufferR - buffer where the real info is stored
      bufferI - buffer where the imaginary info is stored
      Throws:
      IOException - if there is an error reading the file
    • readDBuffer

      private void readDBuffer(int slice, double[] buffer) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      slice - offset into the file stored in the dataOffset array
      buffer - buffer where the info is stored
      Throws:
      IOException - if there is an error reading the file
    • readDComplexBuffer

      private void readDComplexBuffer(int slice, double[] bufferR, double[] bufferI) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      slice - offset into the file stored in the dataOffset array
      bufferR - buffer where the real info is stored
      bufferI - buffer where the imaginary info is stored
      Throws:
      IOException - if there is an error reading the file
    • readHeader

      public boolean readHeader() throws IOException
      Reads the image header.
      Throws:
      IOException - DOCUMENT ME!
    • readLBuffer

      private void readLBuffer(int slice, long[] buffer) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      slice - offset into the file stored in the dataOffset array
      buffer - buffer where the info is stored
      Throws:
      IOException - if there is an error reading the file
    • readLine

      private void readLine() throws IOException
      readLine() - reads a line of the file header separate into category, subcategory, and values.
      Throws:
      IOException - if there is an error reading the file