![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Dialog for cloud/cloud or cloud/mesh comparison setting. More...
#include <ecvComparisonDlg.h>


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... | |
| ccHObject * | getComparedEntity () const |
| Returns compared entity. More... | |
| ccHObject * | getReferenceEntity () |
| 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 | |
| ccHObject * | m_compEnt |
| Compared entity. More... | |
| ccPointCloud * | m_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... | |
| ccHObject * | m_refEnt |
| Reference entity. More... | |
| ccGenericPointCloud * | m_refCloud |
| Reference entity equivalent cloud (if any) More... | |
| ccGenericMesh * | m_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... | |
Dialog for cloud/cloud or cloud/mesh comparison setting.
Definition at line 25 of file ecvComparisonDlg.h.
Comparison type.
| Enumerator | |
|---|---|
| CLOUDCLOUD_DIST | |
| CLOUDMESH_DIST | |
Definition at line 30 of file ecvComparisonDlg.h.
| ccComparisonDlg::ccComparisonDlg | ( | ccHObject * | compEntity, |
| ccHObject * | refEntity, | ||
| CC_COMPARISON_TYPE | cpType, | ||
| QWidget * | parent = nullptr, |
||
| bool | noDisplay = false |
||
| ) |
Default constructor.
Definition at line 44 of file ecvComparisonDlg.cpp.
References applyAndExit(), cancelAndExit(), computeApproxDistances(), computeDistances(), cloudViewer::BoundingBoxTpl< T >::getDiagNorm(), ccObject::getName(), ccHObject::getOwnBB(), ccPointCloud::hasSensor(), ccObject::isA(), ccDrawableObject::isVisible(), locaModelChanged(), m_compEnt, m_compSFVisibility, m_noDisplay, m_refCloud, m_refEnt, m_refMesh, m_refVisibility, cloudViewer::DgmOctree::MAX_OCTREE_LEVEL, maxDistUpdated(), CV_TYPES::POINT_CLOUD, prepareEntitiesForComparison(), ccObject::setEnabled(), ccDrawableObject::sfShown(), and showHisto().
| ccComparisonDlg::~ccComparisonDlg | ( | ) |
Default destructor.
Definition at line 150 of file ecvComparisonDlg.cpp.
References releaseOctrees().
|
slot |
Definition at line 1002 of file ecvComparisonDlg.cpp.
References CC_TEMP_APPROX_DISTANCES_DEFAULT_SF_NAME, CC_TEMP_DISTANCES_DEFAULT_SF_NAME, ccPointCloud::deleteScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), m_compCloud, m_refVisibility, m_sfName, releaseOctrees(), cloudViewer::PointCloudTpl< T >::renameScalarField(), ccPointCloud::setCurrentDisplayedScalarField(), ccDrawableObject::showSF(), updateDisplay(), and CVLog::Warning().
Referenced by ccComparisonDlg(), and CommandDist::process().
|
slot |
Definition at line 1055 of file ecvComparisonDlg.cpp.
References CC_TEMP_APPROX_DISTANCES_DEFAULT_SF_NAME, CC_TEMP_DISTANCES_DEFAULT_SF_NAME, ccPointCloud::deleteScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), m_compCloud, m_compSFVisibility, m_oldSfName, m_refVisibility, releaseOctrees(), ccPointCloud::setCurrentDisplayedScalarField(), ccDrawableObject::showSF(), and updateDisplay().
Referenced by ccComparisonDlg(), and CommandDist::process().
|
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().
|
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().
|
protected |
Definition at line 448 of file ecvComparisonDlg.cpp.
References CC_TEMP_APPROX_DISTANCES_DEFAULT_SF_NAME, cloudViewer::utility::ceil(), computeApproxDistances(), cloudViewer::MeshSamplingTools::computeMeshArea(), CVLog::Error(), cloudViewer::DgmOctree::GET_BIT_SHIFT(), cloudViewer::PointCloudTpl< T >::getScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), cloudViewer::ScalarField::getValue(), isValid(), m_compCloud, m_compOctree, m_refMesh, m_refOctree, cloudViewer::DgmOctree::MAX_OCTREE_LEVEL, nProgress, cloudViewer::NormalizedProgress::oneStep(), CVLog::PrintDebug(), cloudViewer::GenericMesh::size(), and CVLog::Warning().
Referenced by getBestOctreeLevel().
|
protected |
Definition at line 225 of file ecvComparisonDlg.cpp.
References determineBestOctreeLevel(), CVLog::Error(), and m_bestOctreeLevel.
Referenced by computeDistances().
|
inline |
|
inline |
|
inline |
Should be called once after the dialog is created.
Definition at line 46 of file ecvComparisonDlg.h.
References computeApproxDistances().
Referenced by CommandDist::process().
|
protected |
Definition at line 284 of file ecvComparisonDlg.cpp.
References CVLog::Error(), m_compCloud, m_compOctree, m_refCloud, m_refMesh, and m_refOctree.
Referenced by computeApproxDistances(), computeDistances(), and determineBestOctreeLevel().
|
protectedslot |
Definition at line 245 of file ecvComparisonDlg.cpp.
References CV_LOCAL_MODEL_MIN_SIZE.
Referenced by ccComparisonDlg().
|
protectedslot |
Definition at line 220 of file ecvComparisonDlg.cpp.
References m_bestOctreeLevel.
Referenced by ccComparisonDlg().
|
protected |
Definition at line 152 of file ecvComparisonDlg.cpp.
References CLOUDCLOUD_DIST, CLOUDMESH_DIST, CVLog::Error(), ccGenericMesh::getAssociatedCloud(), ccPointCloud::getCurrentDisplayedScalarFieldIndex(), ccGenericPointCloud::getOctree(), cloudViewer::PointCloudTpl< T >::getScalarFieldName(), ccObject::isA(), ccObject::isKindOf(), m_compCloud, m_compEnt, m_compOctree, m_compOctreeIsPartial, m_compType, m_oldSfName, m_refCloud, m_refEnt, m_refMesh, m_refOctree, m_refOctreeIsPartial, CV_TYPES::MESH, CV_TYPES::POINT_CLOUD, ccHObjectCaster::ToGenericMesh(), and ccHObjectCaster::ToGenericPointCloud().
Referenced by ccComparisonDlg().
|
protected |
Definition at line 254 of file ecvComparisonDlg.cpp.
References m_compCloud, m_compOctree, m_compOctreeIsPartial, m_refCloud, m_refOctree, and m_refOctreeIsPartial.
Referenced by applyAndExit(), cancelAndExit(), and ~ccComparisonDlg().
|
protectedslot |
Definition at line 983 of file ecvComparisonDlg.cpp.
References ccHistogramWindow::fromSF(), ccPointCloud::getCurrentDisplayedScalarField(), ccObject::getName(), m_compCloud, ccHistogramWindow::setAxisLabels(), ccHistogramWindow::setTitle(), cloudViewer::PointCloudTpl< T >::size(), and ccHistogramWindowDlg::window().
Referenced by ccComparisonDlg().
|
protected |
Definition at line 266 of file ecvComparisonDlg.cpp.
References m_compEnt, m_noDisplay, m_refEnt, ecvDisplayTools::RedrawDisplay(), ccObject::setEnabled(), ccHObject::setRedrawFlagRecursive(), ecvDisplayTools::SetRedrawRecursive(), ccDrawableObject::setVisible(), ccDrawableObject::showSF(), and MainWindow::UpdateUI().
Referenced by applyAndExit(), cancelAndExit(), computeApproxDistances(), and computeDistances().
|
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().
|
protected |
Compared entity equivalent cloud.
Definition at line 75 of file ecvComparisonDlg.h.
Referenced by applyAndExit(), cancelAndExit(), computeApproxDistances(), computeDistances(), determineBestOctreeLevel(), isValid(), prepareEntitiesForComparison(), releaseOctrees(), and showHisto().
|
protected |
Compared entity.
Definition at line 73 of file ecvComparisonDlg.h.
Referenced by ccComparisonDlg(), getComparedEntity(), prepareEntitiesForComparison(), and updateDisplay().
|
protected |
Compared entity's octree.
Definition at line 77 of file ecvComparisonDlg.h.
Referenced by computeApproxDistances(), computeDistances(), determineBestOctreeLevel(), isValid(), prepareEntitiesForComparison(), and releaseOctrees().
|
protected |
Whether the compared entity octree is partial or not.
Definition at line 79 of file ecvComparisonDlg.h.
Referenced by prepareEntitiesForComparison(), and releaseOctrees().
|
protected |
Initial compared entity visibility.
Definition at line 81 of file ecvComparisonDlg.h.
Referenced by cancelAndExit(), and ccComparisonDlg().
|
protected |
Comparison type.
Definition at line 97 of file ecvComparisonDlg.h.
Referenced by computeApproxDistances(), computeDistances(), and prepareEntitiesForComparison().
|
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().
|
protected |
Initial SF name enabled on the compared entity.
Definition at line 103 of file ecvComparisonDlg.h.
Referenced by cancelAndExit(), and prepareEntitiesForComparison().
|
protected |
Reference entity equivalent cloud (if any)
Definition at line 86 of file ecvComparisonDlg.h.
Referenced by ccComparisonDlg(), computeApproxDistances(), computeDistances(), isValid(), prepareEntitiesForComparison(), and releaseOctrees().
|
protected |
Reference entity.
Definition at line 84 of file ecvComparisonDlg.h.
Referenced by ccComparisonDlg(), getReferenceEntity(), prepareEntitiesForComparison(), and updateDisplay().
|
protected |
Reference entity equivalent mesh (if any)
Definition at line 88 of file ecvComparisonDlg.h.
Referenced by ccComparisonDlg(), computeApproxDistances(), computeDistances(), determineBestOctreeLevel(), isValid(), and prepareEntitiesForComparison().
|
protected |
Reference entity's octree.
Definition at line 90 of file ecvComparisonDlg.h.
Referenced by computeApproxDistances(), computeDistances(), determineBestOctreeLevel(), isValid(), prepareEntitiesForComparison(), and releaseOctrees().
|
protected |
Whether the reference entity octree is partial or not.
Definition at line 92 of file ecvComparisonDlg.h.
Referenced by prepareEntitiesForComparison(), and releaseOctrees().
|
protected |
Initial reference entity visibility.
Definition at line 94 of file ecvComparisonDlg.h.
Referenced by applyAndExit(), cancelAndExit(), and ccComparisonDlg().
|
protected |
last computed scalar field name
Definition at line 100 of file ecvComparisonDlg.h.
Referenced by applyAndExit(), and computeDistances().