Class FileBioRad

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

public class FileBioRad extends FileBase
Reads BioRaD pic file format.
  • Field Details

    • bufferSize

      private int bufferSize
      DOCUMENT ME!
    • byteBuffer

      private byte[] byteBuffer
      DOCUMENT ME!
    • byteFormat

      private short byteFormat
      if 1 data is UBYTE, otherwise data is SHORT.
    • color1

      private int color1
      LUT1 color status.
    • color2

      private int color2
      LUT2 color status.
    • dataType

      private int dataType
      DOCUMENT ME!
    • edited

      private short edited
      not used in disk files.
    • file

      private File file
      DOCUMENT ME!
    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileID

      private int fileID
      always set to 12345 in BioRad pic files.
    • fileInfo

      private FileInfoBioRad fileInfo
      DOCUMENT ME!
    • fileInfoCopy

      private FileInfoBioRad fileInfoCopy
    • fileName

      private String fileName
      DOCUMENT ME!
    • fName

      private String fName
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • imgBuffer

      private float[] imgBuffer
      DOCUMENT ME!
    • imgExtents

      private int[] imgExtents
      DOCUMENT ME!
    • lens

      private short lens
      Integer part of the lens magnification.
    • magFactor

      private float magFactor
      magnification factor.
    • merged

      private short merged
      merged format.
    • name

      private byte[] name
      DOCUMENT ME!
    • notes

      private int notes
      if 0 no notes are present if nonzero 96 byte notes follow after the image data at the end of the file.
    • ramp1Max

      private short ramp1Max
    • ramp1Min

      private short ramp1Min
    • ramp2Max

      private short ramp2Max
      LUT2 ramp max.
    • ramp2Min

      private short ramp2Min
      LUT2 ramp min.
    • readAgain

      private boolean readAgain
      DOCUMENT ME!
    • xDim

      private int xDim
      DOCUMENT ME!
    • yDim

      private int yDim
      DOCUMENT ME!
    • zDim

      private int zDim
      DOCUMENT ME!
  • Constructor Details

    • FileBioRad

      public FileBioRad(String fileName, String fileDir) throws IOException
      reader/writer 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
    • readImage

      public ModelImage readImage(boolean one) throws IOException
      reads the BioRad pic file header and data.
      Parameters:
      one - DOCUMENT ME!
      Returns:
      returns a black and white image
      Throws:
      IOException - if there is an error reading 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 - into the file
      buffer - buffer where the info is stored
      Throws:
      IOException - if there is an error reading the file