ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
dense_reconstruction_widget.h
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 
8 #pragma once
9 
10 #include <QtCore>
11 #include <QtWidgets>
12 
13 #include "mvs/fusion.h"
14 #include "ui/image_viewer_widget.h"
15 #include "ui/options_widget.h"
17 #include "util/option_manager.h"
18 
19 namespace colmap {
20 
21 class MainWindow;
22 
23 class DenseReconstructionOptionsWidget : public QWidget {
24 public:
25  DenseReconstructionOptionsWidget(QWidget* parent, OptionManager* options);
26 };
27 
28 class DenseReconstructionWidget : public QWidget {
29 public:
30  DenseReconstructionWidget(MainWindow* main_window, OptionManager* options);
31 
32  void Show(Reconstruction* reconstruction);
33 
34 private:
35  void showEvent(QShowEvent* event);
36 
37  void Undistort();
38  void Stereo();
39  void Fusion();
40  void PoissonMeshing();
41  void DelaunayMeshing();
42  void Texturing();
43 
44  void SelectWorkspacePath();
45  std::string GetWorkspacePath();
46  void RefreshWorkspace();
47 
48  void WriteFusedPoints();
49  void ShowMeshingInfo();
50 
51  QWidget* GenerateTableButtonWidget(const std::string& image_name,
52  const std::string& type);
53 
54  MainWindow* main_window_;
55  OptionManager* options_;
56  Reconstruction* reconstruction_;
57  ThreadControlWidget* thread_control_widget_;
58  DenseReconstructionOptionsWidget* options_widget_;
59  ImageViewerWidget* image_viewer_widget_;
60  QLineEdit* workspace_path_text_;
61  QTableWidget* table_widget_;
62  QPushButton* undistortion_button_;
63  QPushButton* stereo_button_;
64  QPushButton* fusion_button_;
65  QPushButton* poisson_meshing_button_;
66  QPushButton* delaunay_meshing_button_;
67  QPushButton* texturing_button_;
68  QAction* refresh_workspace_action_;
69  QAction* write_fused_points_action_;
70  QAction* show_meshing_info_action_;
71 
72  bool photometric_done_;
73  bool geometric_done_;
74 
75  std::string images_path_;
76  std::string depth_maps_path_;
77  std::string normal_maps_path_;
78 
79  std::vector<PlyPoint> fused_points_;
80  std::vector<std::vector<int>> fused_points_visibility_;
81 };
82 
83 } // namespace colmap
colmap::OptionManager::image_path
std::shared_ptr< std::string > image_path
Definition: option_manager.h:100
QtCompat::endl
QTextStream & endl(QTextStream &stream)
Definition: QtCompat.h:718
fusion.h
colmap::ThreadControlWidget
Definition: thread_control_widget.h:17
texturing_controller.h
colmap::ImageViewerWidget::ShowBitmap
void ShowBitmap(const Bitmap &bitmap)
Definition: image_viewer_widget.cc:107
colmap::DenseReconstructionWidget
Definition: dense_reconstruction_widget.h:28
option_manager.h
colmap::ThreadControlWidget::StartThread
void StartThread(const QString &progress_text, const bool stoppable, Thread *thread)
Definition: thread_control_widget.cc:53
colmap::DenseReconstructionOptionsWidget::DenseReconstructionOptionsWidget
DenseReconstructionOptionsWidget(QWidget *parent, OptionManager *options)
Definition: dense_reconstruction_widget.cc:261
colmap::ReconstructionManagerWidget::Update
void Update()
Definition: reconstruction_manager_widget.cc:50
colmap::ExistsFile
bool ExistsFile(const std::string &path)
Definition: misc.cc:100
colmap::OptionManager
Definition: option_manager.h:38
data
GraphType data
Definition: graph_cut.cc:138
colmap::OptionManager::delaunay_meshing
std::shared_ptr< mvs::DelaunayMeshingOptions > delaunay_meshing
Definition: option_manager.h:119
colmap::JoinPaths
std::string JoinPaths(T const &... paths)
Definition: misc.h:128
colmap::Thread::FINISHED_CALLBACK
@ FINISHED_CALLBACK
Definition: threading.h:78
cloudViewer::OptionManager
colmap::OptionManager OptionManager
Definition: BundleAdjustmentWidget.h:19
colmap::OptionsWidget::showEvent
void showEvent(QShowEvent *event)
Definition: options_widget.cc:268
colmap::ReconstructionManager::Get
const Reconstruction & Get(const size_t idx) const
Definition: reconstruction_manager.cc:56
colmap::ReconstructionManager::Add
size_t Add()
Definition: reconstruction_manager.cc:64
colmap::WriteBinaryPlyPoints
void WriteBinaryPlyPoints(const std::string &path, const std::vector< PlyPoint > &points, const bool write_normal, const bool write_rgb)
Definition: ply.cc:369
undistortion.h
colmap::Reconstruction
Definition: reconstruction.h:40
colmap::ThreadControlWidget::StartFunction
void StartFunction(const QString &progress_text, const std::function< void()> &func)
Definition: thread_control_widget.cc:97
colmap::ImageViewerWidget
Definition: image_viewer_widget.h:33
meshing.h
colmap::ImageViewerWidget::ReadAndShow
void ReadAndShow(const std::string &path)
Definition: image_viewer_widget.cc:121
event
MouseEvent event
Definition: BitmapWindowSystem.cpp:61
MainWindow
Definition: MainWindow.h:117
colmap::DenseReconstructionOptionsWidget
Definition: dense_reconstruction_widget.h:23
colmap::OptionManager::render
std::shared_ptr< RenderOptions > render
Definition: option_manager.h:122
Eigen::Vector3ub
Matrix< uint8_t, 3, 1 > Vector3ub
Definition: types.h:42
dense_reconstruction_widget.h
options_widget.h
colmap::OptionManager::poisson_meshing
std::shared_ptr< mvs::PoissonMeshingOptions > poisson_meshing
Definition: option_manager.h:118
colmap::ExistsDir
bool ExistsDir(const std::string &path)
Definition: misc.cc:104
colmap::DenseReconstructionWidget::Show
void Show(Reconstruction *reconstruction)
Definition: dense_reconstruction_widget.cc:441
thread_control_widget.h
colmap::mvs::WritePointsVisibility
void WritePointsVisibility(const std::string &path, const std::vector< std::vector< int >> &points_visibility)
Definition: fusion.cc:635
colmap::MainWindow
Definition: main_window.h:36
colmap::OptionManager::project_path
std::shared_ptr< std::string > project_path
Definition: option_manager.h:98
colmap::Reconstruction::NumRegImages
size_t NumRegImages() const
Definition: reconstruction.h:440
colmap::StringTrim
void StringTrim(std::string *str)
Definition: string.cc:188
colmap::OptionManager::patch_match_stereo
std::shared_ptr< mvs::PatchMatchOptions > patch_match_stereo
Definition: option_manager.h:116
colmap::OptionManager::database_path
std::shared_ptr< std::string > database_path
Definition: option_manager.h:99
colmap::ReconstructionManagerWidget::SelectReconstruction
void SelectReconstruction(const size_t idx)
Definition: reconstruction_manager_widget.cc:104
colmap::GetParentDir
std::string GetParentDir(const std::string &path)
Definition: misc.cc:128
image_viewer_widget.h
colmap::OptionManager::stereo_fusion
std::shared_ptr< mvs::StereoFusionOptions > stereo_fusion
Definition: option_manager.h:117
colmap
Definition: AutomaticReconstructionController.h:17
colmap::DenseReconstructionWidget::DenseReconstructionWidget
DenseReconstructionWidget(MainWindow *main_window, OptionManager *options)
Definition: dense_reconstruction_widget.cc:280
colmap::StringPrintf
std::string StringPrintf(const char *format,...)
Definition: string.cc:131
type
char type
Definition: FileIOFactory.cpp:131
colmap::mvs::PoissonMeshing
bool PoissonMeshing(const PoissonMeshingOptions &options, const std::string &input_path, const std::string &output_path)
Definition: meshing.cc:123
colmap::OptionManager::texturing
std::shared_ptr< TexturingOptions > texturing
Definition: option_manager.h:120
patch_match.h
main_window.h