[vtkusers] switch interactor style

Mark Wyszomierski markww at gmail.com
Wed Aug 17 12:24:37 EDT 2005


Hi everyone,

I have a render window that has a vtkImageActor that displays an image
on it. The interactor style is set to vtkInteractorStyleImage.

I added an observer for right mouse clicks to pull up a menu, one of
the items is '3d render'.

At this point if 3d render is chosen, I call the following to display
a volume instead of the image actor:

// create volume stuff...
// ...

// Setup the scene for volume rendering
this->Renderer->GetActiveCamera()->ParallelProjectionOff();
this->Renderer->RemoveActor(this->ImageActor);
this->Interactor->SetInteractorStyle(this->InteractorStyleFlight);

// Display volume
// ...

so the volume renders in my window but then if I try interacting with
it my app locks up stuck someplace in interactor land. Is there
anything else I have to do to swap between the interactor styles? I
also had some observers bound on my interactor class, but it shouldn't
be affected by switching to a different style.

Thanks,
Mark



More information about the vtkusers mailing list