Class FileSurfaceGiftiXML_WM


  • public class FileSurfaceGiftiXML_WM
    extends FileSurfaceGiftiXML
    Inherits from FileXML, reads gifti xml files based on the "gifti.xsd" file. Defines specific variables for reading and writing gifti ascii xml files.
    • Field Detail

      • GIFTI_HEADER

        protected static final java.lang.String GIFTI_HEADER
        Gifti header string (for top of xml header).
        See Also:
        Constant Field Values
      • intent

        private java.lang.String intent
        Intent value in the attributes.
      • vertexCount

        private int vertexCount
        Coordinate vertex point counter.
      • indexCount

        private int indexCount
        Connectivity index counter.
    • Constructor Detail

      • FileSurfaceGiftiXML_WM

        public FileSurfaceGiftiXML_WM​(java.lang.String fName,
                                      java.lang.String fDir)
        Constructs new file object.
        Parameters:
        fName - File name.
        fDir - File directory.
    • Method Detail

      • getFileInfo

        public FileInfoSurfaceGiftiXML_WM getFileInfo()
        Returns the FileInfoSurfaceRefXML read from the file.
        Returns:
        File info read from file, or null if it has not been read.
      • readSurfaceXML

        public WildMagic.LibGraphics.SceneGraph.TriMesh readSurfaceXML​(java.lang.String headerFileName,
                                                                       java.lang.String headerDir)
        Reads and parses a Gifti XML file.
        Parameters:
        headerFileName - file name of xml header
        headerDir - directory
        Returns:
        kMesh Triangle mesh
        Throws:
        java.io.IOException - file exception
      • writeXMLsurface

        public boolean writeXMLsurface​(java.lang.String fileName,
                                       WildMagic.LibGraphics.SceneGraph.TriMesh kMesh)
                                throws java.io.IOException
        Writes the XML file information, including the surface out to the given filename and path:
        Parameters:
        fileName - file name to write to
        kMaterial - surface material
        opacity - surface opacity
        levelDetail - surface level of detail
        Returns:
        if header write was successful
        Throws:
        java.io.IOException - if a file I/O problem is encountered while writing the header
      • openTag

        public void openTag​(java.lang.String tag,
                            java.util.Vector<FileXML.XMLAttributes> attr)
        Writes a closed tag where no value is specified, only attributes.
      • closedTagGifti

        protected void closedTagGifti​(java.lang.String tag,
                                      java.lang.String val)
        Simple function to write an xml formatted closed tag including the tag value.
        Parameters:
        bw - write to use
        tag - tag name
        val - tag value
      • closedTagWithCDATA

        protected void closedTagWithCDATA​(java.lang.String tag,
                                          java.lang.String val)
        Simple function to write an xml formatted closed tag including the tag value.
        Parameters:
        bw - write to use
        tag - tag name
        val - tag value
      • getCDATA

        public java.lang.String getCDATA​(java.lang.String value)
        Converting string value to CDATA format.
        Parameters:
        value - string
        Returns:
        CDATA section format string