ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
qM3C2Dialog Class Reference

M3C2 plugin's main dialog. More...

#include <qM3C2Dialog.h>

Inheritance diagram for qM3C2Dialog:
Collaboration diagram for qM3C2Dialog:

Public Types

enum  ExportOptions { PROJECT_ON_CLOUD1 , PROJECT_ON_CLOUD2 , PROJECT_ON_CORE_POINTS }
 Exportation options. More...
 

Public Member Functions

 qM3C2Dialog (ccPointCloud *cloud1, ccPointCloud *cloud2, ecvMainAppInterface *app)
 Default constructor. More...
 
ccPointCloudgetCloud1 () const
 Returns cloud #1. More...
 
ccPointCloudgetCloud2 () const
 Returns cloud #2. More...
 
ccPointCloudgetCorePointsCloud () const
 Get core points cloud (if any) More...
 
void setCorePointsCloud (ccPointCloud *cloud)
 Sets the core points cloud. More...
 
ccPointCloudgetNormalsOrientationCloud () const
 Returns the cloud to be used for normals orientation (if any) More...
 
qM3C2Normals::ComputationMode getNormalsComputationMode () const
 Returns selected normals computation mode. More...
 
unsigned getMinPointsForStats (unsigned defaultValue=5) const
 
ExportOptions getExportOption () const
 Returns selected export option. More...
 
bool keepOriginalCloud () const
 
int getMaxThreadCount () const
 Returns the max number of threads to use. More...
 
bool loadParamsFromFile (QString filename)
 Loads parameters from persistent settings. More...
 
void loadParamsFromPersistentSettings ()
 Loads parameters from persistent settings. More...
 
void saveParamsToPersistentSettings ()
 Saves parameters to persistent settings. More...
 

Protected Slots

void swapClouds ()
 
void setCloud1Visibility (bool)
 
void setCloud2Visibility (bool)
 
void saveParamsToFile ()
 
void loadParamsFromFile ()
 
void guessParamsSlow ()
 
void projDestIndexChanged (int)
 
void onUpdateNormalComboBoxChanged (int)
 
void updateNormalComboBox ()
 Updates the normalSourceComboBox. More...
 

Protected Member Functions

void guessParams (bool fastMode)
 Guess parameters from the cloud #1. More...
 
void setClouds (ccPointCloud *cloud1, ccPointCloud *cloud2)
 Sets clouds. More...
 
void loadParamsFrom (const QSettings &settings)
 Load parameters from QSettings. More...
 
void saveParamsTo (QSettings &settings)
 Saves parameters to QSettings. More...
 
void setupPrecisionMapsTab ()
 Setups the precision maps tab. More...
 

Protected Attributes

ecvMainAppInterfacem_app
 
ccPointCloudm_cloud1
 
ccPointCloudm_cloud2
 
ccPointCloudm_corePointsCloud
 

Detailed Description

M3C2 plugin's main dialog.

Definition at line 22 of file qM3C2Dialog.h.

Member Enumeration Documentation

◆ ExportOptions

Exportation options.

Enumerator
PROJECT_ON_CLOUD1 
PROJECT_ON_CLOUD2 
PROJECT_ON_CORE_POINTS 

Definition at line 57 of file qM3C2Dialog.h.

Constructor & Destructor Documentation

◆ qM3C2Dialog()

Member Function Documentation

◆ getCloud1()

ccPointCloud* qM3C2Dialog::getCloud1 ( ) const
inline

Returns cloud #1.

Definition at line 32 of file qM3C2Dialog.h.

References m_cloud1.

Referenced by qM3C2Process::Compute(), and define_m3c2_plugin().

◆ getCloud2()

ccPointCloud* qM3C2Dialog::getCloud2 ( ) const
inline

Returns cloud #2.

Definition at line 34 of file qM3C2Dialog.h.

References m_cloud2.

Referenced by qM3C2Process::Compute(), and define_m3c2_plugin().

◆ getCorePointsCloud()

ccPointCloud * qM3C2Dialog::getCorePointsCloud ( ) const

Get core points cloud (if any)

Returns either cloud #1 or the cloud specified in the combo box. It can also return a null pointer if the user has requested sub-sampling.

Definition at line 301 of file qM3C2Dialog.cpp.

References ecvMainAppInterface::dbRootObject(), GetCloudFromCombo(), m_app, m_cloud1, and m_corePointsCloud.

Referenced by qM3C2Process::Compute(), and define_m3c2_plugin().

◆ getExportOption()

qM3C2Dialog::ExportOptions qM3C2Dialog::getExportOption ( ) const

Returns selected export option.

Definition at line 370 of file qM3C2Dialog.cpp.

References PROJECT_ON_CLOUD1, PROJECT_ON_CLOUD2, and PROJECT_ON_CORE_POINTS.

Referenced by qM3C2Process::Compute(), define_m3c2_plugin(), and projDestIndexChanged().

◆ getMaxThreadCount()

int qM3C2Dialog::getMaxThreadCount ( ) const

Returns the max number of threads to use.

Definition at line 396 of file qM3C2Dialog.cpp.

Referenced by qM3C2Process::Compute(), and define_m3c2_plugin().

◆ getMinPointsForStats()

unsigned qM3C2Dialog::getMinPointsForStats ( unsigned  defaultValue = 5) const

Returns the minimum number of points to compute stats (confidence mainly)

Definition at line 400 of file qM3C2Dialog.cpp.

References max().

Referenced by qM3C2Process::Compute(), and guessParams().

◆ getNormalsComputationMode()

◆ getNormalsOrientationCloud()

ccPointCloud * qM3C2Dialog::getNormalsOrientationCloud ( ) const

Returns the cloud to be used for normals orientation (if any)

Definition at line 314 of file qM3C2Dialog.cpp.

References ecvMainAppInterface::dbRootObject(), GetCloudFromCombo(), and m_app.

Referenced by qM3C2Process::Compute(), and define_m3c2_plugin().

◆ guessParams()

void qM3C2Dialog::guessParams ( bool  fastMode)
protected

Guess parameters from the cloud #1.

Definition at line 701 of file qM3C2Dialog.cpp.

References getMinPointsForStats(), qM3C2Tools::GuessBestParams(), m_app, m_cloud1, m_cloud2, and params.

Referenced by guessParamsSlow(), and setClouds().

◆ guessParamsSlow

void qM3C2Dialog::guessParamsSlow ( )
inlineprotectedslot

Definition at line 89 of file qM3C2Dialog.h.

References guessParams().

Referenced by qM3C2Dialog().

◆ keepOriginalCloud()

bool qM3C2Dialog::keepOriginalCloud ( ) const

Returns whether the original cloud should be kept instead of creating a new output one Only valid if the export option is PROJECT_ON_CORE_POINTS.

Definition at line 391 of file qM3C2Dialog.cpp.

Referenced by qM3C2Process::Compute(), and define_m3c2_plugin().

◆ loadParamsFrom()

◆ loadParamsFromFile [1/2]

void qM3C2Dialog::loadParamsFromFile ( )
protectedslot

Definition at line 637 of file qM3C2Dialog.cpp.

References ecvFileUtils::defaultDocPath(), and filename.

Referenced by define_m3c2_plugin(), and qM3C2Dialog().

◆ loadParamsFromFile() [2/2]

bool qM3C2Dialog::loadParamsFromFile ( QString  filename)

Loads parameters from persistent settings.

Definition at line 658 of file qM3C2Dialog.cpp.

References filename, and loadParamsFrom().

Referenced by CommandM3C2::process().

◆ loadParamsFromPersistentSettings()

void qM3C2Dialog::loadParamsFromPersistentSettings ( )

Loads parameters from persistent settings.

Definition at line 407 of file qM3C2Dialog.cpp.

References loadParamsFrom().

Referenced by define_m3c2_plugin(), and qM3C2Dialog().

◆ onUpdateNormalComboBoxChanged

void qM3C2Dialog::onUpdateNormalComboBoxChanged ( int  )
protectedslot

◆ projDestIndexChanged

void qM3C2Dialog::projDestIndexChanged ( int  index)
protectedslot

Definition at line 386 of file qM3C2Dialog.cpp.

References getExportOption(), and PROJECT_ON_CORE_POINTS.

Referenced by qM3C2Dialog().

◆ saveParamsTo()

void qM3C2Dialog::saveParamsTo ( QSettings &  settings)
protected

Saves parameters to QSettings.

Definition at line 589 of file qM3C2Dialog.cpp.

References getNormalsComputationMode().

Referenced by saveParamsToFile(), and saveParamsToPersistentSettings().

◆ saveParamsToFile

void qM3C2Dialog::saveParamsToFile ( )
protectedslot

Definition at line 673 of file qM3C2Dialog.cpp.

References ecvFileUtils::defaultDocPath(), filename, and saveParamsTo().

Referenced by qM3C2Dialog().

◆ saveParamsToPersistentSettings()

void qM3C2Dialog::saveParamsToPersistentSettings ( )

Saves parameters to persistent settings.

Definition at line 584 of file qM3C2Dialog.cpp.

References saveParamsTo().

Referenced by define_m3c2_plugin().

◆ setCloud1Visibility

void qM3C2Dialog::setCloud1Visibility ( bool  state)
protectedslot

◆ setCloud2Visibility

void qM3C2Dialog::setCloud2Visibility ( bool  state)
protectedslot

◆ setClouds()

void qM3C2Dialog::setClouds ( ccPointCloud cloud1,
ccPointCloud cloud2 
)
protected

◆ setCorePointsCloud()

void qM3C2Dialog::setCorePointsCloud ( ccPointCloud cloud)
inline

Sets the core points cloud.

Definition at line 44 of file qM3C2Dialog.h.

References m_corePointsCloud.

Referenced by define_m3c2_plugin(), and CommandM3C2::process().

◆ setupPrecisionMapsTab()

void qM3C2Dialog::setupPrecisionMapsTab ( )
protected

Setups the precision maps tab.

Warning
'setClouds' must have been already called

Definition at line 184 of file qM3C2Dialog.cpp.

References ccPointCloud::hasScalarFields(), m_cloud1, m_cloud2, and PopulatePMFields().

Referenced by setClouds().

◆ swapClouds

void qM3C2Dialog::swapClouds ( )
protectedslot

Definition at line 203 of file qM3C2Dialog.cpp.

References m_cloud1, m_cloud2, setClouds(), and updateNormalComboBox().

Referenced by qM3C2Dialog().

◆ updateNormalComboBox

void qM3C2Dialog::updateNormalComboBox ( )
protectedslot

Member Data Documentation

◆ m_app

◆ m_cloud1

◆ m_cloud2

ccPointCloud* qM3C2Dialog::m_cloud2
protected

◆ m_corePointsCloud

ccPointCloud* qM3C2Dialog::m_corePointsCloud
protected

Definition at line 118 of file qM3C2Dialog.h.

Referenced by getCorePointsCloud(), and setCorePointsCloud().


The documentation for this class was generated from the following files: