Class FileOME

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

public class FileOME extends FileBase
DOCUMENT ME!
  • Field Details

    • W3C_XML_SCHEMA

      private static final String W3C_XML_SCHEMA
      The W3C XML schema.
      See Also:
    • fileDir

      private String fileDir
      The directory where the xml header and raw image data file are located.
    • fileInfo

      private FileInfoOME fileInfo
      The info for the image file.
    • fileName

      private String fileName
      The name of the xml image header file.
    • image

      private ModelImage image
      The image to read or write.
    • imageFileName

      private String imageFileName
      The name of the raw image data file.
    • LUT

      private ModelLUT LUT
      The image's lut.
    • showProgress

      private boolean showProgress
      Whether to show a progress bar while processing the file.
    • usesLUT

      private boolean usesLUT
      Whether the image has a lut already. One is generated if this variable is false.
  • Constructor Details

    • FileOME

      public FileOME(String fName, String fDir, boolean show)
      Constructs new file object.
      Parameters:
      fName - File name.
      fDir - File directory.
      show - Flag for showing the progress bar.
  • Method Details

    • readHeader

      public boolean readHeader(String headerFileName, String headerFileDir) throws IOException
      Read the image XML header.
      Parameters:
      headerFileName - the header file name
      headerFileDir - the directory the header file is in
      Returns:
      true if successful, false otherwise
      Throws:
      IOException - if there is an error reading the header file from disk
    • readImage

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