[vtkusers] Multiple renderes and interactor callback
David Gobbi
david.gobbi at gmail.com
Wed Aug 27 08:04:35 EDT 2014
Hi Ali,
Usually ResetCamera() is only called on the first render,
it should not be called every time the user clicks the mouse.
- David
On Wed, Aug 27, 2014 at 12:32 AM, sfaisalali91 <sfaisal.ali91 at gmail.com> wrote:
> Hello David, Thanks for your reply.
>
> As you suggested i tried assigning separate cameras for the MPR and Volume
> view (One camera for the MPR slicing and another for Volume rendering). I
> succeeded in resetting the volume view but when i try rendering it, the
> volume renders outside the viewport. So i made use of getbounds()
> functionality and tried assigning the camera and related parameters (as you
> suggested) inside the respective Volume viewport bounds. Sadly i was not
> able to achieve the desired. As my viewer is based on MFC, it either crashes
> or hangs.
> Am i missing anything here?
>
> And as i am trying all the possible alternatives, lately i was working on
> the mouse events and i was trying to get a solution for it. I am making use
> of MouseMoveEvent in my call back and accordingly setting the camera of the
> Volumetric viewport, so based on this i tried implementing Rotate()
> functionality
>
> if ( pokedRenderer == ImageRenderer)
> {
> ImageIren->Rotate();
> iren->Render();
>
> }
>
> The volume and MPR slices render simultaneously as expected. But when i try
> the same with LeftButtonPressEvent (as shown in the snippet below) it fails
> and there is no interaction with the volume. please can you guide me. Thank
> you.
>
> if ( pokedRenderer == ImageRenderer)
> {
> if (event == vtkCommand::LeftButtonPressEvent)
> {
> iren->SetInteractorStyle(ImageIren);
> ImageRenderer->ResetCamera();
> ImageIren->Rotate();
> iren->Render();
> }
>
> }
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Multiple-renderes-and-interactor-callback-tp5728393p5728440.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://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list