ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
TreeIso.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // #######################################################################################
11 // # # # ACLOUDVIEWER PLUGIN: qTreeIso # # # # This
12 // program is free software; you can redistribute it and/or modify # #
13 // it under the terms of the GNU General Public License as published by # # the
14 // Free Software Foundation; version 2 or later of the License. # #
15 // # # This program is distributed in the hope that it will be useful, #
16 // # but WITHOUT ANY WARRANTY; without even the implied warranty of # #
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU
18 // General Public License for more details. # # # # Please cite the
19 // following paper if you find this tool helpful # # # # Xi, Z.;
20 // Hopkinson, C. 3D Graph-Based Individual-Tree Isolation (Treeiso) # # from
21 // Terrestrial Laser Scanning Point Clouds. Remote Sens. 2022, 14, 6116. # #
22 // https://doi.org/10.3390/rs14236116 # # # # Our work relies on
23 // the cut-pursuit algorithm, please also consider citing: # # Landrieu, L.;
24 // Obozinski, G. Cut Pursuit: Fast Algorithms to Learn Piecewise # # Constant
25 // Functions on General Weighted Graphs. SIAM J. Imaging Sci. # # 2017,
26 // 10, 1724–1766. # # # # Copyright © # #
27 // Artemis Lab, Department of Geography & Environment # #
28 // University of Lethbridge, Canada # # # # # # Zhouxin
29 // Xi and Chris Hopkinson; # #
30 // truebelief2010@gmail.com; c.hopkinson@uleth.ca # # #
31 // #######################################################################################
32 
33 // A Matlab version shared via:
34 // https://github.com/truebelief/artemis_treeiso
35 
37 class ccPointCloud;
38 class QProgressDialog;
39 
40 class TreeIso {
41 public:
42  static bool Init_seg(const unsigned min_nn1,
43  const float regStrength1,
44  const float PR_DECIMATE_RES1,
46  QProgressDialog* progressDlg);
47  static bool Intermediate_seg(const unsigned PR_MIN_NN2,
48  const float PR_REG_STRENGTH2,
49  const float PR_DECIMATE_RES2,
50  const float PR_MAX_GAP,
52  QProgressDialog* progressDlg);
53  static bool Final_seg(const unsigned PR_MIN_NN3,
54  const float PR_REL_HEIGHT_LENGTH_RATIO,
55  const float PR_VERTICAL_WEIGHT,
57  QProgressDialog* progressDlg);
58 
59  static bool Init_seg_pcd(ccPointCloud* pc,
60  const unsigned min_nn1,
61  const float regStrength1,
62  const float PR_DECIMATE_RES1,
63  QProgressDialog* progressDlg = nullptr);
64  static bool Intermediate_seg_pcd(ccPointCloud* pc,
65  const unsigned PR_MIN_NN2,
66  const float PR_REG_STRENGTH2,
67  const float PR_DECIMATE_RES2,
68  const float PR_MAX_GAP,
69  QProgressDialog* progressDlg = nullptr);
70  static bool Final_seg_pcd(ccPointCloud* pc,
71  const unsigned PR_MIN_NN3,
72  const float PR_REL_HEIGHT_LENGTH_RATIO,
73  const float PR_VERTICAL_WEIGHT,
74  QProgressDialog* progressDlg = nullptr);
75 };
static bool Init_seg(const unsigned min_nn1, const float regStrength1, const float PR_DECIMATE_RES1, ecvMainAppInterface *app, QProgressDialog *progressDlg)
Definition: TreeIso.cpp:835
static bool Intermediate_seg_pcd(ccPointCloud *pc, const unsigned PR_MIN_NN2, const float PR_REG_STRENGTH2, const float PR_DECIMATE_RES2, const float PR_MAX_GAP, QProgressDialog *progressDlg=nullptr)
Definition: TreeIso.cpp:143
static bool Final_seg(const unsigned PR_MIN_NN3, const float PR_REL_HEIGHT_LENGTH_RATIO, const float PR_VERTICAL_WEIGHT, ecvMainAppInterface *app, QProgressDialog *progressDlg)
Definition: TreeIso.cpp:911
static bool Final_seg_pcd(ccPointCloud *pc, const unsigned PR_MIN_NN3, const float PR_REL_HEIGHT_LENGTH_RATIO, const float PR_VERTICAL_WEIGHT, QProgressDialog *progressDlg=nullptr)
Definition: TreeIso.cpp:413
static bool Init_seg_pcd(ccPointCloud *pc, const unsigned min_nn1, const float regStrength1, const float PR_DECIMATE_RES1, QProgressDialog *progressDlg=nullptr)
Definition: TreeIso.cpp:58
static bool Intermediate_seg(const unsigned PR_MIN_NN2, const float PR_REG_STRENGTH2, const float PR_DECIMATE_RES2, const float PR_MAX_GAP, ecvMainAppInterface *app, QProgressDialog *progressDlg)
Definition: TreeIso.cpp:871
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Main application interface (for plugins)