Class FileOME


  • public class FileOME
    extends FileBase
    DOCUMENT ME!
    • Field Detail

      • W3C_XML_SCHEMA

        private static final java.lang.String W3C_XML_SCHEMA
        The W3C XML schema.
        See Also:
        Constant Field Values
      • fileDir

        private java.lang.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 java.lang.String fileName
        The name of the xml image header file.
      • image

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

        private java.lang.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 Detail

      • FileOME

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

      • readHeader

        public boolean readHeader​(java.lang.String headerFileName,
                                  java.lang.String headerFileDir)
                           throws java.io.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:
        java.io.IOException - if there is an error reading the header file from disk
      • readImage

        public ModelImage readImage()
                             throws java.io.IOException,
                                    java.lang.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:
        java.io.IOException - if there is an error reading the file
        java.lang.OutOfMemoryError - if there is not enough memory available to read in the image
        See Also:
        FileRaw