<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [vtkusers] same camera on different viewpoints</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>If you are trying to use crystal eyes why not just SetStereoTypeToCrystalEyes on the&nbsp; renderwindow.&nbsp; You don't get much control over 3d rendering parameters (offset...), but everything is taken care of internally by vtk, including the generation of the 2 views.&nbsp; Also ren2-&gt;SetActiveCamera(ren1-&gt;GetActiveCamera()); probably wouldn't work for this application since the two viewpoints should actually be 2 different views, consequently different cameras, right?<BR>
<BR>
<BR>
Rob<BR>
<BR>
Luca, I had tried that myself at one point:<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp; ren2-&gt;SetActiveCamera(ren1-&gt;GetActiveCamera());<BR>
<BR>
but would get random crashes, has it been ok for you? I eventually had<BR>
to manually copy over camera parameters between the two cameras<BR>
instead to get the same effect.<BR>
<BR>
I think what Sicilia wants is to have the same interaction propagated<BR>
to all renderers (since the cameras may be setup in different<BR>
locations). This probably isn't a typical thing to do, normally you<BR>
want the camera location copied throughout all renderers instead. I<BR>
was looking into this but couldn't figure out myself how to Invoke()<BR>
the same interaction on another renderer. We can listen on Interaction<BR>
events on the render window's interactor, but not quite sure how to<BR>
propagate it to the other renderers.<BR>
<BR>
Mark<BR>
<BR>
<BR>
On Jan 9, 2008 8:52 AM, Sicilia Judice &lt;siciliajudice@gmail.com&gt; wrote:<BR>
&gt; I think I am very near to finish this...<BR>
&gt;<BR>
&gt; Let me try to explain... I have to generate stereo images to use with<BR>
&gt; Crystal Eyes... So, I have create two viewports, displayed vertically, one<BR>
&gt; over other... The upper viewport is the stereo image for one eye, and the<BR>
&gt; second one for the other eye. I have to put one of this images with a<BR>
&gt; difference of 5° (the paralaxe). I was creating two cameras, each one for<BR>
&gt; one viewport. In the second camera I was using the method Azimuth(5). But in<BR>
&gt; this way, I was having to take care of the interaction, what I could not<BR>
&gt; done... Now I have try a different solution: I create only one camera and<BR>
&gt; set to both viewports. Now, any action with the mouse move the two images<BR>
&gt; together... But I have to translate the second image in 5°, and I do not<BR>
&gt; know how to do it... How can I translate an imagem in a viewport???<BR>
&gt;<BR>
&gt; ps.: sorry for the english, I am from Brazil!<BR>
&gt;<BR>
&gt; ps2.: thanks for the attention!!!<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; On Jan 9, 2008 11:42 AM, Luca Pallozzi Lavorante &lt;lplavorante@gmail.com &gt;<BR>
&gt; wrote:<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; Sicilia,<BR>
&gt; &gt; if you work in C++, let's say you have two viewports, with two<BR>
&gt; corresponding instances of vtkRenderer, ren1 and ren2. Say that you want to<BR>
&gt; modify ren2´s camera according to whatever interaction you perform on ren1<BR>
&gt; (via a vtkRenderWindowInteractor). The command to accomplish that is :<BR>
&gt; &gt;<BR>
&gt; &gt; ren2-&gt;SetActiveCamera(ren1-&gt;GetActiveCamera());<BR>
&gt; &gt;<BR>
&gt; &gt; Hope this help<BR>
&gt; &gt;<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luca<BR>
&gt; &gt;<BR>
&gt; &gt; _______________________________________________<BR>
&gt; &gt; This is the private VTK discussion list.<BR>
&gt; &gt; Please keep messages on-topic. Check the FAQ at:<BR>
&gt; <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
&gt; &gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; &gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; --<BR>
&gt; ---------------------------------------------------------------------------<BR>
&gt; Sicilia Ferreira Judice<BR>
&gt; www.lncc.br/~sicilia<BR>
&gt; sicilia@lncc.br<BR>
&gt;<BR>
&gt; Laboratório Nacional de Computação Cientifica<BR>
&gt; Avenida Getulio Vargas, 333 - Quitandinha.<BR>
&gt; Petrópolis, RJ, Brasil - CEP: 25651-075.<BR>
&gt; Sala 1A-44&nbsp; | Tel. +55 (24) 2233-6173<BR>
&gt; Lab. Virtual | Tel. +55 (24) 2233-6098<BR>
&gt; _______________________________________________<BR>
&gt; This is the private VTK discussion list.<BR>
&gt; Please keep messages on-topic. Check the FAQ at:<BR>
&gt; <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt;<BR>
&gt;<BR>
_______________________________________________<BR>
This is the private VTK discussion list.<BR>
Please keep messages on-topic. Check the FAQ at: <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
Follow this link to subscribe/unsubscribe:<BR>
<A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>