ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
application_gui.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
9 
10 #include "exe/gui.h"
11 #include "pipelines/option_utils.h"
12 
14 #ifdef GUI_ENABLED
15  Q_INIT_RESOURCE(resources);
16 #endif
17 }
18 
19 namespace cloudViewer {
20 
21 int GraphicalUserInterface(const std::string& database_path,
22  const std::string& image_path,
23  const std::string& import_path) {
25  OptionsParser parser;
26  if (!database_path.empty()) {
27  parser.registerOption("database_path", &database_path);
28  }
29  if (!image_path.empty()) {
30  parser.registerOption("image_path", &image_path);
31  }
32  if (!import_path.empty()) {
33  parser.registerOption("import_path", &import_path);
34  }
35 
36  if (!parser.parseOptions()) return EXIT_FAILURE;
37 
39  parser.getArgv());
40 }
41 
42 int GenerateProject(const std::string& output_path,
43  const std::string& quality /*= "high"*/) {
44  OptionsParser parser;
45  parser.registerOption("output_path", &output_path);
46  // supported {low, medium, high, extreme}
47  parser.registerOption("quality", &quality);
48  if (!parser.parseOptions()) return EXIT_FAILURE;
49 
50  return colmap::RunProjectGenerator(parser.getArgc(), parser.getArgv());
51 }
52 
53 } // namespace cloudViewer
void InitQtResources()
void registerOption(const std::string &name, const T *option)
Definition: option_utils.h:43
Generic file read and write utility for python interface.
int GraphicalUserInterface(const std::string &database_path, const std::string &image_path, const std::string &import_path)
int GenerateProject(const std::string &output_path, const std::string &quality)
int RunGraphicalUserInterface(int argc, char **argv)
Definition: gui.cc:39
int RunProjectGenerator(int argc, char **argv)
Definition: gui.cc:76