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_ */
hdf5tool::Options::getDataDir
string getDataDir() const
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:69
hdf5tool::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:80
hdf5tool::Options::getHSPChunk2
size_t getHSPChunk2() const
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:74
hdf5tool::Options::getHSPChunk1
size_t getHSPChunk1() const
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:73
hdf5tool::Options::getHSPChunk0
size_t getHSPChunk0() const
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:72
hdf5tool::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:86
hdf5tool::Options::m_descr
options_description m_descr
The internally used option description.
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:83
hdf5tool::Options::addAnnotations
bool addAnnotations() const
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:76
hdf5tool::Options::numPanoramaImages
int numPanoramaImages() const
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:70
argc
int argc
Definition: tests_high_five_parallel.cpp:27
hdf5tool::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:92
hdf5tool::Options
A class to parse the program options for the reconstruction executable.
Definition: src/tools/lvr2_hdf5_builder/Options.hpp:59
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
hdf5tool
Definition: src/tools/lvr2_hdf5_builder/Options.cpp:37


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