Class FileMagnetomVision

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

public class FileMagnetomVision extends FileBase
Class that reads Siemens Magnetom Vision files.
  • Field Details

    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileHeader

      private File fileHeader
      DOCUMENT ME!
    • fileInfo

      private FileInfoMagnetomVision fileInfo
      DOCUMENT ME!
    • fileName

      private String fileName
      DOCUMENT ME!
    • imgExtents

      private int[] imgExtents
      DOCUMENT ME!
    • imgResols

      private float[] imgResols
      DOCUMENT ME!
    • orient

      private int[] orient
      DOCUMENT ME!
  • Constructor Details

    • FileMagnetomVision

      public FileMagnetomVision(String fileName, String fileDir) throws IOException
      Magnetom Vision 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
    • close

      public void close() throws IOException
      Closes random access file.
      Throws:
      IOException - DOCUMENT ME!
    • getFileInfo

      public FileInfoMagnetomVision getFileInfo()
      Get the file info generated by reading in the magnetom vision file.
      Returns:
      The file info.
    • getModelLUT

      public ModelLUT getModelLUT()
      Returns null.
      Returns:
      null.
    • isMagnetomVision

      public boolean isMagnetomVision() throws IOException
      Looks for the string "MAGNETOM VISION" in image header ID. If present, the image is a Siemens Magnetom Vision format.
      Returns:
      boolean true if the string "MAGNETOM VISION" was found in the image header.
      Throws:
      IOException - Indicates error reading the file
    • readHeader

      public FileInfoMagnetomVision readHeader() throws IOException
      Reads the Magnetom file header and data.
      Returns:
      Returns an object containing the file info.
      Throws:
      IOException - if there is an error reading the file
    • readImage

      public void readImage(short[] buffer) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      buffer - Buffer where the image is stored
      Throws:
      IOException - if there is an error reading the file
    • setFileName

      public void setFileName(String fName) throws IOException
      Accessor that sets the file name and allocates new FileInfo, File and RandomAccess file objects.
      Parameters:
      fName - File name.
      Throws:
      IOException - if there is an error constructing the files.