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

Dialog for cloud/cloud or cloud/mesh comparison setting. More...

#include <ecvComparisonDlg.h>

Inheritance diagram for ccComparisonDlg:
Collaboration diagram for ccComparisonDlg:

Public Types

enum  CC_COMPARISON_TYPE { CLOUDCLOUD_DIST = 0 , CLOUDMESH_DIST = 1 }
 Comparison type. More...
 

Public Slots

bool computeDistances ()
 
void applyAndExit ()
 
void cancelAndExit ()
 

Public Member Functions

 ccComparisonDlg (ccHObject *compEntity, ccHObject *refEntity, CC_COMPARISON_TYPE cpType, QWidget *parent=nullptr, bool noDisplay=false)
 Default constructor. More...
 
 ~ccComparisonDlg ()
 Default destructor. More...
 
bool initDialog ()
 Should be called once after the dialog is created. More...
 
ccHObjectgetComparedEntity () const
 Returns compared entity. More...
 
ccHObjectgetReferenceEntity ()
 Returns compared entity. More...
 

Protected Slots

void showHisto ()
 
void locaModelChanged (int)
 
void maxDistUpdated ()
 

Protected Member Functions

bool isValid ()
 
bool prepareEntitiesForComparison ()
 
bool computeApproxDistances ()
 
int getBestOctreeLevel ()
 
int determineBestOctreeLevel (double)
 
void updateDisplay (bool showSF, bool hideRef)
 
void releaseOctrees ()
 

Protected Attributes

ccHObjectm_compEnt
 Compared entity. More...
 
ccPointCloudm_compCloud
 Compared entity equivalent cloud. More...
 
ccOctree::Shared m_compOctree
 Compared entity's octree. More...
 
bool m_compOctreeIsPartial
 Whether the compared entity octree is partial or not. More...
 
bool m_compSFVisibility
 Initial compared entity visibility. More...
 
ccHObjectm_refEnt
 Reference entity. More...
 
ccGenericPointCloudm_refCloud
 Reference entity equivalent cloud (if any) More...
 
ccGenericMeshm_refMesh
 Reference entity equivalent mesh (if any) More...
 
ccOctree::Shared m_refOctree
 Reference entity's octree. More...
 
bool m_refOctreeIsPartial
 Whether the reference entity octree is partial or not. More...
 
bool m_refVisibility
 Initial reference entity visibility. More...
 
CC_COMPARISON_TYPE m_compType
 Comparison type. More...
 
QString m_sfName
 last computed scalar field name More...
 
QString m_oldSfName
 Initial SF name enabled on the compared entity. More...
 
bool m_noDisplay
 Whether a display is active (and should be refreshed) or not. More...
 
int m_bestOctreeLevel
 Best octree level (or 0 if none has been guessed already) More...
 

Detailed Description

Dialog for cloud/cloud or cloud/mesh comparison setting.

Definition at line 25 of file ecvComparisonDlg.h.

Member Enumeration Documentation

◆ CC_COMPARISON_TYPE

Comparison type.

Enumerator
CLOUDCLOUD_DIST 
CLOUDMESH_DIST 

Definition at line 30 of file ecvComparisonDlg.h.

Constructor & Destructor Documentation

◆ ccComparisonDlg()

◆ ~ccComparisonDlg()

ccComparisonDlg::~ccComparisonDlg ( )

Default destructor.

Definition at line 150 of file ecvComparisonDlg.cpp.

References releaseOctrees().

Member Function Documentation

◆ applyAndExit

◆ cancelAndExit

◆ computeApproxDistances()

bool ccComparisonDlg::computeApproxDistances ( )
protected

Definition at line 294 of file ecvComparisonDlg.cpp.

References ccPointCloud::addScalarField(), CC_TEMP_APPROX_DISTANCES_DEFAULT_SF_NAME, CLOUDCLOUD_DIST, CLOUDMESH_DIST, cloudViewer::DistanceComputationTools::computeApproxCloud2CloudDistance(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::ScalarField::computeMeanAndVariance(), cloudViewer::ScalarField::computeMinAndMax(), DEFAULT_OCTREE_LEVEL, ccPointCloud::deleteScalarField(), CVLog::Error(), cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::flipNormals, cloudViewer::PointCloudTpl< T >::getCurrentInScalarField(), cloudViewer::ScalarField::getMax(), cloudViewer::ScalarField::getMin(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), isValid(), m_compCloud, m_compOctree, m_compType, m_refCloud, m_refMesh, m_refOctree, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::maxSearchDist, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::multiThread, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::octreeLevel, CVLog::Print(), ccPointCloud::setCurrentDisplayedScalarField(), cloudViewer::PointCloudTpl< T >::setCurrentScalarField(), ccDrawableObject::showSF(), cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::signedDistances, updateDisplay(), cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::useDistanceMap, and CVLog::Warning().

Referenced by ccComparisonDlg(), determineBestOctreeLevel(), and initDialog().

◆ computeDistances

bool ccComparisonDlg::computeDistances ( )
slot

Definition at line 678 of file ecvComparisonDlg.cpp.

References ccPointCloud::addScalarField(), CC_CLOUD2CLOUD_DISTANCES_DEFAULT_SF_NAME, CC_CLOUD2MESH_DISTANCES_DEFAULT_SF_NAME, CC_CLOUD2MESH_SIGNED_DISTANCES_DEFAULT_SF_NAME, CC_TEMP_DISTANCES_DEFAULT_SF_NAME, CLOUDCLOUD_DIST, CLOUDMESH_DIST, cloudViewer::DistanceComputationTools::computeCloud2CloudDistances(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), ccGBLSensor::computeDepthBuffer(), cloudViewer::ScalarField::computeMeanAndVariance(), cloudViewer::ScalarField::computeMinAndMax(), count, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::CPSet, ccPointCloud::deleteScalarField(), ccPointCloud::enableVisibilityCheck(), CVLog::Error(), cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::flipNormals, CV_TYPES::GBL_SENSOR, getBestOctreeLevel(), ccHObject::getChild(), ccHObject::getChildrenNumber(), cloudViewer::PointCloudTpl< T >::getCurrentInScalarField(), ccGBLSensor::getDepthBuffer(), ccGBLSensor::GetErrorString(), cloudViewer::ScalarField::getName(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), ccObject::isA(), ccObject::isEnabled(), isValid(), cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::kNNForLocalModel, CCShareable::link(), cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::localModel, m_compCloud, m_compOctree, m_compType, m_refCloud, m_refMesh, m_refOctree, m_sfName, max(), cloudViewer::DgmOctree::MAX_OCTREE_LEVEL, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::maxSearchDist, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::maxSearchDist, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::maxThreadCount, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::maxThreadCount, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::multiThread, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::multiThread, NO_MODEL, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::octreeLevel, cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::octreeLevel, octreeLevel, CV_TYPES::POINT_CLOUD, CVLog::Print(), cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::radiusForLocalModel, CCShareable::release(), cloudViewer::ScalarField::resizeSafe(), result, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::reuseExistingLocalModels, ccPointCloud::setCurrentDisplayedScalarField(), cloudViewer::PointCloudTpl< T >::setCurrentScalarField(), cloudViewer::ScalarField::setName(), ccDrawableObject::showSF(), cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::signedDistances, cloudViewer::PointCloudTpl< T >::size(), cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::splitDistances, updateDisplay(), cloudViewer::DistanceComputationTools::Cloud2MeshDistancesComputationParams::useDistanceMap, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::useSphericalSearchForLocalModel, CVLog::Warning(), and ccDepthBuffer::zBuff.

Referenced by ccComparisonDlg(), and CommandDist::process().

◆ determineBestOctreeLevel()

◆ getBestOctreeLevel()

int ccComparisonDlg::getBestOctreeLevel ( )
protected

Definition at line 225 of file ecvComparisonDlg.cpp.

References determineBestOctreeLevel(), CVLog::Error(), and m_bestOctreeLevel.

Referenced by computeDistances().

◆ getComparedEntity()

ccHObject* ccComparisonDlg::getComparedEntity ( ) const
inline

Returns compared entity.

Definition at line 49 of file ecvComparisonDlg.h.

References m_compEnt.

◆ getReferenceEntity()

ccHObject* ccComparisonDlg::getReferenceEntity ( )
inline

Returns compared entity.

Definition at line 51 of file ecvComparisonDlg.h.

References m_refEnt.

◆ initDialog()

bool ccComparisonDlg::initDialog ( )
inline

Should be called once after the dialog is created.

Definition at line 46 of file ecvComparisonDlg.h.

References computeApproxDistances().

Referenced by CommandDist::process().

◆ isValid()

bool ccComparisonDlg::isValid ( )
protected

◆ locaModelChanged

void ccComparisonDlg::locaModelChanged ( int  index)
protectedslot

Definition at line 245 of file ecvComparisonDlg.cpp.

References CV_LOCAL_MODEL_MIN_SIZE.

Referenced by ccComparisonDlg().

◆ maxDistUpdated

void ccComparisonDlg::maxDistUpdated ( )
protectedslot

Definition at line 220 of file ecvComparisonDlg.cpp.

References m_bestOctreeLevel.

Referenced by ccComparisonDlg().

◆ prepareEntitiesForComparison()

◆ releaseOctrees()

void ccComparisonDlg::releaseOctrees ( )
protected

◆ showHisto

◆ updateDisplay()

Member Data Documentation

◆ m_bestOctreeLevel

int ccComparisonDlg::m_bestOctreeLevel
protected

Best octree level (or 0 if none has been guessed already)

Definition at line 109 of file ecvComparisonDlg.h.

Referenced by getBestOctreeLevel(), and maxDistUpdated().

◆ m_compCloud

ccPointCloud* ccComparisonDlg::m_compCloud
protected

◆ m_compEnt

ccHObject* ccComparisonDlg::m_compEnt
protected

Compared entity.

Definition at line 73 of file ecvComparisonDlg.h.

Referenced by ccComparisonDlg(), getComparedEntity(), prepareEntitiesForComparison(), and updateDisplay().

◆ m_compOctree

ccOctree::Shared ccComparisonDlg::m_compOctree
protected

◆ m_compOctreeIsPartial

bool ccComparisonDlg::m_compOctreeIsPartial
protected

Whether the compared entity octree is partial or not.

Definition at line 79 of file ecvComparisonDlg.h.

Referenced by prepareEntitiesForComparison(), and releaseOctrees().

◆ m_compSFVisibility

bool ccComparisonDlg::m_compSFVisibility
protected

Initial compared entity visibility.

Definition at line 81 of file ecvComparisonDlg.h.

Referenced by cancelAndExit(), and ccComparisonDlg().

◆ m_compType

CC_COMPARISON_TYPE ccComparisonDlg::m_compType
protected

Comparison type.

Definition at line 97 of file ecvComparisonDlg.h.

Referenced by computeApproxDistances(), computeDistances(), and prepareEntitiesForComparison().

◆ m_noDisplay

bool ccComparisonDlg::m_noDisplay
protected

Whether a display is active (and should be refreshed) or not.

Definition at line 106 of file ecvComparisonDlg.h.

Referenced by ccComparisonDlg(), and updateDisplay().

◆ m_oldSfName

QString ccComparisonDlg::m_oldSfName
protected

Initial SF name enabled on the compared entity.

Definition at line 103 of file ecvComparisonDlg.h.

Referenced by cancelAndExit(), and prepareEntitiesForComparison().

◆ m_refCloud

ccGenericPointCloud* ccComparisonDlg::m_refCloud
protected

Reference entity equivalent cloud (if any)

Definition at line 86 of file ecvComparisonDlg.h.

Referenced by ccComparisonDlg(), computeApproxDistances(), computeDistances(), isValid(), prepareEntitiesForComparison(), and releaseOctrees().

◆ m_refEnt

ccHObject* ccComparisonDlg::m_refEnt
protected

Reference entity.

Definition at line 84 of file ecvComparisonDlg.h.

Referenced by ccComparisonDlg(), getReferenceEntity(), prepareEntitiesForComparison(), and updateDisplay().

◆ m_refMesh

ccGenericMesh* ccComparisonDlg::m_refMesh
protected

Reference entity equivalent mesh (if any)

Definition at line 88 of file ecvComparisonDlg.h.

Referenced by ccComparisonDlg(), computeApproxDistances(), computeDistances(), determineBestOctreeLevel(), isValid(), and prepareEntitiesForComparison().

◆ m_refOctree

ccOctree::Shared ccComparisonDlg::m_refOctree
protected

◆ m_refOctreeIsPartial

bool ccComparisonDlg::m_refOctreeIsPartial
protected

Whether the reference entity octree is partial or not.

Definition at line 92 of file ecvComparisonDlg.h.

Referenced by prepareEntitiesForComparison(), and releaseOctrees().

◆ m_refVisibility

bool ccComparisonDlg::m_refVisibility
protected

Initial reference entity visibility.

Definition at line 94 of file ecvComparisonDlg.h.

Referenced by applyAndExit(), cancelAndExit(), and ccComparisonDlg().

◆ m_sfName

QString ccComparisonDlg::m_sfName
protected

last computed scalar field name

Definition at line 100 of file ecvComparisonDlg.h.

Referenced by applyAndExit(), and computeDistances().


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