src/tools/lvr2_kaboom/Options.hpp
Go to the documentation of this file.
1 
28  /*
29  * Options.h
30  *
31  * Created on: Nov 21, 2010
32  * Author: Thomas Wiemann
33  */
34 
35 #ifndef OPTIONS_H_
36 #define OPTIONS_H_
37 
38 #include <iostream>
39 #include <string>
40 #include <vector>
41 #include <boost/program_options.hpp>
42 
44 
45 using std::ostream;
46 using std::cout;
47 using std::endl;
48 using std::string;
49 using std::vector;
50 
51 
52 namespace kaboom
53 {
54 
55 using namespace boost::program_options;
56 
61 class Options : public lvr2::BaseOption
62 {
63 public:
64 
69  Options(int argc, char** argv);
70  virtual ~Options();
71 
72  string getInputDir() const;
73  string getOutputDir() const;
74  string getOutputFormat() const;
75  string getInputFile() const;
76  string getOutputFile() const;
77 
78  bool exportScanPositions() const;
79  bool filter() const;
80  bool transformBefore() const;
81  int getK() const;
82  float getSigma() const;
83  int getTargetSize() const;
84  double getVoxelSize() const;
85  size_t getMinPointsPerVoxel() const;
86 
87  bool convertToLVR() const;
88 
92  int r() const { return m_variables["rPos"].as<int>() ;}
93 
97  int g() const { return m_variables["gPos"].as<int>();}
98 
102  int b() const { return m_variables["bPos"].as<int>();}
103 
107  int i() const { return m_variables["iPos"].as<int>();}
108 
109  int getStart() const { return m_variables["start"].as<int>(); }
110 
111  int getEnd() const { return m_variables["end"].as<int>(); }
112 
113  std::string getScanPrefix() const { return m_variables["scanPrefix"].as<std::string>(); }
114  std::string getPosePrefix() const { return m_variables["posePrefix"].as<std::string>(); }
115  std::string getScanExtension() const { return m_variables["scanExtension"].as<std::string>(); }
116  std::string getPoseExtension() const { return m_variables["poseExtension"].as<std::string>(); }
117 
118 private:
119 
121  string m_outputFile;
122 
124  variables_map m_variables;
125 
127  options_description m_descr;
128 
130  positional_options_description m_pdescr;
131 
132 };
133 
134 
136 inline ostream& operator<<(ostream& os, const Options &o)
137 {
138  cout << "##### Program options: " << endl;
139  cout << "##### Input dir \t\t: " << o.getInputDir() << endl;
140  cout << "##### Output dir \t\t: " << o.getOutputDir() << endl;
141  if(o.filter())
142  {
143  cout << "##### Filter \t\t\t: YES" << endl;
144  cout << "##### K \t\t\t\t: " << o.getK() << endl;
145  cout << "##### Sigma \t\t\t: " << o.getSigma() << endl;
146  }
147  else
148  {
149  cout << "##### Filter \t\t\t: NO" << endl;
150  }
151  cout << "##### Target Size \t: " << o.getTargetSize() << endl;
152  return os;
153 }
154 
155 } // namespace reconstruct
156 
157 
158 #endif /* OPTIONS_H_ */
std::string getPosePrefix() const
int b() const
Returns the position of the x coordinate in the data.
int r() const
Returns the position of the x coordinate in the data.
int i() const
Returns the position of the x coordinate in the data.
options_description m_descr
The internally used option description.
std::string getScanPrefix() const
string m_outputFile
Output file name.
variables_map m_variables
The internally used variable map.
void filter(lvr2::PointBufferPtr &cloud, lvr2::indexArray &inlier, size_t j)
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
int g() const
Returns the position of the x coordinate in the data.
std::string getPoseExtension() const
A class to parse the program options for the reconstruction executable.
positional_options_description m_pdescr
The internally used positional option desription.
std::string getScanExtension() const
char ** argv


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 Mon Feb 28 2022 22:46:08