[vtkusers] GUI for VTK (was [DEMO] amira)

Ken Martin ken.martin at kitware.com
Sun Jun 18 09:55:17 EDT 2000


A network editor for VTK sounds like a great idea. I have one suggestion, 
use the parser that is in VTK currently. It really isn't that complicated 
and it will always work with the source code since it is used to bind to 
the scripting languages. There is no need to touch the YACC and Lex code 
since they are language independent and just read the VTK header files into 
a C data structure (wrap/vtkParse.h).  All you need to do is modify a 
program like wrap/vtkPrint.c (very simple, or wrap/vtkWrapTcl.c which is 
more complicated) to produce the required classes for your network editor. 
That way the code & UI for the nodes will all be generated from the C++ 
header files. Then you just need to create the supporting classes and main 
UI etc.

- Ken
Sebastien> Therefore, I think we might need a tool that will parse
Sebastien> the VTK sources, and build a kind of database (or
Sebastien> listing) of all objects, functions, and parameters
Sebastien> (VTKDB). This file would be read by the GUI, and used
Sebastien> to build a database and provide a reliable and unified
Sebastien> way to connect objects, or implement a full-featured
Sebastien> object browser. It could be available for download, or
Sebastien> updated remotely or locally when you update your VTK
Sebastien> version, whatever.
Sounds fabulous. Just what I was thinking.
Sebastien> That kind of parser is already available in some form,
Sebastien> it is (they are) used to build the API bindings between
Sebastien> the C++ lib and Python, Tcl, Java, and stuff. There is
Sebastien> one parser per language, and correct me if I'm wrong,
Sebastien> the C++ source is parsed for *every* language to build
Sebastien> the binding. To be honest, I've not reverse-engineered
Sebastien> the parser for the moment, it looks a bit freaky
Sebastien> (Yacc/Bison or something like that, I'm just a poor
Sebastien> Perl adept). Maybe it would be a good opportunity to
Sebastien> write a tool unifying and simplifying the stuff :
Sebastien> something that would build that previously described
Sebastien> VTKDB, then simple functions that would generate the
Sebastien> bindings from the VTKDB, without re-reading the source.
I guess you do already have a rudimentary parser in your
doxygen perl scripts?






More information about the vtkusers mailing list