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
slam6dmerger::Options::~Options
virtual ~Options()
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:92
slam6dmerger::Options::m_descr
options_description m_descr
The internally used option description.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:87
slam6dmerger::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:90
options
const kaboom::Options * options
Definition: src/tools/lvr2_kaboom/Main.cpp:45
Options.hpp
slam6dmerger::Options::getInputDir
string getInputDir() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:70
argc
int argc
Definition: tests_high_five_parallel.cpp:27
slam6dmerger
Definition: src/tools/lvr2_slam6d_merger/Main.cpp:65
slam6dmerger::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:84
slam6dmerger::Options::getTransformFile
string getTransformFile() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:85
slam6dmerger::Options::Options
Options(int argc, char **argv)
Ctor. Parses the command parameters given to the main function of the program.
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:40
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
slam6dmerger::Options::getOutputDir
string getOutputDir() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:80
slam6dmerger::Options::getMergeDir
string getMergeDir() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:75


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