Class FileTMG


  • public class FileTMG
    extends FileBase
    DOCUMENT ME!
    • Field Detail

      • dataType

        private int dataType
        DOCUMENT ME!
      • endianess

        private boolean endianess
        DOCUMENT ME!
      • file

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

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

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

        private int[] imgExtents
        DOCUMENT ME!
      • LUT

        private ModelLUT LUT
        DOCUMENT ME!
      • rangeX

        private int rangeX
        DOCUMENT ME!
      • rangeY

        private int rangeY
        DOCUMENT ME!
      • sBuffer

        private byte[] sBuffer
        DOCUMENT ME!
    • Constructor Detail

      • FileTMG

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

      • 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
      • getModelLUT

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

        public ModelImage readImage()
                             throws java.io.IOException
        reads the TMG file header and data.
        Returns:
        DOCUMENT ME!
        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
      • readStr

        private java.lang.String readStr()
                                  throws java.io.IOException
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
        Throws:
        java.io.IOException - DOCUMENT ME!