[vtkusers] VTK CVS + wxPython...
Nigel Nunn
nNunn at ausport.gov.au
Fri Jul 23 04:44:19 EDT 2004
Hi Andrea,
My guess is that folks who are comfortable with Vtk
may be using the C++ wxWidgets, not a wrapper, e.g.
http://www.creatis.insa-lyon.fr/~malaterre/wxVTK/
There are many ways of speeding up the rendering of
large models. If I get a chance, I'll try a C++
implementation of your pipeline (with wxWidgets).
Nigel
-----Original Message-----
From: Andrea Gavana [mailto:andrea.gavana at polymtl.ca]
Sent: Friday, 23 July 2004 5:59 PM
To: Charl P. Botha
Cc: VTK List
Subject: Re: [vtkusers] VTK CVS + wxPython...
Hello NG,
after some hard work, nothing seems changed in my application. I just
encountered some problems using wxPython + VTK; by viewing the wide use of
wx_Things on the net (it seems to me that it will replace TK), I have
imagined
that a lot of people were using wxPython + VTK on a Windows machine.
Obviously
it was a mistaken. If after 3 months of presence of wxVTKRWI in the CVS no
one
has complained about some strange behavior on Window$ machines, it means
that
no one is using it. I had the same behavior on Win2000, XP and 98.
Anyway, I really like wxPython for all the nice widgets/accessories it
has, and it seems to me quite intuitive. For this I still stand on it, even
if
(probably) removing the VTK 4.2 version from Enthought in order to install
the
VTK from CVS was a big mistake. At least, before, almost everything worked
(only the point picker, "P" key on the keyboard, had a bug). And even if
someone of you could think that is not correct, I could use
wxVTKRenderWindow
and wxVTKRenderWindowInteractor together. It was probably wrong, but it
worked.
Now, if someone of you would like to try my application, please
download
these 2 files:
http://xoomer.virgilio.it/infinity77/MSE_22_SET.zip
http://xoomer.virgilio.it/infinity77/myproject.zip
Sorry to have splitted the directory in 2 zip files, but my internet site
did
not allow me to upload a 2 MB file in one shot.
The first one contains the GRID files with the point coordinate
specification,
while the second one contains all the Python/Pyfort/VTK files in order to
run
the application. Please notify me if you're having some problems in running
the
application. In order to run the application, the main script is Script2.py.
The program will ask you to select a DATA file (via a FileDialog), there is
one
included in the directory "myproject". It scans this DATA file and then it
will
ask you for a GRID file, thas is in zipped in the file MSE_22_SET.zip. Then
it
does some calculations/rearrangements, and it shows up a wx frame with a VTK
window in it. Please note these 3 things:
1) Interaction is fairly slow (even if it is a small 3D grid, I can't
imagine
with bigger grids); you can easily see the difference by using
wxVTKRenderWindow instead of wxVTKRenderWindowInteractor;
2) The vtkOrientationMarkerWidget will not work, whatever I do, it does not
follow the camera. It is frozen;
3) If you comment out the 3 lines:
hiren.GetActiveCamera().Zoom(1.5)
hiren.GetActiveCamera().Elevation(135.0)
hiren.GetActiveCamera().Roll(180.0)
At lines 907-908-909 of the Script2.py, and you some interaction for a while
(rotate/pan/zoom), after a while the window will freeze and you will not
able
to do any other interaction, not even close the window. You have to kill the
application.
Probably there is something else, but not I'm a little disappointed about
everything. I should work and study Python/C++ a little more, probably.
Thanks to everyone for all suggestions/pointers.
Please try my application! Every suggestion/enhancement/good style
programming tips are really really really welcome.
Andrea.
**********************************************************************************
This message is intended for the addressee named and may contain confidential and
privileged information. If you are not the intended recipient please note that
any form of distribution, copying or use of this communication or the information
in it is strictly prohibited and may be unlawful.
If you receive this message in error, please delete it and notify the sender.
Keep up to date with what's happening in Australian sport.
Visit http://www.ausport.gov.au
**********************************************************************************
More information about the vtkusers
mailing list