[vtkusers] same camera on different viewpoints

Sicilia Judice siciliajudice at gmail.com
Wed Jan 9 14:22:19 EST 2008


Hi, Chuck...

I am new in VTK... There is a way to use especific methods to Crystal Eyes
in VTK? My goal is to make stereo images for Crystal Eyes. So, I display the
same actor in two differents viewports, where each one has it owns camera...
One camera I have to use the method Azimuth(5) to set the difference of the
distance of the eyes... So, when I move the actor in one viewport, the other
do not move together... I have to make this work! There is methods to
Crystal Eyes already implemented???


On 1/9/08, Chuck Anderson <cda10 at psu.edu> wrote:
>
> I just saw this thread and can not find the beginning...but is there some
> special reason that you can not use the Crystal eyes stereo capability built
> into RenderWindow?
>
> Chuck
>


On 1/9/08, Luca Pallozzi Lavorante <lplavorante at gmail.com> wrote:
>
> Hi Mark,
> I have used the "ren2->SetActiveCamera(ren1->GetActiveCamera())" approach
> only on small test programs and I have got no crashes. On production
> applications the pair vtkOrientationMarkerWidget / vtkAxesActor was
> sufficient to me as I only needed a smaller viewport showing axes "perfectly
> alligned" with the object shown in the main viewport.
>
> It would be interesting to know if anybody on the list has had crash
> problems by sharing camera pointers among renderers.
>
>     Luca
>
>
> On Jan 9, 2008 4:09 PM, Mark Wyszomierski < markww at gmail.com> wrote:
>
> > Luca, I had tried that myself at one point:
> >
> >     ren2->SetActiveCamera(ren1->GetActiveCamera());
> >
> > but would get random crashes, has it been ok for you? I eventually had
> > to manually copy over camera parameters between the two cameras
> > instead to get the same effect.
> >
> > I think what Sicilia wants is to have the same interaction propagated
> > to all renderers (since the cameras may be setup in different
> > locations). This probably isn't a typical thing to do, normally you
> > want the camera location copied throughout all renderers instead. I
> > was looking into this but couldn't figure out myself how to Invoke()
> > the same interaction on another renderer. We can listen on Interaction
> > events on the render window's interactor, but not quite sure how to
> > propagate it to the other renderers.
> >
> > Mark
> >
> >
> > On Jan 9, 2008 8:52 AM, Sicilia Judice <siciliajudice at gmail.com > wrote:
> > > I think I am very near to finish this...
> > >
> > > Let me try to explain... I have to generate stereo images to use with
> > > Crystal Eyes... So, I have create two viewports, displayed vertically,
> > one
> > > over other... The upper viewport is the stereo image for one eye, and
> > the
> > > second one for the other eye. I have to put one of this images with a
> > > difference of 5° (the paralaxe). I was creating two cameras, each one
> > for
> > > one viewport. In the second camera I was using the method Azimuth(5).
> > But in
> > > this way, I was having to take care of the interaction, what I could
> > not
> > > done... Now I have try a different solution: I create only one camera
> > and
> > > set to both viewports. Now, any action with the mouse move the two
> > images
> > > together... But I have to translate the second image in 5°, and I do
> > not
> > > know how to do it... How can I translate an imagem in a viewport???
> > >
> > > ps.: sorry for the english, I am from Brazil!
> > >
> > > ps2.: thanks for the attention!!!
> > >
> > >
> > >
> > > On Jan 9, 2008 11:42 AM, Luca Pallozzi Lavorante <lplavorante at gmail.com>
> > > wrote:
> > > >
> > > >
> > > >
> > > > Sicilia,
> > > > if you work in C++, let's say you have two viewports, with two
> > > corresponding instances of vtkRenderer, ren1 and ren2. Say that you
> > want to
> > > modify ren2´s camera according to whatever interaction you perform on
> > ren1
> > > (via a vtkRenderWindowInteractor). The command to accomplish that is :
> > > >
> > > > ren2->SetActiveCamera(ren1->GetActiveCamera());
> > > >
> > > > Hope this help
> > > >
> > > >       Luca
> > > >
> > > > _______________________________________________
> > > > This is the private VTK discussion list.
> > > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQ
> > > > Follow this link to subscribe/unsubscribe:
> > > > http://www.vtk.org/mailman/listinfo/vtkusers
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > ---------------------------------------------------------------------------
> > > Sicilia Ferreira Judice
> > > www.lncc.br/~sicilia <http://www.lncc.br/%7Esicilia>
> > > sicilia at lncc.br
> > >
> > > Laboratório Nacional de Computação Cientifica
> > > Avenida Getulio Vargas, 333 - Quitandinha.
> > > Petrópolis, RJ, Brasil - CEP: 25651-075.
> > > Sala 1A-44  | Tel. +55 (24) 2233-6173
> > > Lab. Virtual | Tel. +55 (24) 2233-6098
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQ
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >
> > >
> >
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
---------------------------------------------------------------------------
Sicilia Ferreira Judice
www.lncc.br/~sicilia
sicilia at lncc.br

Laboratório Nacional de Computação Cientifica
Avenida Getulio Vargas, 333 - Quitandinha.
Petrópolis, RJ, Brasil - CEP: 25651-075.
Sala 1A-44  | Tel. +55 (24) 2233-6173
Lab. Virtual | Tel. +55 (24) 2233-6098
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080109/570f63a0/attachment.htm>


More information about the vtkusers mailing list