[vtkusers] vtkBoxWidget for point cloud volume selection
Anna1994
sweet.factory_92 at hotmail.com
Tue Feb 12 05:30:33 EST 2019
I have just started using VTK and there are still few things that I don't
get. So far I have designed a software using QT+PCL+ VTK to import point
cloud then I use VTK rubberband to select an area via
AreaPickingEventOccurred function and crop that area out. I would like to
use vtkBoxWidget2 instead of the rubberband so I can select certain area in
the point cloud and crop out the points inside the box. There are few things
that I saw in vtkBoxWidget2 that I am not sure if they are requirements or
just for the example itself :
1- Renderer: So far I have a visualizer as follow
setupUi(this);
this->setWindowTitle("Vector Mapper");
viewer.reset (new pcl::visualization::PCLVisualizer ("viewer", false));
ui->qvtkWidget->SetRenderWindow (viewer->getRenderWindow ());
viewer->setupInteractor (ui->qvtkWidget->GetInteractor (),
ui->qvtkWidget->GetRenderWindow ());
connect(ui->checkBoxCoordinate, SIGNAL(stateChanged(int)), this,
SLOT(checkBoxCoordinateState(int)));
connect(ui->checkBoxPCD, SIGNAL(stateChanged(int)), this,
SLOT(checkBoxPCDState(int)));
//Register
viewer->registerKeyboardCallback (&vectorMapping::keyboardCallback,
*this);
viewer->registerMouseCallback (&vectorMapping::mouseCallback, *this);
viewer->registerAreaPickingCallback(&vectorMapping::AreaPickingEventOccurred,
*this);
if I have a visualizer to view the point cloud do I need a rendered to draw
the box? as I have tried to implement a renderer as well but when I import
the point cloud it doesn't show in the visualizer
2- Actor and Mapper: are these required for point clouds or are they just
there for rendered shapes?
Any help is very much appreciated
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list