Class FileMagnetomVision


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

      • fileDir

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

        private java.io.File fileHeader
        DOCUMENT ME!
      • fileName

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

        private int[] imgExtents
        DOCUMENT ME!
      • imgResols

        private float[] imgResols
        DOCUMENT ME!
      • orient

        private int[] orient
        DOCUMENT ME!
    • Constructor Detail

      • FileMagnetomVision

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

        public void close()
                   throws java.io.IOException
        Closes random access file.
        Throws:
        java.io.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 java.io.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:
        java.io.IOException - Indicates error reading the file
      • readHeader

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

        public void readImage​(short[] buffer)
                       throws java.io.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:
        java.io.IOException - if there is an error reading the file
      • setFileName

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