Class FileCheshire

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

public class FileCheshire extends FileBase
The class reads Cheshire file images.
Version:
0.1 Oct 14, 1997
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileInfo

      private FileInfoCheshire fileInfo
      DOCUMENT ME!
    • fileInfoCopy

      private FileInfoCheshire fileInfoCopy
    • fileName

      private String fileName
      DOCUMENT ME!
    • image

      private ModelImage image
      DOCUMENT ME!
    • nBytesPerVoxel

      private long nBytesPerVoxel
      DOCUMENT ME!
    • scaleFactor

      private float[] scaleFactor
      DOCUMENT ME!
    • startFirstImage

      private long startFirstImage
      DOCUMENT ME!
    • startSecondImage

      private long startSecondImage
      DOCUMENT ME!
    • subLength

      private long subLength
      DOCUMENT ME!
    • xDim

      private int xDim
      DOCUMENT ME!
    • yDim

      private int yDim
      DOCUMENT ME!
    • zDim

      private int zDim
      DOCUMENT ME!
    • tDim

      private int tDim
      DOCUMENT ME!
    • xRes

      private float xRes
      DOCUMENT ME!
    • yRes

      private float yRes
      DOCUMENT ME!
    • zRes

      private float zRes
      DOCUMENT ME!
    • tRes

      private float tRes
      DOCUMENT ME!
  • Constructor Details

    • FileCheshire

      public FileCheshire(String fName, String fDir, boolean show)
      Creates a new FileCheshire object.
      Parameters:
      fName - file name
      fDir - file directory
      show - boolean for showing the progress bar
  • 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
    • isCheshire

      public static boolean isCheshire(String fName, String fDir)
      Method to test to determine if the image format is Cheshire, so appropriate read method may be called.
      Parameters:
      fName - File name of image.
      fDir - Directory.
      Returns:
      true if Cheshire file, false otherwise.
    • getFileInfo

      public FileInfoCheshire getFileInfo()
      Returns the FileInfoCheshire read from the file.
      Returns:
      File info structure read from file, or null if file has not been read.
    • readHeader

      public boolean readHeader(String imageFileName, String fileDir) throws IOException
      Reads the header and stores the information in fileInfo.
      Parameters:
      imageFileName - File name of image.
      fileDir - Directory.
      Returns:
      Flag to confirm a successful read.
      Throws:
      IOException - if there is an error reading the header
      See Also:
    • readImage

      public ModelImage readImage() throws IOException, OutOfMemoryError
      Reads an Cheshire image file by reading the header then making a FileRaw to read the image for all filenames in the file list. Only the one file directory (currently) supported.
      Throws:
      IOException - if there is an error reading the file
      OutOfMemoryError
      See Also: