Class FileBFLOAT


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

      • bufferSize

        private int bufferSize
        DOCUMENT ME!
      • endianess

        private boolean endianess
        DOCUMENT ME!
      • file

        private java.io.File file
        DOCUMENT ME!
      • fileDir

        private java.lang.String fileDir
        DOCUMENT ME!
      • fileLength

        private long fileLength
        DOCUMENT ME!
      • fileName

        private java.lang.String fileName
        DOCUMENT ME!
      • foundEOF

        private boolean foundEOF
        DOCUMENT ME!
      • imgBuffer

        private float[] imgBuffer
        DOCUMENT ME!
      • imgExtents

        private int[] imgExtents
        DOCUMENT ME!
      • imgResols

        private float[] imgResols
        DOCUMENT ME!
      • originalFileName

        private java.lang.String originalFileName
        DOCUMENT ME!
      • xDim

        private int xDim
        DOCUMENT ME!
      • yDim

        private int yDim
        DOCUMENT ME!
      • zDim

        private int zDim
        DOCUMENT ME!
    • Constructor Detail

      • FileBFLOAT

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

      • 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 java.io.IOException
        Reads the image.
        Parameters:
        one - Flag for only reading one image of dataset.
        Returns:
        returns the image
        Throws:
        java.io.IOException - if there is an error reading the file
      • readBuffer

        private void readBuffer​(int slice,
                                float[] buffer)
                         throws java.io.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:
        java.io.IOException - if there is an error reading the file
      • readLine

        private java.lang.String readLine()
                                   throws java.io.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:
        java.io.IOException - if there is an error reading the file