[vtkusers] XML question

Marius S Giurgi rendezvous at dreamxplosion.com
Tue Mar 22 15:26:36 EST 2005


Dear vtkers

One main question:  can I use the XML package in the VTK as an 
alternative to an XML parser package for c++?

I am working on a GUI application written in C++ (with VTK, FLTK) to 
process and visualize medical images and I'd like to be able to save 
the user settings on an xml file. I'm not quite sure whether XML is the 
way to go so any suggestions are highly appreciated.

The structure of the XML file that I was thinking of looks something 
like this:

<?xml version="1.0" encoding="ISO-8859-1"?>

<fait_parameters>

   <functional>

     <slice_parameters>
       <thickness>"0.5"</thickness>
       <center>"0"</center>
       <slices>"16"</slices>
       <resolution>"64x64"</resolution>
     </slice_parameters>

     <aquisition_parameters>
       <echo_time>"50"</echo_time>
       <repetition>"4000"</repetition>
       <flip_angle>"60"</flip_angle>
       <time_series>"1"</time_series>
       <standard_deviation>"1"</standard_deviation>
     </aquisition_parameters>

     <additional_tools>
       <contrast>"0"</contrast>
       <noise>"0"</noise>
       <activation>"0"</activation>
       <motion>"0"</motion>
     </additional_tools>

   </functional>

<structural>
...
</structural>

</fait_parameters>

Basically I'd like to save all the GUI user settings on a file for 
later use so that the user doens't have to reenter all the values for a 
specific computation.

Is the XML an overkill for such a simple task?
At any rate, can I use the XML-VTK package to write these settings on 
an xml file? What my concern is whether the vtk xml package is for the 
internal vtk data structure only or whether it can be use to define any 
arbitrary xml structure.

cheers,
  Marius




More information about the vtkusers mailing list