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 Details

    • GIFTI_HEADER

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

      private String intent
      Intent value in the attributes.
    • vertexCount

      private int vertexCount
      Coordinate vertex point counter.
    • indexCount

      private int indexCount
      Connectivity index counter.
  • Constructor Details

    • FileSurfaceGiftiXML_WM

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

    • finalize

      public void finalize()
      Prepares class for cleanup.
      Overrides:
      finalize in class FileSurfaceGiftiXML
    • 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(String headerFileName, String headerDir)
      Reads and parses a Gifti XML file.
      Parameters:
      headerFileName - file name of xml header
      headerDir - directory
      Returns:
      kMesh Triangle mesh
      Throws:
      IOException - file exception
    • writeXMLsurface

      public boolean writeXMLsurface(String fileName, WildMagic.LibGraphics.SceneGraph.TriMesh kMesh) throws 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:
      IOException - if a file I/O problem is encountered while writing the header
    • openTag

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

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

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

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