[vtk-developers] Passive stereo visualization with legacy graphics card

Michael Scarpa m.scarpa at uva.nl
Thu Dec 7 05:24:49 EST 2006


Hi Valeria.

On 6 Dec, 2006, at 17:42, <g_luigi at fastwebnet.it>  
<g_luigi at fastwebnet.it> wrote:

> Hi, thx for the answer but with your solution i cannot rotate the  
> actors
> keepeng the stereo view. I haven't found a solution to set both  
> cameras
> concordly to the stereo view...

That's what I was referring to in the last note of my previous  
message.  A possible solution would be to register an observer on  
each camera (each renderer has one): when a user clicks on a render  
window, the interactor causes the camera to be changed.  This  
generates an event (ModifiedEvent), which can be registered to an  
observer.  If you create two observers, one for the left-view camera  
and one for the right-view camera, you could capture whenever a  
camera gets moved and accordingly also move the other camera.  Just  
be careful!  When you change a camera in such an observer, that will  
again generate an event!  So you must make sure to un-register the  
camera's observer before modifying it in the other observer.  I'm  
attaching a modified version of the script I sent in my previous  
message to show the basic idea.  I must warn you though, that I have  
not tested this thoroughly.  What I am most worried about is how the  
camera's behave on other events like window-resize etc.  You'll have  
to look into that yourself.  Let me know if you need more  
clarifications about the attached script.

With kind regards,

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_stereo2.py
Type: text/x-python-script
Size: 1861 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20061207/b3ccea33/attachment-0001.bin>


More information about the vtk-developers mailing list