ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PointViewerWidget.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 "base/reconstruction.h"
14 #include "util/option_manager.h"
15 
16 namespace cloudViewer {
17 
18 class ModelViewerWidget;
20 
21 class PointViewerWidget : public QWidget {
22 public:
23  PointViewerWidget(QWidget* parent,
24  ModelViewerWidget* model_viewer_widget,
25  OptionManager* option);
26 
27  void Show(const colmap::point3D_t point3D_id);
28 
29 private:
30  void closeEvent(QCloseEvent* event);
31 
32  void ResizeInfoTable();
33  void ClearLocations();
34  void UpdateImages();
35  void ZoomIn();
36  void ZoomOut();
37  void Delete();
38 
39  ModelViewerWidget* model_viewer_widget_;
40 
41  OptionManager* options_;
42 
43  QPushButton* delete_button_;
44 
45  colmap::point3D_t point3D_id_;
46 
47  QTableWidget* info_table_;
48  QTableWidgetItem* xyz_item_;
49  QTableWidgetItem* rgb_item_;
50  QTableWidgetItem* error_item_;
51 
52  QTableWidget* location_table_;
53  std::vector<QPixmap> location_pixmaps_;
54  std::vector<QLabel*> location_labels_;
55  std::vector<colmap::image_t> image_ids_;
56  std::vector<double> reproj_errors_;
57  std::vector<std::string> image_names_;
58 
59  QPushButton* zoom_in_button_;
60  QPushButton* zoom_out_button_;
61 
62  double zoom_;
63 };
64 
65 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
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
colmap::Reconstruction::ExistsPoint3D
bool ExistsPoint3D(const point3D_t point3D_id) const
Definition: reconstruction.h:525
x
normal_z x
Definition: my_point_types.h:165
option_manager.h
cloudViewer::utility::filesystem::JoinPaths
std::string JoinPaths(T const &...paths)
Definition: FileSystem.h:23
colmap::OptionManager
Definition: option_manager.h:38
bitmap.h
cloudViewer::ModelViewerWidget::reconstruction
colmap::Reconstruction * reconstruction
Definition: ModelViewerWidget.h:115
colmap::Bitmap
Definition: bitmap.h:51
cloudViewer::OptionManager
colmap::OptionManager OptionManager
Definition: BundleAdjustmentWidget.h:19
cloudViewer::core::Minimum
Tensor Minimum(const Tensor &input, const Tensor &other)
Computes the element-wise minimum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:136
colmap::Point2D::XY
const Eigen::Vector2d & XY() const
Definition: point2d.h:53
colmap::BitmapToQImageRGB
QImage BitmapToQImageRGB(const Bitmap &bitmap)
Definition: qt_utils.cc:59
cloudViewer::ModelViewerWidget
Definition: ModelViewerWidget.h:37
cloudViewer::PointViewerWidget
Definition: PointViewerWidget.h:21
colmap::point3D_t
uint64_t point3D_t
Definition: types.h:72
height
int height
Definition: FileIOFactory.cpp:143
y
normal_z y
Definition: my_point_types.h:168
event
MouseEvent event
Definition: BitmapWindowSystem.cpp:61
colmap::PointViewerWidget::PointViewerWidget
PointViewerWidget(QWidget *parent, ModelViewerWidget *model_viewer_widget, OptionManager *option)
Definition: point_viewer_widget.cc:39
cloudViewer::t::geometry::path
static const std::string path
Definition: PointCloud.cpp:59
misc.h
cloudViewer::ModelViewerWidget::images
std::unordered_map< colmap::image_t, colmap::Image > images
Definition: ModelViewerWidget.h:117
cloudViewer::ModelViewerWidget::cameras
std::unordered_map< colmap::camera_t, colmap::Camera > cameras
Definition: ModelViewerWidget.h:116
colmap::Point2D::Y
double Y() const
Definition: point2d.h:59
cloudViewer::PointViewerWidget::Show
void Show(const colmap::point3D_t point3D_id)
Definition: PointViewerWidget.cpp:107
qt_utils.h
ecvColor::green
constexpr Rgb green(0, MAX, 0)
colmap::Point2D
Definition: point2d.h:20
colmap::Reconstruction::DeletePoint3D
void DeletePoint3D(const point3D_t point3D_id)
Definition: reconstruction.cc:262
reconstruction.h
image
std::shared_ptr< core::Tensor > image
Definition: FilamentRenderer.cpp:184
cloudViewer::ModelViewerWidget::ReloadReconstruction
void ReloadReconstruction()
Definition: ModelViewerWidget.cpp:166
colmap::Bitmap::Read
bool Read(const std::string &path, const bool as_rgb=true)
Definition: bitmap.cc:485
colmap::kInvalidPoint3DId
const point3D_t kInvalidPoint3DId
Definition: types.h:80
ModelViewerWidget.h
cloudViewer::ModelViewerWidget::points3D
std::unordered_map< colmap::point3D_t, colmap::Point3D > points3D
Definition: ModelViewerWidget.h:118
colmap
Definition: AutomaticReconstructionController.h:17
ecvColor::red
constexpr Rgb red(MAX, 0, 0)
colmap::Point2D::X
double X() const
Definition: point2d.h:57
cloudViewer::PointViewerWidget::PointViewerWidget
PointViewerWidget(QWidget *parent, ModelViewerWidget *model_viewer_widget, OptionManager *option)
Definition: PointViewerWidget.cpp:19
patch::to_string
std::string to_string(const T &n)
Definition: Common.h:20
colmap::ProjectPointToImage
Eigen::Vector2d ProjectPointToImage(const Eigen::Vector3d &point3D, const Eigen::Matrix3x4d &proj_matrix, const Camera &camera)
Definition: projection.cc:104
cloudViewer::geometry::Image
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Definition: Image.h:33
colmap::Camera
Definition: camera.h:20
PointViewerWidget.h