Class FileTMG

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

public class FileTMG extends FileBase
DOCUMENT ME!
  • Field Details

    • dataType

      private int dataType
      DOCUMENT ME!
    • endianess

      private boolean endianess
      DOCUMENT ME!
    • file

      private File file
      DOCUMENT ME!
    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileInfo

      private FileInfoTMG fileInfo
      DOCUMENT ME!
    • fileName

      private String fileName
      DOCUMENT ME!
    • image

      private ModelImage image
      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 Details

    • FileTMG

      public FileTMG(String fileName, String fileDir) throws IOException
      TMG 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
    • getModelLUT

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

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

      private String readStr() throws IOException
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      IOException - DOCUMENT ME!