| 1 |
//########################################################################## |
| 2 |
//# # |
| 3 |
//# CLOUDCOMPARE PLUGIN: qCANUPO # |
| 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: UEB (UNIVERSITE EUROPEENNE DE BRETAGNE) / CNRS # |
| 15 |
//# # |
| 16 |
//########################################################################## |
| 17 |
|
| 18 |
#ifndef Q_CANUPO_CLASSIF_DIALOG_HEADER |
| 19 |
#define Q_CANUPO_CLASSIF_DIALOG_HEADER |
| 20 |
|
| 21 |
#include <ui_qCanupoClassifDialog.h> |
| 22 |
|
| 23 |
class ccMainAppInterface; |
| 24 |
class ccPointCloud; |
| 25 |
|
| 26 |
//! CANUPO plugin's classification dialog |
| 27 |
class qCanupoClassifDialog : public QDialog, public Ui::CanupoClassifDialog |
| 28 |
{ |
| 29 |
Q_OBJECT |
| 30 |
|
| 31 |
public: |
| 32 |
|
| 33 |
//! Default constructor |
| 34 |
qCanupoClassifDialog(ccPointCloud* cloud, ccMainAppInterface* app); |
| 35 |
|
| 36 |
//! "Sources" of core points |
| 37 |
enum CORE_CLOUD_SOURCES |
| 38 |
{ |
| 39 |
ORIGINAL, |
| 40 |
OTHER, |
| 41 |
SUBSAMPLED, |
| 42 |
MSC_FILE |
| 43 |
}; |
| 44 |
|
| 45 |
//! Returns the selected source for core points |
| 46 |
CORE_CLOUD_SOURCES getCorePointsCloudSource() const; |
| 47 |
|
| 48 |
//! Get core points cloud (if any) |
| 49 |
/** Returns either the input cloud (ORIGINAL) or the other cloud |
| 50 |
specified in the dedicated combo box (OTHER). |
| 51 |
It can also return a null pointer if the user has requested |
| 52 |
sub-sampling (SUBSAMPLED) or MSC file (MSC_FILE). |
| 53 |
**/ |
| 54 |
ccPointCloud* getCorePointsCloud(); |
| 55 |
|
| 56 |
//! Returns MSC file name (if source == MSC_FILE) |
| 57 |
QString getMscFilename() const; |
| 58 |
|
| 59 |
//! Returns the confidence threshold |
| 60 |
double getConfidenceTrehshold() const; |
| 61 |
//! Returns whether a SF should be used to classify points with low confidence |
| 62 |
bool useSF() const; |
| 63 |
//! Returns the max number of threads to use |
| 64 |
int getMaxThreadCount() const; |
| 65 |
|
| 66 |
//! Loads parameters from persistent settings |
| 67 |
void loadParamsFromPersistentSettings(); |
| 68 |
//! Saves parameters to persistent settings |
| 69 |
void saveParamsToPersistentSettings(); |
| 70 |
|
| 71 |
protected: |
| 72 |
|
| 73 |
void browseClassifierFile(); |
| 74 |
void browseMscFile(); |
| 75 |
|
| 76 |
protected: |
| 77 |
|
| 78 |
//! Gives access to the application (data-base, UI, etc.) |
| 79 |
ccMainAppInterface* m_app; |
| 80 |
|
| 81 |
//! Associated cloud |
| 82 |
ccPointCloud* m_cloud; |
| 83 |
}; |
| 84 |
|
| 85 |
#endif //Q_CANUPO_CLASSIF_DIALOG_HEADER |