[vtkusers] XML question

Reinhold Füreder R.Fureder at exeter.ac.uk
Wed Mar 23 03:52:05 EST 2005


Dear Marius,

Unfortunately I only dare to answer your probably less important
question -- in my mind it is a perfectly appropriate decision to use XML
for this task.

I have not tried to use the VTK-XML stuff directly yet, only the dataset
XML readers & writers; as you have already pointed out there will be
other XML parsers available for your task (e.g. Xerces-C++ from
apache.org), if any of the more experienced VTK gurus gives you a
negative answer.

HTH Reinhold

> -----Original Message-----
> From: vtkusers-bounces at vtk.org 
> [mailto:vtkusers-bounces at vtk.org] On Behalf Of Marius S Giurgi
> Sent: Tuesday, March 22, 2005 9:27 PM
> To: vtkusers at vtk.org
> Subject: [vtkusers] XML question
> 
> 
> 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
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
http://www.vtk.org/Wiki/VTK_FAQ Follow this link to
subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list