ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
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 "pipelines/application_gui.h"
11 #include "pybind/docstring.h"
13 
14 namespace cloudViewer {
15 namespace reconstruction {
16 namespace gui {
17 
18 // Reconstruction project functions have similar arguments, sharing arg
19 // docstrings
20 static const std::unordered_map<std::string, std::string>
22  {"database_path",
23  "Path to database in which to store the extracted data"},
24  {"image_path",
25  "Root path to folder which contains the images."},
26  {"import_path",
27  "The project import path containing *.ini project file."},
28  {"output_path", "The options saving output path."},
29  {"quality",
30  "The supported project processing quality types are {low, "
31  "medium, high, extreme}."}};
32 
33 void pybind_gui_methods(py::module &m) {
34  m.def("run_graphical_gui", &GraphicalUserInterface,
35  py::call_guard<py::gil_scoped_release>(),
36  "Function for the project gui application", "database_path"_a = "",
37  "image_path"_a = "", "import_path"_a = "");
38  docstring::FunctionDocInject(m, "run_graphical_gui",
40 
41  m.def("generate_project", &GenerateProject,
42  py::call_guard<py::gil_scoped_release>(),
43  "Function for the generation of project", "output_path"_a,
44  "quality"_a = "high");
45  docstring::FunctionDocInject(m, "generate_project",
47 }
48 
49 void pybind_gui(py::module &m) {
50  py::module m_submodule = m.def_submodule("gui", "Reconstruction GUI.");
51  pybind_gui_methods(m_submodule);
52 }
53 
54 } // namespace gui
55 } // namespace reconstruction
56 } // namespace cloudViewer
void FunctionDocInject(py::module &pybind_module, const std::string &function_name, const std::unordered_map< std::string, std::string > &map_parameter_body_docs)
Definition: docstring.cpp:76
void pybind_gui_methods(py::module &m)
Definition: gui.cpp:33
static const std::unordered_map< std::string, std::string > map_shared_argument_docstrings
Definition: gui.cpp:21
void pybind_gui(py::module &m)
Definition: gui.cpp:49
Generic file read and write utility for python interface.