src/tools/lvr2_slam6d_merger/Options.cpp
Go to the documentation of this file.
1 
28  /*
29  * Options.cpp
30  *
31  * Created on: Aug 7, 2013
32  * Author: Thomas Wiemann
33  */
34 
35 #include "Options.hpp"
36 
37 namespace slam6dmerger
38 {
39 
40 Options::Options(int argc, char** argv) : m_descr("Supported options")
41 {
42 
43  // Create option descriptions
44 
45  m_descr.add_options()
46  ("help", "Produce help message")
47  ("inputDir", value<string>()->default_value("./"), "A directory containing several scan files for batch conversion.")
48  ("mergeDir", value<string>()->default_value("./"), "A directory containing scans to merge into the project defined in inputDir")
49  ("outputDir", value<string>()->default_value("./"), "The target directory for the merge scan data.")
50  ("transformFile", value<string>()->default_value("./"), "A text file containing the transformation between the coordinates systems of inputDir and mergeDir")
51  ("start,s", value<int>()->default_value(0), "start at scan NR in mergeDir")
52  ("end,e", value<int>()->default_value(0), "end at scan NR in mergeDir")
53  ;
54 
55  m_pdescr.add("inputFile", -1);
56 
57  // Parse command line and generate variables map
58  store(command_line_parser(argc, argv).options(m_descr).positional(m_pdescr).run(), m_variables);
59  notify(m_variables);
60 
61  if(m_variables.count("help")) {
62  ::std::cout<< m_descr << ::std::endl;
63  exit(-1);
64  }
65 
66 
67 }
68 
69 
70 string Options::getInputDir() const
71 {
72  return m_variables["inputDir"].as<string>();
73 }
74 
75 string Options::getMergeDir() const
76 {
77  return m_variables["mergeDir"].as<string>();
78 }
79 
80 string Options::getOutputDir() const
81 {
82  return m_variables["outputDir"].as<string>();
83 }
84 
86 {
87  return m_variables["transformFile"].as<string>();
88 }
89 
90 
91 
93  // TODO Auto-generated destructor stub
94 }
95 
96 } // namespace reconstruct
Options(int argc, char **argv)
Ctor. Parses the command parameters given to the main function of the program.
const kaboom::Options * options
options_description m_descr
The internally used option description.
positional_options_description m_pdescr
The internally used positional option desription.
variables_map m_variables
The internally used variable map.
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