[vtkusers] QVTKWidget Camera vs vtkOrientationMarkerWidget
Sankhesh Jhaveri
sankhesh.jhaveri at kitware.com
Wed Dec 28 08:15:53 EST 2016
Hi Luis,
Try setting the interactor from the widget:
myWidget ->SetInteractor(myQVTKWidgetCAmera->GetInteractor());
On Tue, Dec 27, 2016, 5:56 PM Luis Vieira <luis.vieira at vektore.com> wrote:
> Hello vtkusers,
>
>
>
> Anybody knows how to use vtkOrientationMarkerWidget with QVTKWidget
> interactor? I have been trying to implement the VTK example (
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes)
> and it worked smoothly. However, within my QVTKWidget Camera, and I caught
> the following exception:
>
>
>
> ERROR: In C:\VTK\VTK-7.0.0\GUISupport\Qt\QVTKInteractor.cxx, line 147
>
> QVTKInteractor (000000F46583D670): QVTKInteractor cannot control the event
> loop.
>
>
>
> Following my vtkOrientationMarkerWidget snapshot:
>
> vtkRenderWindow* renwin = vtkRenderWindow::New();
>
> myQVTKWidgetCAmera->SetRenderWindow(renwin);
>
> Ren1 = vtkRenderer::New();
>
> myQVTKWidgetCAmera->GetRenderWindow()->AddRenderer(Ren1);
>
>
>
> vtkAxesActor* myAxActor = vtkAxesActor::New();
>
> vtkSmartPointer<vtkOrientationMarkerWidget> myWidget = vtkSmartPointer<
> vtkOrientationMarkerWidget>::New();
>
> myWidget ->SetOrientationMarker(myAxActor);
>
> myWidget ->SetInteractor(myQVTKWidgetCAmera->GetRenderWindow
> ()->GetInteractor());
>
> myWidget ->SetViewport(0.7, 0.0, 1.00, 0.3);
>
> myWidget ->SetEnabled(1);
>
> myWidget ->InteractiveOn();
>
>
>
> Ren1->ResetCamera();
>
> Ren1->Render();
>
>
>
> myQVTKWidgetCAmera->GetRenderWindow()->GetInteractor()->Start();
>
>
>
> Thank you very much for any help,
>
>
>
>
>
> *Luis Vieira*,
>
> Consultant, Software Engineer
>
> Vektore Exploration Consulting Corporation
>
> ca.linkedin.com/in/joaoluisvieira
>
> luis.vieira at vektore.com
>
> www.vektore.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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161228/3914dbb7/attachment.html>
More information about the vtkusers
mailing list