[vtkusers] Interactive graph in QVTKRenderWindowInteractor (VTK 6.1/Python 2.7/Pyside)

Michka Popoff michkapopoff at gmail.com
Thu Mar 13 17:54:55 EDT 2014


The OpenGL errors are exactly the ones I got, that’s why I wrote the new examples in the first place.
This is new in VTK 6 as the OpenGL error pipeline was rewritten. What previously (in VTK 5) was allowed is now no more allowed.

I even get segfaults when using your code on my Mac.
The things is, there should be no call to Render() before the self.show() call. This is mandatory.

A fast look at your code did not reveal where the render call could be, so I’ll have to investigate.
There is one more thing, I never tried to work with vtkContext so I don’t know if there is a conflict with the QVTKRenderWindowInteractor.

I’ll have a look at this this weekend so you may have to wait a little bit.


Michka

On 13 mars 2014, at 22:14, Noeska Smit <noeska.smit at gmail.com> wrote:

> Thank you for your fast reply, Michka. The first example does run here, so I
> believe the problem is related to using the 2D API with Qt. 
> 
> To double check this, I have rewritten that first example to include an
> animated graph. A flurry of OpenGL errors start streaming and the animation
> does not start. I can interact with the graph (pan and zoom) but I cannot
> interact with the vertices to drag them around.
> 
> This is the OpenGL error: 
> <http://vtk.1045678.n5.nabble.com/file/n5726307/opengl.png> 
> 
> I have included the adjusted PyQt example here:  graphexample.py
> <http://vtk.1045678.n5.nabble.com/file/n5726307/graphexample.py>  
> 
> 
> Michka Popoff wrote
>> Hi,
>> 
>> QVTKWidget is not really tested I think, the preferred way is to use the
>> QVTKRenderWindowInteractor.
>> 
>> There are two examples I wrote with the help of the people here on the
>> list, and by refactoring some older code.
>> I personally us the first one.
>> 
>> http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt
> 
> 
> 
> 
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Interactive-graph-in-QVTKRenderWindowInteractor-VTK-6-1-Python-2-7-Pyside-tp5726303p5726307.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK 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