LVRFilteringRemoveOutliersDialog.cpp
Go to the documentation of this file.
1 
28 #include <QFileDialog>
30 
31 namespace lvr2
32 {
33 
34 LVRRemoveOutliersDialog::LVRRemoveOutliersDialog(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 RemoveOutliersDialog;
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(removeOutliers()));
57 }
58 
60 {
61  QDoubleSpinBox* standardDeviation_box = m_dialog->doubleSpinBox_st;
62  float standardDeviation = (float)standardDeviation_box->value();
63  QDoubleSpinBox* meanK_box = m_dialog->doubleSpinBox_st;
64  float meanK = (float)meanK_box->value();
65  /*
66  PCLFiltering filter(m_pc->getPointBuffer());
67  filter.applyOutlierRemoval(meanK, standardDeviation);
68 
69  PointBufferPtr pb( filter.getPointBuffer() );
70  ModelPtr model( new Model( pb ) );
71 
72  ModelBridgePtr bridge(new LVRModelBridge(model));
73  vtkSmartPointer<vtkRenderer> renderer = m_renderWindow->GetRenderers()->GetFirstRenderer();
74  bridge->addActors(renderer);
75 
76  QString base = m_parent->getName() + " (rem. outliers)";
77  m_optimizedPointCloud = new LVRModelItem(bridge, base);
78 
79  m_treeWidget->addTopLevelItem(m_optimizedPointCloud);
80  m_optimizedPointCloud->setExpanded(true); */
81 }
82 
83 } // namespace lvr2
LVRRemoveOutliersDialog(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