ccRegistrationDlg.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  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: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #ifndef CC_REGISTRATION_DLG_HEADER
  18. #define CC_REGISTRATION_DLG_HEADER
  19. #include <QDialog>
  20. //CCCoreLib
  21. #include <RegistrationTools.h>
  22. #include <ui_registrationDlg.h>
  23. #include <ReferenceCloud.h>
  24. class ccHObject;
  25. //! Point cloud or mesh registration dialog
  26. class ccRegistrationDlg : public QDialog, public Ui::RegistrationDialog
  27. {
  28. Q_OBJECT
  29. public:
  30. //! Default constructor
  31. ccRegistrationDlg(ccHObject* data, ccHObject* model, QWidget* parent = nullptr);
  32. //! Default destructor
  33. virtual ~ccRegistrationDlg();
  34. //shortcuts
  35. typedef CCCoreLib::ICPRegistrationTools::CONVERGENCE_TYPE ConvergenceMethod;
  36. //! Returns convergence method
  37. ConvergenceMethod getConvergenceMethod() const;
  38. //! Returns max number of iterations
  39. /** Only valid if registration method is 'ITERATION_REG'.
  40. **/
  41. unsigned getMaxIterationCount() const;
  42. //! Returns the approximated final overlap
  43. unsigned getFinalOverlap() const;
  44. //! Returns minimum RMS decrease between two consecutive iterations
  45. /** Only valid if registration method is 'MAX_ERROR_REG'.
  46. **/
  47. double getMinRMSDecrease() const;
  48. //! Returns the theoretical mininmum RMS decrease between two consecutive iterations
  49. static double GetAbsoluteMinRMSDecrease();
  50. //! Sets the minimum RMS decrease between two consecutive iterations
  51. /** Only valid if registration method is 'MAX_ERROR_REG'.
  52. **/
  53. void setMinRMSDecrease(double value);
  54. //! Returns whether farthest points should be ignored at each iteration
  55. /** This is a trick to improve registration for slightly different clouds.
  56. **/
  57. bool removeFarthestPoints() const;
  58. //! Returns the limit above which clouds should be randomly resampled
  59. unsigned randomSamplingLimit() const;
  60. //! Returns 'model' entity
  61. ccHObject *getModelEntity();
  62. //! Returns 'data' entity
  63. ccHObject *getDataEntity();
  64. //! Whether to use data displayed SF as weights
  65. bool useDataSFAsWeights() const;
  66. //! Whether to use model displayed SF as weights
  67. bool useModelSFAsWeights() const;
  68. //! Whether to use signed distances when the reference is a mesh
  69. bool useC2MSignedDistances(bool& robust) const;
  70. //! Method to take normals into account
  71. CCCoreLib::ICPRegistrationTools::NORMALS_MATCHING normalsMatchingOption() const;
  72. //! Returns whether to adjust the scale during optimization
  73. /** This is useful for co-registration of lidar and photogrammetric clouds
  74. for instance.
  75. **/
  76. bool adjustScale() const;
  77. //! Returns active transformation filters
  78. /** See CCCoreLib::RegistrationTools::TRANSFORMATION_FILTERS.
  79. **/
  80. int getTransformationFilters() const;
  81. //! Returns the maximum number of threads
  82. int getMaxThreadCount() const;
  83. //! Saves parameters for next call
  84. void saveParameters() const;
  85. protected:
  86. void swapModelAndData();
  87. protected:
  88. void updateGUI();
  89. //! 'Model' entity
  90. ccHObject* modelEntity;
  91. //! 'Data' entity
  92. ccHObject* dataEntity;
  93. };
  94. #endif //CC_REGISTRATION_DLG_HEADER