ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvSubsamplingDlg.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 // Qt
11 #include <QDialog>
12 
13 // CV_CORE_LIB
15 #include <ReferenceCloud.h>
16 
17 // GUI
18 #include <ui_subsamplingDlg.h>
19 
21 
23 class ccSubsamplingDlg : public QDialog, public Ui::SubsamplingDialog {
24  Q_OBJECT
25 
26 public:
29  RANDOM = 0,
30  SPACE = 1,
31  OCTREE = 2,
32  };
33 
35  ccSubsamplingDlg(unsigned maxPointCount,
36  double maxCloudRadius,
37  QWidget* parent = 0);
38 
40 
43  ccGenericPointCloud* cloud,
44  cloudViewer::GenericProgressCallback* progressCb = 0);
45 
47  void enableSFModulation(ScalarType sfMin, ScalarType sfMax);
48 
49 protected slots:
50 
51  void sliderMoved(int sliderPos);
52  void samplingRateChanged(double value);
53  void changeSamplingMethod(int index);
54 
55 protected: // methods
57  void updateLabels();
58 
59 protected: // members
61  unsigned m_maxPointCount;
62 
64  double m_maxRadius;
65 
69  ScalarType m_sfMin;
71  ScalarType m_sfMax;
72 };
#define slots
A 3D cloud interface with associated features (color, normals, octree, etc.)
Subsampling cloud dialog.
ccSubsamplingDlg(unsigned maxPointCount, double maxCloudRadius, QWidget *parent=0)
Default constructor.
cloudViewer::ReferenceCloud * getSampledCloud(ccGenericPointCloud *cloud, cloudViewer::GenericProgressCallback *progressCb=0)
Returns subsampled version of a cloud according to current parameters.
CC_SUBSAMPLING_METHOD
Sub-sampling method.
void enableSFModulation(ScalarType sfMin, ScalarType sfMax)
Enables the SF modulation option (SPATIAL method)
ScalarType m_sfMax
Scalar modulation (max SF value)
void updateLabels()
Updates the dialog labels depending on the active mode.
ScalarType m_sfMin
Scalar modulation (min SF value)
void samplingRateChanged(double value)
void changeSamplingMethod(int index)
void sliderMoved(int sliderPos)
bool m_sfModEnabled
Scalar modulation.
unsigned m_maxPointCount
Max point count (for RANDOM method)
double m_maxRadius
Max radius (for SPACE method)
A very simple point cloud (no point duplication)