[vtkusers] How to set zoom functionality in vtkChartXY / vtkContextView?

da remywendy at gmail.com
Thu Apr 22 13:10:06 EDT 2010


I'm having trouble setting up a zoom functionality into my vtkContextView.
Currently, I create vtkContextView, and put its vtkRenderWindow into a
QVTKWidget so it shows up on my GUI.

I've tried using a vtkInteractorStyleImage as vtkContextView's interactor
style, with no success.

contextView->GetScene()->SetInteractorStyle(
vtkSmartPointer<vtkInteractorStyleImage>::New());

vtkSmartPointer<QVTKInteractor> renderWindowInteractor =
vtkSmartPointer<QVTKInteractor>::New();
renderWindowInteractor->SetRenderWindow(contextView->GetRenderWindow());
renderWindowInteractor->Initialize();
renderWindowInteractor->SetInteractorStyle(vtkSmartPointer<vtkInteractorStyleImage>::New());


 Is there a proper way to set up zoom / pan functionality in these
vtkContextViews?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100422/f43eb5a9/attachment.htm>


More information about the vtkusers mailing list