[vtkusers] Multiple renderes and interactor callback

sfaisalali91 sfaisal.ali91 at gmail.com
Wed Aug 27 02:32:11 EDT 2014


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.


More information about the vtkusers mailing list