ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvNormalComputationDlg.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 #include <ui_normalComputationDlg.h>
11 
12 // CV_DB_LIB
13 #include <ecvNormalVectors.h>
14 
15 class ccPointCloud;
16 
18 class ccNormalComputationDlg : public QDialog, public Ui::NormalComputationDlg {
19  Q_OBJECT
20 
21 public:
23 
28  explicit ccNormalComputationDlg(bool withScanGrid,
29  bool withSensor,
30  QWidget* parent = nullptr);
31 
34 
37 
39  void setRadius(PointCoordinateType radius);
40 
43 
45  void setCloud(ccPointCloud* cloud);
46 
48  bool useScanGridsForComputation() const;
49 
51  double getMinGridAngle_deg() const;
52 
54  void setMinGridAngle_deg(double value);
55 
58 
60  bool orientNormals() const;
61 
63  bool useScanGridsForOrientation() const;
64 
66  bool useSensorsForOrientation() const;
67 
69  bool usePreferredOrientation() const;
70 
73 
76  bool useMSTOrientation() const;
77 
79  int getMSTNeighborCount() const;
80 
82  void setMSTNeighborCount(int n);
83 
84 protected slots:
85 
87  void localModelChanged(int index);
88 
90  void autoEstimateRadius();
91 
92 protected:
95 };
CV_LOCAL_MODEL_TYPES
Definition: CVConst.h:121
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
#define slots
Dialog for normal computation.
bool useScanGridsForComputation() const
Returns whether scan grids should be used for computation.
ccNormalComputationDlg(bool withScanGrid, bool withSensor, QWidget *parent=nullptr)
Default constructor.
bool usePreferredOrientation() const
Returns whether a preferred orientation should be used.
int getMSTNeighborCount() const
Returns the number of neighbors for Minimum Spanning Tree (MST)
bool orientNormals() const
Returns whether normals should be oriented or not.
void setMSTNeighborCount(int n)
Sets the number of neighbors for Minimum Spanning Tree (MST)
ccNormalVectors::Orientation getPreferredOrientation() const
Returns the preferred orientation (if any)
double getMinGridAngle_deg() const
Returns the min angle for grid triangles.
bool useScanGridsForOrientation() const
Returns whether scan grids should be used for normals orientation.
void setMinGridAngle_deg(double value)
Sets the min angle for grid triangles.
CV_LOCAL_MODEL_TYPES getLocalModel() const
Returns the local model chosen for normal computation.
void setCloud(ccPointCloud *cloud)
Sets the currently selected cloud (required for 'auto' feature)
bool useSensorsForOrientation() const
Returns whether scan grids should be used for normals computation.
void setRadius(PointCoordinateType radius)
Sets default value for local neighbourhood radius.
void autoEstimateRadius()
Automatically estimate the local surface radius.
void setPreferredOrientation(ccNormalVectors::Orientation orientation)
Sets the preferred orientation.
ccPointCloud * m_cloud
Selected cloud.
void localModelChanged(int index)
On local model change.
void setLocalModel(CV_LOCAL_MODEL_TYPES model)
Sets the local model chosen for normal computation.
PointCoordinateType getRadius() const
Returns local neighbourhood radius.
Orientation
'Default' orientations
A 3D cloud and its associated features (color, normals, scalar fields, etc.)