ccAlignDlg.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #pragma once
  2. //##########################################################################
  3. //# #
  4. //# CLOUDCOMPARE #
  5. //# #
  6. //# This program is free software; you can redistribute it and/or modify #
  7. //# it under the terms of the GNU General Public License as published by #
  8. //# the Free Software Foundation; version 2 or later of the License. #
  9. //# #
  10. //# This program is distributed in the hope that it will be useful, #
  11. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  12. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  13. //# GNU General Public License for more details. #
  14. //# #
  15. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  16. //# #
  17. //##########################################################################
  18. #include <QDialog>
  19. class ccGenericPointCloud;
  20. namespace CCCoreLib {
  21. class ReferenceCloud;
  22. }
  23. namespace Ui {
  24. class AlignDialog;
  25. }
  26. //! Rough registration dialog
  27. class ccAlignDlg : public QDialog
  28. {
  29. Q_OBJECT
  30. public:
  31. enum CC_SAMPLING_METHOD { NONE = 0,
  32. RANDOM,
  33. SPACE,
  34. OCTREE
  35. };
  36. ccAlignDlg(ccGenericPointCloud* data, ccGenericPointCloud* model, QWidget* parent = nullptr);
  37. virtual ~ccAlignDlg();
  38. unsigned getNbTries();
  39. double getOverlap();
  40. double getDelta();
  41. ccGenericPointCloud* getModelObject();
  42. ccGenericPointCloud* getDataObject();
  43. CC_SAMPLING_METHOD getSamplingMethod();
  44. bool isNumberOfCandidatesLimited();
  45. unsigned getMaxNumberOfCandidates();
  46. CCCoreLib::ReferenceCloud* getSampledModel();
  47. CCCoreLib::ReferenceCloud* getSampledData();
  48. protected:
  49. void swapModelAndData();
  50. void modelSliderReleased();
  51. void dataSliderReleased();
  52. void modelSamplingRateChanged(double value);
  53. void dataSamplingRateChanged(double value);
  54. void estimateDelta();
  55. void changeSamplingMethod(int index);
  56. void toggleNbMaxCandidates(bool activ);
  57. protected:
  58. //! 'Model' cloud (static)
  59. ccGenericPointCloud* modelObject;
  60. //! 'Data' cloud (static)
  61. ccGenericPointCloud* dataObject;
  62. void setColorsAndLabels();
  63. Ui::AlignDialog* m_ui;
  64. };