[vtkusers] QVTKWidget, pclVisulaizer,VTK
Tamim
tamim.boubou at gmail.com
Sun Jan 28 04:03:58 EST 2018
Hello all ,
I've been trying to add pclVisulizer to QVTKWidget
and to that window I want to add and interact with a vtkboxWidget2
the code is something like this but it's crashing....any ideas ?
pclVisualizer(new pcl::visualization::PCLVisualizer("PCL Visualizer"))
qvtkWidget_pclViewer = new QVTKWidget;
ui->splitterVertical->addWidget(qvtkWidget_pclViewer);
qvtkWidget_pclViewer->SetRenderWindow(pclVisualizer->getRenderWindow());
pclVisualizer->getRenderWindow()->AddRenderer(m_renderer_p);
m_interactor_p = pclVisualizer->getRenderWindow()->GetInteractor();
m_interactor_p->SetRenderWindow(m_renderwindow_p);
double bounds_a[6]={0,4,0,4,0,4};
vtkSmartPointer<vtkBoxWidget2> boxWidget =
vtkSmartPointer<vtkBoxWidget2>::New();
boxWidget->SetInteractor(m_interactor_p);
boxWidget->GetRepresentation()->SetPlaceFactor(1.25);
boxWidget->GetRepresentation()->PlaceWidget(bounds_a);
m_renderer_p->Render();
qvtkwidget_pclViewer->Update();
any help would be great
Thanks.
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list