OptionsGS.cpp
Go to the documentation of this file.
1 /*
2 * OptionsGSS.cpp
3 *
4 * Created on: Feb 09, 2019
5 * Author: Patrick Hoffmann
6 */
7 
8 #include "OptionsGS.hpp"
9 
10 
11 using namespace boost::program_options;
14  m_descr.add_options()
15  ("help", "Produce help message")
16  ("inputFile",value<vector<string>>(), "Input file name. Supported formats are ASCII (.pts, .xyz) and .ply")
17  ("runtime", value<int>(&m_runtime)->default_value(3000), "Overall runtime of the Algorithm. The longer, the (better), default: 3000")
18  ("basicSteps",value<int>(&m_basicSteps)->default_value(10), "Basics step until split, default: 10")
19  ("numSplits",value<int>(&m_numSplits)->default_value(5), "splits per runtime, default: 5")
20  ("boxFactor",value<float>(&m_boxFactor)->default_value(0.2), "scale of initial mesh, default: 1")
21  ("withCollapse",value<bool>(&m_withCollapse)->default_value(true), "with edge collapse? default: true")
22  ("learningRate",value<float>(&m_learningRate)->default_value(0.1),"learning rate of winner vertex, default: 1")
23  ("neighborLearningRate",value<float>(&m_neighborLearningRate)->default_value(0.08),"learning rate of winner vertex neighbours, default: 0.08")
24  ("decreaseFactor",value<float>(&m_decreaseFactor)->default_value(0.999),"dynamic decrease factor, default start: 1.0")
25  ("allowMiss",value<int>(&m_allowMiss)->default_value(7), "allow miss of vertex, default: 7")
26  ("collapseThreshold",value<float>(&m_collapseThreshold)->default_value(0.3), "threshold for collapse, default: 0.3")
27  ("filterChain",value<bool>(&m_filterChain)->default_value(false),"should the filter chain run? default: false")
28  ("deleteLongEdgesFactor",value<int>(&m_deleteLongEdgesFactor)->default_value(10), "0 = no deleting, default: 10")
29  ("interior",value<bool>(&m_interior)->default_value(false), "false: reconstruct exterior, true: reconstruct interior")
30  ("balances",value<int>(&m_balances)->default_value(20), "Number of TumbleTree-Balances during the reconstruction. default: 20")
31  ("kd", value<int>(&m_kd)->default_value(5), "Number of normals used for distance function evaluation")
32  ("ki", value<int>(&m_ki)->default_value(10), "Number of normals used in the normal interpolation process")
33  ("kn", value<int>(&m_kn)->default_value(10), "Size of k-neighborhood used for normal estimation")
34  ("pcm,p", value<string>(&m_pcm)->default_value("FLANN"), "Point cloud manager used for point handling and normal estimation. Choose from {STANN, PCL, NABO}.")
35  ;
36  setup();
37  }
38 
40  //TODO: Auto-generated destructor stub
41  }
42 
43  string Options::getInputFileName() const {
44  return (m_variables["inputFile"].as<vector<string>>())[0];
45  }
46 
47  int Options::getRuntime() const {
48  return m_variables["runtime"].as<int>();
49  }
50 
51  int Options::getBasicSteps() const {
52  return m_variables["basicSteps"].as<int>();
53  }
54 
55  int Options::getNumSplits() const {
56  return m_variables["numSplits"].as<int>();
57  }
58 
59  float Options::getBoxFactor() const {
60  return m_variables["boxFactor"].as<float>();
61  }
62 
63  bool Options::getWithCollapse() const {
64  return m_variables["withCollapse"].as<bool>();
65  }
66 
67  float Options::getLearningRate() const {
68  return m_variables["learningRate"].as<float>();
69  }
70 
72  return m_variables["neighborLearningRate"].as<float>();
73  }
74 
76  return m_variables["decreaseFactor"].as<float>();
77 
78  }
79  int Options::getAllowMiss() const {
80  return m_variables["allowMiss"].as<int>();
81  }
82 
84  return m_variables["collapseThreshold"].as<float>();
85  }
86 
87  bool Options::isFilterChain() const {
88  return m_variables["filterChain"].as<bool>();
89  }
90 
92  return m_variables["deleteLongEdgesFactor"].as<int>();
93  }
94 
95  bool Options::isInterior() const {
96  return m_variables["interior"].as<bool>();
97  }
98 
100  return m_variables["balances"].as<int>();
101  }
102 
103 
104 
105 
106 
107  bool Options::printUsage() const {
108  if (m_variables.count("help"))
109  {
110  cout << endl;
111  cout << m_descr << endl;
112  return true;
113  }
114  else if (!m_variables.count("inputFile"))
115  {
116  cout << "Error: You must specify an input file." << endl;
117  cout << endl;
118  cout << m_descr << endl;
119  return true;
120  }
121  return false;
122  }
123 
124 
125  int Options::getKd() const {
126  return m_variables["kd"].as<int>();
127  }
128 
129  int Options::getKn() const {
130  return m_variables["kn"].as<int>();
131  }
132 
133  int Options::getKi() const {
134  return m_variables["ki"].as<int>();
135  }
136 
137  string Options::getPcm() const {
138  return (m_variables["pcm"].as<string>());
139  }
140 }
141 
gs_reconstruction::Options::getBasicSteps
int getBasicSteps() const
Definition: OptionsGS.cpp:51
gs_reconstruction::Options::m_allowMiss
int m_allowMiss
Definition: OptionsGS.hpp:113
gs_reconstruction::Options::m_decreaseFactor
float m_decreaseFactor
Definition: OptionsGS.hpp:112
gs_reconstruction::Options::isInterior
bool isInterior() const
Definition: OptionsGS.cpp:95
gs_reconstruction::Options::m_numSplits
int m_numSplits
Definition: OptionsGS.hpp:107
gs_reconstruction::Options::getNeighborLearningRate
float getNeighborLearningRate() const
Definition: OptionsGS.cpp:71
gs_reconstruction::Options::m_interior
bool m_interior
Definition: OptionsGS.hpp:117
gs_reconstruction::Options::getNumBalances
int getNumBalances() const
Definition: OptionsGS.cpp:99
gs_reconstruction::Options::getWithCollapse
bool getWithCollapse() const
Definition: OptionsGS.cpp:63
gs_reconstruction::Options::m_kn
int m_kn
The number of neighbors for normal estimation.
Definition: OptionsGS.hpp:123
gs_reconstruction::Options::getBoxFactor
float getBoxFactor() const
Definition: OptionsGS.cpp:59
gs_reconstruction
Definition: OptionsGS.cpp:12
gs_reconstruction::Options::getDeleteLongEdgesFactor
int getDeleteLongEdgesFactor() const
Definition: OptionsGS.cpp:91
lvr2::BaseOption
Definition: BaseOption.hpp:48
gs_reconstruction::Options::m_collapseThreshold
float m_collapseThreshold
Definition: OptionsGS.hpp:114
lvr2::BaseOption::m_variables
variables_map m_variables
The internally used variable map.
Definition: BaseOption.hpp:104
gs_reconstruction::Options::m_withCollapse
bool m_withCollapse
Definition: OptionsGS.hpp:109
gs_reconstruction::Options::isFilterChain
bool isFilterChain() const
Definition: OptionsGS.cpp:87
gs_reconstruction::Options::getKi
int getKi() const
Definition: OptionsGS.cpp:133
gs_reconstruction::Options::getRuntime
int getRuntime() const
Definition: OptionsGS.cpp:47
gs_reconstruction::Options::m_basicSteps
int m_basicSteps
Definition: OptionsGS.hpp:106
gs_reconstruction::Options::getAllowMiss
int getAllowMiss() const
Definition: OptionsGS.cpp:79
gs_reconstruction::Options::m_pcm
string m_pcm
The used point cloud manager.
Definition: OptionsGS.hpp:129
gs_reconstruction::Options::getKn
int getKn() const
Definition: OptionsGS.cpp:129
gs_reconstruction::Options::m_boxFactor
float m_boxFactor
Definition: OptionsGS.hpp:108
gs_reconstruction::Options::getLearningRate
float getLearningRate() const
Definition: OptionsGS.cpp:67
gs_reconstruction::Options::getKd
int getKd() const
Definition: OptionsGS.cpp:125
gs_reconstruction::Options::m_balances
int m_balances
Definition: OptionsGS.hpp:118
gs_reconstruction::Options::getNumSplits
int getNumSplits() const
Definition: OptionsGS.cpp:55
gs_reconstruction::Options::~Options
virtual ~Options()
Definition: OptionsGS.cpp:39
gs_reconstruction::Options::m_deleteLongEdgesFactor
int m_deleteLongEdgesFactor
Definition: OptionsGS.hpp:116
gs_reconstruction::Options::getDecreaseFactor
float getDecreaseFactor() const
Definition: OptionsGS.cpp:75
gs_reconstruction::Options::m_kd
int m_kd
The number of neighbors for distance function evaluation.
Definition: OptionsGS.hpp:120
argc
int argc
Definition: tests_high_five_parallel.cpp:27
gs_reconstruction::Options::getInputFileName
string getInputFileName() const
Definition: OptionsGS.cpp:43
gs_reconstruction::Options::m_filterChain
bool m_filterChain
Definition: OptionsGS.hpp:115
gs_reconstruction::Options::m_ki
int m_ki
The number of neighbors for normal interpolation.
Definition: OptionsGS.hpp:126
lvr2::BaseOption::setup
virtual void setup()
Setup internal data structures.
Definition: BaseOption.cpp:84
gs_reconstruction::Options::printUsage
bool printUsage() const
Definition: OptionsGS.cpp:107
gs_reconstruction::Options::getCollapseThreshold
float getCollapseThreshold() const
Definition: OptionsGS.cpp:83
lvr2::BaseOption::m_descr
options_description m_descr
The internally used option description.
Definition: BaseOption.hpp:107
gs_reconstruction::Options::m_learningRate
float m_learningRate
Definition: OptionsGS.hpp:110
gs_reconstruction::Options::getPcm
string getPcm() const
Definition: OptionsGS.cpp:137
gs_reconstruction::Options::m_runtime
int m_runtime
Definition: OptionsGS.hpp:105
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
gs_reconstruction::Options::m_neighborLearningRate
float m_neighborLearningRate
Definition: OptionsGS.hpp:111
OptionsGS.hpp
Options::Options
Options()
Definition: src/tools/lvr2_riegl_project_converter/Options.cpp:32


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24