[PyKDE] Help!! beginner's question
gvermeul at grenoble.cnrs.fr
Tue Sep 30 19:24:00 BST 2003
On Tue, 30 Sep 2003 03:51:17 +0000
"Yi-Yu Chou" <chouyiyu at hotmail.com> wrote:
> Dear all,
> I want to use python as my GUI to load a 3D volume(vtkImageData),
> and use a pointer to pass this image data to my own C++ class.
> My question is I don't know how to communicate between python and C++.
> Is there any example that I can start from ?
> Thanks a lot !!!!!!
VTK has its own Python extensions that can be used with PyQt (I have
fixed a few bugs in those, but I do not know if those fixes are in the
newest versions of VTK).
So, try to install the python Vtk extensions and check if
is newer than what comes with Vtk.
I do not use this stuff myself, but it has helped several persons.
If you are running Windows and have a mathematical/scientific background
you might want to check http://www.enthought.com/python. It has Vtk and
tons of other stuff built in (also Vtk oriented).
You can use it with PyQt if you take the QVTKRenderWindowInteractor.py
widget from my site.
IMO, if you really want to wrap C++ Vtk classes, you are better off using
the Vtk-wrapper tools and combine Vtk and Qt at the Python level.
More information about the PyQt