[vtkusers] [VTK4.x + Python + wxPhyton] wxVTKRenderWindow maturity

Eric Boix frog at creatis.insa-lyon.fr
Wed Feb 27 04:39:53 EST 2002


        Dear VTK + Python + wxPython users,

  I've been using the wxVTKRenderWindow (the plugin of a VTK RenderWindow for
the wxPython portable GUI toolkit) for almost a year now. During this period
I witnessed the evolution of this wxVTKRenderWindow class and even participated
in testing it. At times, I could successfully use it for my medical 
imaging laboratory projects (see
  http://www.creatis.insa-lyon.fr/~frog/wxVTKRenderWindow/wxVTKRenderWindow.png
for a screenshot of what can be achieved with it).

  Sadly enough I have to admit that today's versions didn't reach the maturity
I was expecting. In particular it never reached the maturity of it's peer
version for Tcl/TK.

  One of the biggest difficulties comes from the various versions of
wxVTKRenderWindow. To make a long story short, one can consider they are
two main branches for this code :
 * the first one developped by both Robin Dunn (who maintains wxPython and
   wxWindows) and Prabhu Ramachandran. Those versions are the one packaged with
   wxPython. The main reference is here :
   http://cvs.wxwindows.org/cgi-bin/viewcvs.cgi/wxPython/wxPython/lib/vtk.py
     Note that, depending on the version of wxPython you download, you will
   obtain a very different version of wxVTKRenderWindow !
 * the second one is due to David Gobbi with suggested improvement from
   Prabhu Ramachandran. This version comes with VTK4.x. The main reference
   is here :
   http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Wrapping/Python/wxVTKRenderWindow.py?cvsroot=VTK

  In an ditch attemp to decide which version to use, I built a small low level
testing suite for the various versions of this wxVTKRenderWindow class.
Basically it checks if the immersion of one (or many) wxVTKRenderWindow in
some simple wxPython widgets (like a frame, a notebook, a splitterwindow)
is operationnal.

You can find the result of this minimal test suite for the above mentioned
versions at
   http://www.creatis.insa-lyon.fr/~frog/wxVTKRenderWindow/Tests.txt
My conclusion and IMVHO is that none of those versions seem to work fully and
properly on both Win32 and Un*x. I wish I was wrong (maybe my testing scripts
are plain crap)...

This test suite can be retrieved at
  http://www.creatis.insa-lyon.fr/~frog/wxVTKRenderWindow/
with the following layout
  * the test scripts are the files test*.py,
  * the various wxVTKRenderWindow versions are the files vtk*.py
  * a switch script __init__.py (comment out what you need) with
    some comments on the vtk*.py.

You can also retrieve this context in a single gzipped tar file at
  http://www.creatis.insa-lyon.fr/~frog/wxVTKRenderWindow/wxVTKRenderWindow.tgz
Once downloaded you can directely run any of the scripts by invoking python
on them e.g. python testSplitter.py. Switching the version is done by
editing __init__.py.


I can now dare to ask my questions :
 * what branch/version do the Python+VTK gurus recommend ?
 * what is the best strategy to achieve maturity with wxVTKRenderWindow ?

Needless to say I offer my services, to whom may need them, for testing the
incoming versions before reaching the golden age of stability.

        Yours,
        Eric Boix.




More information about the vtkusers mailing list