src/tools/lvr2_asciiconverter/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 
43 using std::ostream;
44 using std::cout;
45 using std::endl;
46 using std::string;
47 using std::vector;
48 
49 
50 namespace ascii_convert
51 {
52 
53 using namespace boost::program_options;
54 
59 class Options {
60 public:
61 
66  Options(int argc, char** argv);
67  virtual ~Options();
68 
72  int x() { return m_variables["xPos"].as<int>();}
73 
77  int y() { return m_variables["yPos"].as<int>();}
78 
82  int z() { return m_variables["zPos"].as<int>();}
83 
87  int r() { return m_variables["rPos"].as<int>() ;}
88 
92  int g() { return m_variables["gPos"].as<int>();}
93 
97  int b() { return m_variables["bPos"].as<int>();}
98 
102  int i() { return m_variables["iPos"].as<int>();}
103 
104 
108  float sx() { return m_variables["sx"].as<float>();}
109 
113  float sy() { return m_variables["sy"].as<float>();}
114 
118  float sz() { return m_variables["sz"].as<float>();}
119 
120 
124  string inputFile() const;
125 
129  string outputFile() const;
130 
134  bool printUsage() const;
135 
139  bool convertRemission() const;
140 
141 private:
142 
144  string m_outputFile;
145 
147  variables_map m_variables;
148 
150  options_description m_descr;
151 
153  positional_options_description m_pdescr;
154 
155 };
156 
157 
159 inline ostream& operator<<(ostream& os, const Options &o)
160 {
161  cout << "##### Program options: " << endl;
162  cout << "##### Input file \t\t: " << o.inputFile() << endl;
163  cout << "##### Output file \t\t: " << o.outputFile() << endl;
164  return os;
165 }
166 
167 } // namespace reconstruct
168 
169 
170 #endif /* OPTIONS_H_ */
float sy()
Returns the scaling factor for the y coordinates.
int y()
Returns the position of the x coordinate in the data.
int r()
Returns the position of the x coordinate in the data.
A class to parse the program options for the reconstruction executable.
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
int i()
Returns the position of the x coordinate in the data.
float sz()
Returns the scaling factor for the z coordinates.
int z()
Returns the position of the x coordinate in the data.
int g()
Returns the position of the x coordinate in the data.
string outputFile() const
Retuns the input file.
string inputFile() const
Retuns the input file.
positional_options_description m_pdescr
The internally used positional option desription.
float sx()
Returns the scaling factor for the x coordinates.
int b()
Returns the position of the x coordinate in the data.
variables_map m_variables
The internally used variable map.
options_description m_descr
The internally used option description.
int x()
Returns the position of the x coordinate in the data.
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