ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvGeomFeaturesDlg.h
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 #pragma once
9 
10 // Local
11 #include "ecvLibAlgorithms.h"
12 
13 // Qt
14 #include <ui_geomFeaturesDlg.h>
15 
16 #include <QDialog>
17 
19 class ccGeomFeaturesDlg : public QDialog, public Ui::GeomFeaturesDialog {
20 public:
22  explicit ccGeomFeaturesDlg(QWidget* parent = nullptr);
23 
31  void setRadius(double r);
33  double getRadius() const;
34 
36  void setUpDirection(const CCVector3& upDir);
38  CCVector3* getUpDirection() const;
39 
41  void reset();
42 
43 protected:
45  Option(QCheckBox* cb,
47  int option = 0)
48  : ccLibAlgorithms::GeomCharacteristic(c, option), checkBox(cb) {}
49 
50  QCheckBox* checkBox = nullptr;
51  };
52 
53  std::vector<Option> m_options;
54 };
Dialog for computing the density of a point clouds.
CCVector3 * getUpDirection() const
Returns the 'up direction' if any is defined (nullptr otherwise)
void setUpDirection(const CCVector3 &upDir)
Sets the 'up direction' (and enables the group at the same time)
bool getSelectedFeatures(ccLibAlgorithms::GeomCharacteristicSet &features) const
Returns selected features.
void reset()
reset the whole dialog
void setSelectedFeatures(const ccLibAlgorithms::GeomCharacteristicSet &features)
Sets selected features.
double getRadius() const
Returns the kernel radius (for 'precise' mode only)
ccGeomFeaturesDlg(QWidget *parent=nullptr)
Default constructor.
std::vector< Option > m_options
void setRadius(double r)
Sets the default kernel radius (for 'precise' mode only)
std::vector< GeomCharacteristic > GeomCharacteristicSet
Set of GeomCharacteristic instances.
Option(QCheckBox *cb, cloudViewer::GeometricalAnalysisTools::GeomCharacteristic c, int option=0)
Geometric characteristic (with sub option)
GeomCharacteristic(cloudViewer::GeometricalAnalysisTools::GeomCharacteristic c, int option=0)