src/tools/lvr2_riegl_project_converter/Options.cpp
Go to the documentation of this file.
1 
28 #include "Options.hpp"
29 
30 #include <iostream>
31 
32 Options::Options() : desc("Allowed Options") {
33  desc.add_options()
34  ("help", "Prints this help message.")
35  ("input,i", po::value<std::string>()->required(), "A Riegl Scan Project directory as input for the converter.")
36  ("inputformat", po::value<std::string>()->default_value("rxp"), "The input pointcloud type in the riegl project folder to parse. Implemented: rxp, ascii")
37  ("out,o", po::value<std::string>()->default_value("./scan_project"), "The directory where the converted scan project will be saved.")
38  ("outformat", po::value<std::string>()->default_value("slam6d"), "The output coordinate space the converted scan project will be saved. Impemented: slam6d, lvr")
39  ("reduction,r", po::value<unsigned int>()->default_value(1), "Reduces pointcloud size by importing only every Nth point (1 means no reduction).")
40  ("start,s", po::value<unsigned int>()->default_value(1), "skipp the first start-1 scanpositions.")
41  ("end,e", po::value<unsigned int>()->default_value(0), "skipp all scanpositions after end")
42  ("force,f", "If this is set an already existing file will be overwritten in the output directory.")
43 
44  ;
45 
46  pod.add("input", 1);
47 
48 }
49 
50 bool Options::parse(int argc, char **argv) {
51  try {
52  po::store(po::command_line_parser(argc, argv).options(desc).positional(pod).run(), vm);
53  po::notify(vm);
54  }
55  catch (po::error& e) {
56  std::cout << "[Options] Error: " << e.what() << '\n' << desc <<std::endl;
57  return false;
58  }
59 
60  if (vm.count("help")) {
61  std::cout << "[Options] Info: " << desc << std::endl;
62  return false;
63  }
64 
65  return true;
66 }
const kaboom::Options * options
bool parse(int argc, char **argv)
po::positional_options_description pod
KF_EXPORTS void error(const char *error_string, const char *file, const int line, const char *func="")
Error handler. All GPU functions from this subsystem call the function to report an error...
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