Class FileGESigna5X

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

public class FileGESigna5X extends FileBase
Reads both GE Neducak Systems MR 5X and LX. Modify to handle MRGE files from a GE signa-5 with IMGF starting at locating 3228 and image data starting at location 8424. Follows file format thru lenUsrDefData field; then varies from format.
  • Field Details

    • byteBuffer

      private byte[] byteBuffer
      DOCUMENT ME!
    • compression

      private int compression
      DOCUMENT ME!
    • depth

      private int depth
    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileHeader

      private File fileHeader
      DOCUMENT ME!
    • fileInfo

      private FileInfoGESigna5X fileInfo
      DOCUMENT ME!
    • fileName

      private String fileName
      DOCUMENT ME!
    • imageNumber

      private int imageNumber
      DOCUMENT ME!
    • imagePtr

      private int imagePtr
      DOCUMENT ME!
    • lenExamHdr

      private int lenExamHdr
      DOCUMENT ME!
    • lenImageHdr

      private int lenImageHdr
      DOCUMENT ME!
    • lenSeriesHdr

      private int lenSeriesHdr
      DOCUMENT ME!
    • orient

      private int[] orient
      DOCUMENT ME!
    • start

      private float[] start
      DOCUMENT ME!
    • startAdjust

      private int startAdjust
      DOCUMENT ME!
    • width

      private int width
      DOCUMENT ME!
    • height

      private int height
      DOCUMENT ME!
  • Constructor Details

    • FileGESigna5X

      public FileGESigna5X(String fileName, String fileDir) throws IOException
      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
    • getFileInfo

      public FileInfoGESigna5X getFileInfo()
      DOCUMENT ME!
      Returns:
      FileInfoGESigna5X fileInfo
    • getHeight

      public int getHeight()
      DOCUMENT ME!
      Returns:
      int height
    • getImageNumber

      public int getImageNumber()
      DOCUMENT ME!
      Returns:
      int image number
    • getStartAdjust

      public int getStartAdjust()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getWidth

      public int getWidth()
      DOCUMENT ME!
      Returns:
      int width
    • readImage

      public void readImage(float[] buffer) throws IOException
      reads the Signa 5X file header and data.
      Parameters:
      buffer - DOCUMENT ME!
      Throws:
      IOException - if there is an error reading the file
    • readImageFileData

      public int readImageFileData()
      DOCUMENT ME!
      Returns:
      int size of image file data
    • 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.
    • isGESigna5X

      public boolean isGESigna5X() throws IOException
      Looks for the magic number "IMGF" in image header for GE Signa 5.X type file. If present, the image is GE SIGNA 5.X format.
      Returns:
      boolean true if the magic number was found in the image header.
      Throws:
      IOException - Indicates error reading the file
    • checkMagicNumber

      private boolean checkMagicNumber()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • readBuffer

      private void readBuffer(float[] buffer) throws IOException
      Reads a slice of data at a time and stores the results in the buffer.
      Parameters:
      buffer - buffer where the info is stored
      Throws:
      IOException - DOCUMENT ME!
    • writeImage

      public void writeImage(ModelImage image, FileWriteOptions options) throws IOException
      Throws:
      IOException