[vtkusers] QVTKWidget Camera vs vtkOrientationMarkerWidget

Luis Vieira luis.vieira at vektore.com
Tue Dec 27 17:48:31 EST 2016


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/DisplayCoordinateAxe
s) 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

 <mailto:luis.vieira at vektore.com> luis.vieira at vektore.com

 <http://www.vektore.com/> www.vektore.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161227/a3916732/attachment.html>


More information about the vtkusers mailing list