ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccRansacSDDlg.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "ccRansacSDDlg.h"
9 
10 #include <ecvOctree.h>
11 
12 static int s_minSupport =
13  500; // this is the minimal numer of points required for a primitive
14 static double s_maxNormalDev_deg =
15  25.0; // maximal normal deviation from ideal shape (in degrees)
16 static double s_probability = 0.01; // probability that no better candidate was
17  // overlooked during sampling
18 
20  : QDialog(parent, Qt::Tool), Ui::RansacSDDialog() {
21  setupUi(this);
22 
23  connect(buttonBox, &QDialogButtonBox::accepted, this,
25 
26  supportPointsSpinBox->setValue(s_minSupport);
27  maxNormDevAngleSpinBox->setValue(s_maxNormalDev_deg);
28  probaDoubleSpinBox->setValue(s_probability);
29 }
30 
32  s_minSupport = supportPointsSpinBox->value();
33  s_maxNormalDev_deg = maxNormDevAngleSpinBox->value();
34  s_probability = probaDoubleSpinBox->value();
35 }
static int s_minSupport
static double s_maxNormalDev_deg
static double s_probability
void saveSettings()
Saves (temporarily) the dialog parameters on acceptation.
ccRansacSDDlg(QWidget *parent=0)
Default constructor.