Debian Codegraph @

plugins/core/Standard/qFacets/include/cellsFusionDlg.h

raw
1 //##########################################################################
2 //# #
3 //# CLOUDCOMPARE PLUGIN: qFacets #
4 //# #
5 //# This program is free software; you can redistribute it and/or modify #
6 //# it under the terms of the GNU General Public License as published by #
7 //# the Free Software Foundation; version 2 or later of the License. #
8 //# #
9 //# This program is distributed in the hope that it will be useful, #
10 //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12 //# GNU General Public License for more details. #
13 //# #
14 //# COPYRIGHT: Thomas Dewez, BRGM #
15 //# #
16 //##########################################################################
17
18 #ifndef QFACET_CELLS_FUSION_DLG_HEADER
19 #define QFACET_CELLS_FUSION_DLG_HEADER
20
21 #include "ui_cellsFusionDlg.h"
22
23 //! Dialog for the extraction of facets based on a cell-fusion strategy (qFacets plugin)
24 class CellsFusionDlg : public QDialog, public Ui::CellsFusionDlg
25 {
26 public:
27
28 //! Cell fusion algorithm
29 enum Algorithm { ALGO_KD_TREE, ALGO_FAST_MARCHING };
30
31 //! Default constructor
32 CellsFusionDlg(Algorithm algo, QWidget* parent = nullptr)
33 : QDialog(parent, Qt::Tool)
34 , Ui::CellsFusionDlg()
35 {
36 setupUi(this);
37
38 switch(algo)
39 {
40 case ALGO_KD_TREE:
41 algoComboBox->setCurrentIndex(0);
42 octreeLevelSpinBox->setEnabled(false);
43 kdTreeCellFusionGroupBox->setVisible(true);
44 fmCellFusionGroupBox->setVisible(false);
45 break;
46 case ALGO_FAST_MARCHING:
47 algoComboBox->setCurrentIndex(1);
48 octreeLevelSpinBox->setEnabled(true);
49 kdTreeCellFusionGroupBox->setVisible(false);
50 fmCellFusionGroupBox->setVisible(true);
51 break;
52 }
53 }
54 };
55
56 #endif //QFACET_CELLS_FUSION_DLG_HEADER