AboutDialog.cpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the Universite de Sherbrooke nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
32 #include "rtabmap/core/Optimizer.h"
33 #include "ui_aboutDialog.h"
34 #include <opencv2/core/version.hpp>
35 #include <pcl/pcl_config.h>
36 #include <vtkVersion.h>
37 
38 namespace rtabmap {
39 
40 AboutDialog::AboutDialog(QWidget * parent) :
41  QDialog(parent)
42 {
43  _ui = new Ui_aboutDialog();
44  _ui->setupUi(this);
45  QString version = Parameters::getVersion().c_str();
46  QString cv_version = CV_VERSION;
47 #if CV_MAJOR_VERSION < 3
48  #ifdef RTABMAP_NONFREE
49  _ui->label_opencv_license->setText("Not Commercial [With nonfree module]");
50  #else
51  _ui->label_opencv_license->setText("BSD [Without nonfree module]");
52  #endif
53 #elif defined(HAVE_OPENCV_XFEATURES2D)
54  #ifdef RTABMAP_NONFREE
55  _ui->label_opencv_license->setText("Not Commercial [With xfeatures2d and nonfree modules]");
56  #else
57  #if CV_MAJOR_VERSION < 4 || (CV_MAJOR_VERSION==4 && CV_MINOR_VERSION<5)
58  _ui->label_opencv_license->setText("BSD [With xfeatures2d module]");
59  #else
60  _ui->label_opencv_license->setText("Apache 3 [With xfeatures2d module]");
61  #endif
62  #endif
63 #else
64  #if CV_MAJOR_VERSION < 4 || (CV_MAJOR_VERSION==4 && CV_MINOR_VERSION<5)
65  _ui->label_opencv_license->setText("BSD [Without xfeatures2d and nonfree modules]");
66  #else
67  _ui->label_opencv_license->setText("Apache 3 [Without xfeatures2d and nonfree modules]");
68  #endif
69 #endif
70  _ui->label_version->setText(version);
71  _ui->label_opencv_version->setText(cv_version);
72  _ui->label_pcl_version->setText(PCL_VERSION_PRETTY);
73  _ui->label_vtk_version->setText(vtkVersion::GetVTKVersion());
74  _ui->label_qt_version->setText(qVersion());
75 #ifdef RTABMAP_ORB_OCTREE
76  _ui->label_orboctree->setText("Yes");
77  _ui->label_orboctree_license->setEnabled(true);
78 #else
79  _ui->label_orboctree->setText("No");
80  _ui->label_orboctree_license->setEnabled(false);
81 #endif
82 #ifdef RTABMAP_TORCH
83  _ui->label_sptorch->setText("Yes");
84  _ui->label_sptorch_license->setEnabled(true);
85 #else
86  _ui->label_sptorch->setText("No");
87  _ui->label_sptorch_license->setEnabled(false);
88 #endif
89 #ifdef RTABMAP_PYTHON
90  _ui->label_pymatcher->setText("Yes");
91  _ui->label_pymatcher_license->setEnabled(true);
92 #else
93  _ui->label_pymatcher->setText("No");
94  _ui->label_pymatcher_license->setEnabled(false);
95 #endif
96 #ifdef RTABMAP_FASTCV
97  _ui->label_fastcv->setText("Yes");
98  _ui->label_fastcv_license->setEnabled(true);
99 #else
100  _ui->label_fastcv->setText("No");
101  _ui->label_fastcv_license->setEnabled(false);
102 #endif
103 #ifdef RTABMAP_OCTOMAP
104  _ui->label_octomap->setText("Yes");
105  _ui->label_octomap_license->setEnabled(true);
106 #else
107  _ui->label_octomap->setText("No");
108  _ui->label_octomap_license->setEnabled(false);
109 #endif
110 #ifdef RTABMAP_CPUTSDF
111  _ui->label_cputsdf->setText("Yes");
112  _ui->label_cputsdf_license->setEnabled(true);
113 #else
114  _ui->label_cputsdf->setText("No");
115  _ui->label_cputsdf_license->setEnabled(false);
116 #endif
117 #ifdef RTABMAP_OPENCHISEL
118  _ui->label_openchisel->setText("Yes");
119 #else
120  _ui->label_openchisel->setText("No");
121 #endif
122 #ifdef RTABMAP_ALICE_VISION
123  _ui->label_aliceVision->setText("Yes");
124  _ui->label_aliceVision_license->setEnabled(true);
125 #else
126  _ui->label_aliceVision->setText("No");
127  _ui->label_aliceVision_license->setEnabled(false);
128 #endif
129 
130  _ui->label_freenect->setText(CameraFreenect::available()?"Yes":"No");
131  _ui->label_freenect_license->setEnabled(CameraFreenect::available());
132  _ui->label_openni2->setText(CameraOpenNI2::available()?"Yes":"No");
133  _ui->label_openni2_license->setEnabled(CameraOpenNI2::available());
134  _ui->label_freenect2->setText(CameraFreenect2::available()?"Yes":"No");
135  _ui->label_freenect2_license->setEnabled(CameraFreenect2::available());
136  _ui->label_realsense->setText(CameraRealSense::available() ? "Yes" : "No");
137  _ui->label_realsense_license->setEnabled(CameraRealSense::available());
138  _ui->label_realsense2->setText(CameraRealSense2::available() ? "Yes" : "No");
139  _ui->label_realsense2_license->setEnabled(CameraRealSense2::available());
140  _ui->label_dc1394->setText(CameraStereoDC1394::available()?"Yes":"No");
141  _ui->label_dc1394_license->setEnabled(CameraStereoDC1394::available());
142  _ui->label_flycapture2->setText(CameraStereoFlyCapture2::available()?"Yes":"No");
143  _ui->label_zed->setText(CameraStereoZed::available()?"Yes":"No");
144  _ui->label_zedOC->setText(CameraStereoZedOC::available()?"Yes":"No");
145  _ui->label_zedOC_license->setEnabled(CameraStereoZedOC::available());
146  _ui->label_k4w2->setText(CameraK4W2::available() ? "Yes" : "No");
147  _ui->label_k4a->setText(CameraK4A::available() ? "Yes" : "No");
148  _ui->label_mynteye->setText(CameraMyntEye::available() ? "Yes" : "No");
149  _ui->label_depthai->setText(CameraDepthAI::available() ? "Yes" : "No");
150  _ui->label_depthai_license->setEnabled(CameraDepthAI::available());
151 
152  _ui->label_toro->setText(Optimizer::isAvailable(Optimizer::kTypeTORO)?"Yes":"No");
153  _ui->label_toro_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeTORO)?true:false);
154  _ui->label_g2o->setText(Optimizer::isAvailable(Optimizer::kTypeG2O)?"Yes":"No");
155  _ui->label_g2o_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeG2O)?true:false);
156  _ui->label_gtsam->setText(Optimizer::isAvailable(Optimizer::kTypeGTSAM)?"Yes":"No");
157  _ui->label_gtsam_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeGTSAM)?true:false);
158  _ui->label_cvsba->setText(Optimizer::isAvailable(Optimizer::kTypeCVSBA)?"Yes":"No");
159  _ui->label_cvsba_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeCVSBA)?true:false);
160  _ui->label_ceres->setText(Optimizer::isAvailable(Optimizer::kTypeCeres)?"Yes":"No");
161  _ui->label_ceres_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeCeres)?true:false);
162 
163 #ifdef RTABMAP_POINTMATCHER
164  _ui->label_libpointmatcher->setText("Yes");
165  _ui->label_libpointmatcher_license->setEnabled(true);
166 #else
167  _ui->label_libpointmatcher->setText("No");
168  _ui->label_libpointmatcher_license->setEnabled(false);
169 #endif
170 
171 #ifdef RTABMAP_CCCORELIB
172  _ui->label_cccorelib->setText("Yes");
173  _ui->label_cccorelib_license->setEnabled(true);
174 #else
175  _ui->label_cccorelib->setText("No");
176  _ui->label_cccorelib_license->setEnabled(false);
177 #endif
178 
179 #ifdef RTABMAP_FOVIS
180  _ui->label_fovis->setText("Yes");
181  _ui->label_fovis_license->setEnabled(true);
182 #else
183  _ui->label_fovis->setText("No");
184  _ui->label_fovis_license->setEnabled(false);
185 #endif
186 #ifdef RTABMAP_VISO2
187  _ui->label_viso2->setText("Yes");
188  _ui->label_viso2_license->setEnabled(true);
189 #else
190  _ui->label_viso2->setText("No");
191  _ui->label_viso2_license->setEnabled(false);
192 #endif
193 #ifdef RTABMAP_DVO
194  _ui->label_dvo->setText("Yes");
195  _ui->label_dvo_license->setEnabled(true);
196 #else
197  _ui->label_dvo->setText("No");
198  _ui->label_dvo_license->setEnabled(false);
199 #endif
200 #ifdef RTABMAP_ORB_SLAM
201 #if RTABMAP_ORB_SLAM == 3
202  _ui->label_orbslam_title->setText("With ORB SLAM3 :");
203 #elif RTABMAP_ORB_SLAM == 2
204  _ui->label_orbslam_title->setText("With ORB SLAM2 :");
205 #endif
206  _ui->label_orbslam->setText("Yes");
207  _ui->label_orbslam_license->setEnabled(true);
208 #else
209  _ui->label_orbslam->setText("No");
210  _ui->label_orbslam_license->setEnabled(false);
211 #endif
212 
213 #ifdef RTABMAP_OKVIS
214  _ui->label_okvis->setText("Yes");
215  _ui->label_okvis_license->setEnabled(true);
216 #else
217  _ui->label_okvis->setText("No");
218  _ui->label_okvis_license->setEnabled(false);
219 #endif
220 
221 #ifdef RTABMAP_LOAM
222  _ui->label_loam->setText("Yes");
223  _ui->label_loam_license->setEnabled(true);
224 #else
225  _ui->label_loam->setText("No");
226  _ui->label_loam_license->setEnabled(false);
227 #endif
228 
229 #ifdef RTABMAP_MSCKF_VIO
230  _ui->label_msckf->setText("Yes");
231  _ui->label_msckf_license->setEnabled(true);
232 #else
233  _ui->label_msckf->setText("No");
234  _ui->label_msckf_license->setEnabled(false);
235 #endif
236 
237 #ifdef RTABMAP_VINS
238  _ui->label_vins_fusion->setText("Yes");
239  _ui->label_vins_fusion_license->setEnabled(true);
240 #else
241  _ui->label_vins_fusion->setText("No");
242  _ui->label_vins_fusion_license->setEnabled(false);
243 #endif
244 
245 #ifdef RTABMAP_OPENVINS
246  _ui->label_openvins->setText("Yes");
247  _ui->label_openvins_license->setEnabled(true);
248 #else
249  _ui->label_openvins->setText("No");
250  _ui->label_openvins_license->setEnabled(false);
251 #endif
252 
253 }
254 
256 {
257  delete _ui;
258 }
259 
260 }
static std::string getVersion()
Definition: Parameters.cpp:82
Ui_aboutDialog * _ui
Definition: AboutDialog.h:50
AboutDialog(QWidget *parent=0)
Definition: AboutDialog.cpp:40
static bool isAvailable(Optimizer::Type type)
Definition: Optimizer.cpp:47
static bool available()
Definition: CameraK4A.cpp:42
static bool available()
Definition: CameraK4W2.cpp:53


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:37:27