Class FileBFLOAT

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

public class FileBFLOAT extends FileBase
Author:
William Gandler
See Also:
  • Field Details

    • bufferSize

      private int bufferSize
      DOCUMENT ME!
    • endianess

      private boolean endianess
      DOCUMENT ME!
    • file

      private File file
      DOCUMENT ME!
    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileInfo

      private FileInfoBFLOAT fileInfo
      DOCUMENT ME!
    • fileInfoCopy

      private FileInfoBFLOAT fileInfoCopy
    • fileLength

      private long fileLength
      DOCUMENT ME!
    • fileName

      private String fileName
      DOCUMENT ME!
    • foundEOF

      private boolean foundEOF
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • imgBuffer

      private float[] imgBuffer
      DOCUMENT ME!
    • imgExtents

      private int[] imgExtents
      DOCUMENT ME!
    • imgResols

      private float[] imgResols
      DOCUMENT ME!
    • originalFileName

      private String originalFileName
      DOCUMENT ME!
    • xDim

      private int xDim
      DOCUMENT ME!
    • yDim

      private int yDim
      DOCUMENT ME!
    • zDim

      private int zDim
      DOCUMENT ME!
  • Constructor Details

    • FileBFLOAT

      public FileBFLOAT(String originalFileName, String fileDir) throws IOException
      Interfile reader/writer constructor.
      Parameters:
      originalFileName - file name
      fileDir - file directory
      Throws:
      IOException - if there is an error making the file
  • Method Details

    • getFileInfo

      public FileInfoBFLOAT getFileInfo()
      Returns the file info.
      Returns:
      FileInfoBase containing the file info
    • getImageBuffer

      public float[] getImageBuffer()
      Returns the image buffer.
      Returns:
      buffer of image.
    • 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 image.
      Parameters:
      one - Flag for only reading one image of dataset.
      Returns:
      returns the 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 - 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 String readLine() throws IOException
      Reads lines of the file and strips comments indicated by the ; symbol until a nonnull String results or the end of the file is reached.
      Returns:
      the line read in
      Throws:
      IOException - if there is an error reading the file