src/tools/lvr2_hdf5_builder/Options.hpp
Go to the documentation of this file.
1 
28  /*
29  * Options.h
30  *
31  * Created on: Aug 23 2012
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 hdf5tool
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 
69  string getDataDir() const { return m_variables["dataDir"].as<string>();}
70  int numPanoramaImages() const { return m_variables["nch"].as<int>();}
71 
72  size_t getHSPChunk0() const { return m_variables["hsp_chunk_0"].as<size_t>(); }
73  size_t getHSPChunk1() const { return m_variables["hsp_chunk_1"].as<size_t>(); }
74  size_t getHSPChunk2() const { return m_variables["hsp_chunk_2"].as<size_t>(); }
75 
76  bool addAnnotations() const { return (m_variables["addAnnotations"].as<int>() != 0);}
77 
78 private:
80  variables_map m_variables;
81 
83  options_description m_descr;
84 
86  positional_options_description m_pdescr;
87 
88 };
89 
90 
92 inline ostream& operator<<(ostream& os, const Options &o)
93 {
94  cout << "##### Program options: " << endl;
95  cout << "##### Data directory \t\t: " << o.getDataDir() << endl;
96 
97  return os;
98 }
99 
100 } // namespace reconstruct
101 
102 
103 #endif /* OPTIONS_H_ */
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
positional_options_description m_pdescr
The internally used positional option desription.
A class to parse the program options for the reconstruction executable.
variables_map m_variables
The internally used variable map.
options_description m_descr
The internally used option description.
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