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 };
ccGenericPointCloud::computeOctree
virtual ccOctree::Shared computeOctree(cloudViewer::GenericProgressCallback *progressCb=nullptr, bool autoAddChild=true)
Computes the cloud octree.
Definition: ecvGenericPointCloud.cpp:124
TRI
@ TRI
Definition: CVConst.h:124
ccNormalComputationDlg::useSensorsForOrientation
bool useSensorsForOrientation() const
Returns whether scan grids should be used for normals computation.
Definition: ecvNormalComputationDlg.cpp:144
ccNormalVectors::UNDEFINED
@ UNDEFINED
Undefined (no orientation is required)
Definition: ecvNormalVectors.h:89
CV_LOCAL_MODEL_TYPES
CV_LOCAL_MODEL_TYPES
Definition: CVConst.h:121
ccNormalComputationDlg::getMinGridAngle_deg
double getMinGridAngle_deg() const
Returns the min angle for grid triangles.
Definition: ecvNormalComputationDlg.cpp:128
ccNormalComputationDlg::getLocalModel
CV_LOCAL_MODEL_TYPES getLocalModel() const
Returns the local model chosen for normal computation.
Definition: ecvNormalComputationDlg.cpp:79
ccNormalComputationDlg::setPreferredOrientation
void setPreferredOrientation(ccNormalVectors::Orientation orientation)
Sets the preferred orientation.
Definition: ecvNormalComputationDlg.cpp:114
ccNormalComputationDlg::useMSTOrientation
bool useMSTOrientation() const
Definition: ecvNormalComputationDlg.cpp:152
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
ecvNormalVectors.h
ccNormalComputationDlg::orientNormals
bool orientNormals() const
Returns whether normals should be oriented or not.
Definition: ecvNormalComputationDlg.cpp:136
ccNormalVectors::GuessBestRadius
static PointCoordinateType GuessBestRadius(ccGenericPointCloud *cloud, cloudViewer::DgmOctree *cloudOctree=nullptr, cloudViewer::GenericProgressCallback *progressCb=nullptr)
Definition: ecvNormalVectors.cpp:236
ccNormalComputationDlg::localModelChanged
void localModelChanged(int index)
On local model change.
Definition: ecvNormalComputationDlg.cpp:93
ccNormalComputationDlg::m_cloud
ccPointCloud * m_cloud
Selected cloud.
Definition: ecvNormalComputationDlg.h:94
ccGenericPointCloud::getOctree
virtual ccOctree::Shared getOctree() const
Returns the associated octree (if any)
Definition: ecvGenericPointCloud.cpp:97
ecvNormalComputationDlg.h
CVLog::Error
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
ccNormalComputationDlg
Dialog for normal computation.
Definition: ecvNormalComputationDlg.h:18
slots
#define slots
Definition: PythonPlugin.cpp:25
ccNormalComputationDlg::getPreferredOrientation
ccNormalVectors::Orientation getPreferredOrientation() const
Returns the preferred orientation (if any)
Definition: ecvNormalComputationDlg.cpp:164
ccNormalComputationDlg::getRadius
PointCoordinateType getRadius() const
Returns local neighbourhood radius.
Definition: ecvNormalComputationDlg.cpp:110
ccNormalComputationDlg::usePreferredOrientation
bool usePreferredOrientation() const
Returns whether a preferred orientation should be used.
Definition: ecvNormalComputationDlg.cpp:148
QUADRIC
@ QUADRIC
Definition: CVConst.h:125
Ui
Definition: sfEditDlg.h:16
ccNormalVectors::PREVIOUS
@ PREVIOUS
Re-use previous normal (if any)
Definition: ecvNormalVectors.h:82
ecvProgressDialog
Graphical progress indicator (thread-safe)
Definition: ecvProgressDialog.h:27
ccNormalComputationDlg::useScanGridsForOrientation
bool useScanGridsForOrientation() const
Returns whether scan grids should be used for normals orientation.
Definition: ecvNormalComputationDlg.cpp:140
ecvProgressDialog.h
ccNormalComputationDlg::setCloud
void setCloud(ccPointCloud *cloud)
Sets the currently selected cloud (required for 'auto' feature)
Definition: ecvNormalComputationDlg.cpp:104
ccNormalComputationDlg::useScanGridsForComputation
bool useScanGridsForComputation() const
Returns whether scan grids should be used for computation.
Definition: ecvNormalComputationDlg.cpp:124
ccDrawableObject::setVisible
virtual void setVisible(bool state)
Sets entity visibility.
Definition: ecvDrawableObject.h:40
ccNormalVectors::Orientation
Orientation
'Default' orientations
Definition: ecvNormalVectors.h:70
ccNormalComputationDlg::setRadius
void setRadius(PointCoordinateType radius)
Sets default value for local neighbourhood radius.
Definition: ecvNormalComputationDlg.cpp:100
ccNormalComputationDlg::ccNormalComputationDlg
ccNormalComputationDlg(bool withScanGrid, bool withSensor, QWidget *parent=nullptr)
Default constructor.
Definition: ecvNormalComputationDlg.cpp:21
ccObject::getName
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
ccNormalComputationDlg::autoEstimateRadius
void autoEstimateRadius()
Automatically estimate the local surface radius.
Definition: ecvNormalComputationDlg.cpp:175
ccNormalComputationDlg::setMinGridAngle_deg
void setMinGridAngle_deg(double value)
Sets the min angle for grid triangles.
Definition: ecvNormalComputationDlg.cpp:132
ccNormalComputationDlg::getMSTNeighborCount
int getMSTNeighborCount() const
Returns the number of neighbors for Minimum Spanning Tree (MST)
Definition: ecvNormalComputationDlg.cpp:160
LS
@ LS
Definition: CVConst.h:123
ccNormalComputationDlg::setMSTNeighborCount
void setMSTNeighborCount(int n)
Sets the number of neighbors for Minimum Spanning Tree (MST)
Definition: ecvNormalComputationDlg.cpp:156
PointCoordinateType
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
ccNormalComputationDlg::setLocalModel
void setLocalModel(CV_LOCAL_MODEL_TYPES model)
Sets the local model chosen for normal computation.
Definition: ecvNormalComputationDlg.cpp:60
ecvOctree.h
ecvPointCloud.h