28 #ifndef RTABMAP_CORE_EXPORTCLOUDSDIALOG_H_
29 #define RTABMAP_CORE_EXPORTCLOUDSDIALOG_H_
31 #include "rtabmap/gui/rtabmap_gui_export.h"
35 #include <QtCore/QSettings>
40 #include <pcl/point_cloud.h>
41 #include <pcl/point_types.h>
42 #include <pcl/PolygonMesh.h>
43 #include <pcl/TextureMesh.h>
44 #include <pcl/pcl_base.h>
46 class Ui_ExportCloudsDialog;
47 class QAbstractButton;
51 class GainCompensator;
63 void saveSettings(QSettings & settings,
const QString & group =
"")
const;
64 void loadSettings(QSettings & settings,
const QString & group =
"");
67 void forceAssembling(
bool enabled);
68 void setProgressDialogToMax();
73 const std::map<int, Transform> & poses,
74 const std::multimap<int, Link> & links,
75 const std::map<int, int> & mapIds,
76 const QMap<int, Signature> & cachedSignatures,
77 const std::map<
int, std::pair<pcl::PointCloud<pcl::PointXYZRGB>::Ptr, pcl::IndicesPtr> > & cachedClouds,
78 const std::map<int, LaserScan> & cachedScans,
79 const QString & workingDirectory,
83 const std::map<int, Transform> & poses,
84 const std::multimap<int, Link> & links,
85 const std::map<int, int> & mapIds,
86 const QMap<int, Signature> & cachedSignatures,
87 const std::map<
int, std::pair<pcl::PointCloud<pcl::PointXYZRGB>::Ptr, pcl::IndicesPtr> > & cachedClouds,
88 const std::map<int, LaserScan> & cachedScans,
89 const QString & workingDirectory,
92 bool getExportedClouds(
93 const std::map<int, Transform> & poses,
94 const std::multimap<int, Link> & links,
95 const std::map<int, int> & mapIds,
96 const QMap<int, Signature> & cachedSignatures,
97 const std::map<
int, std::pair<pcl::PointCloud<pcl::PointXYZRGB>::Ptr, pcl::IndicesPtr> > & cachedClouds,
98 const std::map<int, LaserScan> & cachedScans,
99 const QString & workingDirectory,
101 std::map<
int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr> & clouds,
102 std::map<int, pcl::PolygonMesh::Ptr> & meshes,
103 std::map<int, pcl::TextureMesh::Ptr> & textureMeshes,
104 std::vector<std::map<int, pcl::PointXY> > & textureVertexToPixels);
106 int getTextureSize()
const;
107 int getMaxTextures()
const;
108 bool isGainCompensation()
const;
109 double getGainBeta()
const;
110 bool isGainRGB()
const;
111 bool isBlending()
const;
112 int getBlendingDecimation()
const;
113 int getTextureBrightnessConstrastRatioLow()
const;
114 int getTextureBrightnessConstrastRatioHigh()
const;
115 bool isExposeFusion()
const;
117 static bool removeDirRecursively(
const QString & dirName);
120 void configChanged();
123 void restoreDefaults();
128 void updateReconstructionFlavor();
129 void selectDistortionModel();
130 void selectCamProjMask();
131 void updateMLSGrpVisibility();
135 std::map<int, Transform> filterNodes(
const std::map<int, Transform> & poses);
136 std::map<int, std::pair<pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr, pcl::IndicesPtr> > getClouds(
137 const std::map<int, Transform> & poses,
138 const QMap<int, Signature> & cachedSignatures,
139 const std::map<
int, std::pair<pcl::PointCloud<pcl::PointXYZRGB>::Ptr, pcl::IndicesPtr> > & cachedClouds,
140 const std::map<int, LaserScan> & cachedScans,
143 bool & scansHaveRGB)
const;
144 void saveClouds(
const QString & workingDirectory,
const std::map<int, Transform> & poses,
const std::map<
int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr> & clouds,
bool binaryMode =
true,
const std::vector<std::map<int, pcl::PointXY> > & pointToPixels = std::vector<std::map<int, pcl::PointXY> >());
145 void saveMeshes(
const QString & workingDirectory,
const std::map<int, Transform> & poses,
const std::map<int, pcl::PolygonMesh::Ptr> & meshes,
bool binaryMode =
true);
146 void saveTextureMeshes(
const QString & workingDirectory,
const std::map<int, Transform> & poses, std::map<int, pcl::TextureMesh::Ptr> & textureMeshes,
const QMap<int, Signature> & cachedSignatures,
const std::vector<std::map<int, pcl::PointXY> > & textureVertexToPixels);
149 Ui_ExportCloudsDialog *
_ui;
157 bool saveOBJFile(
const QString &path, pcl::TextureMesh::Ptr &mesh)
const;
158 bool saveOBJFile(
const QString &path, pcl::PolygonMesh &mesh)
const;