src/tools/lvr2_hdf5_builder_2/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 <boost/program_options.hpp>
39 #include <iostream>
40 #include <string>
41 #include <vector>
42 
43 using std::cout;
44 using std::endl;
45 using std::ostream;
46 using std::string;
47 using std::vector;
48 
49 namespace hdf5tool2
50 {
51 
52 using namespace boost::program_options;
53 
58 class Options
59 {
60  public:
65  Options(int argc, char** argv);
66  virtual ~Options();
67 
68  string getInputDir() const { return m_variables["inputDir"].as<string>(); }
69  string getOutputDir() const { return m_variables["outputDir"].as<string>(); }
70  string getOutputFile() const { return m_variables["outputFile"].as<string>(); }
71  bool getPreview() const { return m_variables["createPreview"].as<bool>(); }
72  int getPreviewReductionRatio() const { return m_variables["previewReduction"].as<int>(); }
73  // int numPanoramaImages() const { return m_variables["nch"].as<int>();}
74  //
75  // size_t getHSPChunk0() const { return m_variables["hsp_chunk_0"].as<size_t>(); }
76  // size_t getHSPChunk1() const { return m_variables["hsp_chunk_1"].as<size_t>(); }
77  // size_t getHSPChunk2() const { return m_variables["hsp_chunk_2"].as<size_t>(); }
78  //
79  // bool addAnnotations() const { return (m_variables["addAnnotations"].as<int>() != 0);}
80 
81  private:
83  variables_map m_variables;
84 
86  options_description m_descr;
87 
89  positional_options_description m_pdescr;
90 };
91 
93 inline ostream& operator<<(ostream& os, const Options& o)
94 {
95  cout << "##### Program options: " << endl;
96  // cout << "##### Data directory \t\t: " << o.getDataDir() << endl;
97 
98  return os;
99 }
100 
101 } // namespace hdf5tool2
102 
103 #endif /* OPTIONS_H_ */
hdf5tool2::Options::getInputDir
string getInputDir() const
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:68
hdf5tool2::Options
A class to parse the program options for the reconstruction executable.
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:58
hdf5tool2::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:93
hdf5tool2::Options::getOutputFile
string getOutputFile() const
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:70
hdf5tool2
Definition: src/tools/lvr2_hdf5_builder_2/Options.cpp:37
hdf5tool2::Options::getPreview
bool getPreview() const
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:71
hdf5tool2::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:89
argc
int argc
Definition: tests_high_five_parallel.cpp:27
hdf5tool2::Options::getPreviewReductionRatio
int getPreviewReductionRatio() const
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:72
hdf5tool2::Options::m_descr
options_description m_descr
The internally used option description.
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:86
hdf5tool2::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:83
hdf5tool2::Options::getOutputDir
string getOutputDir() const
Definition: src/tools/lvr2_hdf5_builder_2/Options.hpp:69
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28


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