LVRFilteringMLSProjectionDialog.cpp
Go to the documentation of this file.
1 
28 #include <QFileDialog>
30 
31 namespace lvr2
32 {
33 
34 LVRMLSProjectionDialog::LVRMLSProjectionDialog(LVRPointCloudItem* pc, LVRModelItem* parent, QTreeWidget* treeWidget, vtkRenderWindow* window) :
35  m_pc(pc), m_parent(parent), m_treeWidget(treeWidget), m_renderWindow(window)
36 {
37  // Setup DialogUI and events
38  QDialog* dialog = new QDialog(m_treeWidget);
39  m_dialog = new MLSProjectionDialog;
40  m_dialog->setupUi(dialog);
41 
43 
44  dialog->show();
45  dialog->raise();
46  dialog->activateWindow();
47 }
48 
50 {
51  // TODO Auto-generated destructor stub
52 }
53 
55 {
56  QObject::connect(m_dialog->buttonBox, SIGNAL(accepted()), this, SLOT(applyMLSProjection()));
57 }
58 
60 {
61  QDoubleSpinBox* maximumDistance_box = m_dialog->doubleSpinBox_md;
62  float maximumDistance = (float)maximumDistance_box->value();
63 
64  /* PCLFiltering filter(m_pc->getPointBuffer());
65  filter.applyMLSProjection(maximumDistance);
66 
67  PointBufferPtr pb( filter.getPointBuffer() );
68  ModelPtr model( new Model( pb ) );
69 
70  ModelBridgePtr bridge(new LVRModelBridge(model));
71  vtkSmartPointer<vtkRenderer> renderer = m_renderWindow->GetRenderers()->GetFirstRenderer();
72  bridge->addActors(renderer);
73 
74  QString base = m_parent->getName() + " (post-MLS)";
75  m_optimizedPointCloud = new LVRModelItem(bridge, base);
76 
77  m_treeWidget->addTopLevelItem(m_optimizedPointCloud);
78  m_optimizedPointCloud->setExpanded(true); */
79 }
80 
81 } // namespace lvr2
LVRMLSProjectionDialog(LVRPointCloudItem *pc_item, LVRModelItem *parent, QTreeWidget *treeWidget, vtkRenderWindow *renderer)


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08