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 #if DEMO_BUILD
47  version.append(" [DEMO]");
48 #endif
49  QString cv_version = CV_VERSION;
50 #if CV_MAJOR_VERSION < 3
51  #ifdef RTABMAP_NONFREE
52  cv_version.append(" [With nonfree]");
53  _ui->label_opencv_license->setText("Not Commercial");
54  #else
55  cv_version.append(" [Without nonfree]");
56  _ui->label_opencv_license->setText("BSD");
57  #endif
58 #elif defined(HAVE_OPENCV_XFEATURES2D)
59  #ifdef RTABMAP_NONFREE
60  cv_version.append(" [With xfeatures2d, nonfree]");
61  _ui->label_opencv_license->setText("Not Commercial");
62  #else
63  cv_version.append(" [With xfeatures2d]");
64  _ui->label_opencv_license->setText("BSD");
65  #endif
66 #else
67  cv_version.append(" [Without xfeatures2d and nonfree]");
68  _ui->label_opencv_license->setText("BSD");
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_SUPERPOINT_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_PYMATCHER
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_k4w2->setText(CameraK4W2::available() ? "Yes" : "No");
145  _ui->label_k4a->setText(CameraK4A::available() ? "Yes" : "No");
146  _ui->label_mynteye->setText(CameraMyntEye::available() ? "Yes" : "No");
147 
148  _ui->label_toro->setText(Optimizer::isAvailable(Optimizer::kTypeTORO)?"Yes":"No");
149  _ui->label_toro_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeTORO)?true:false);
150  _ui->label_g2o->setText(Optimizer::isAvailable(Optimizer::kTypeG2O)?"Yes":"No");
151  _ui->label_g2o_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeG2O)?true:false);
152  _ui->label_gtsam->setText(Optimizer::isAvailable(Optimizer::kTypeGTSAM)?"Yes":"No");
153  _ui->label_gtsam_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeGTSAM)?true:false);
154  _ui->label_cvsba->setText(Optimizer::isAvailable(Optimizer::kTypeCVSBA)?"Yes":"No");
155  _ui->label_cvsba_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeCVSBA)?true:false);
156  _ui->label_ceres->setText(Optimizer::isAvailable(Optimizer::kTypeCeres)?"Yes":"No");
157  _ui->label_ceres_license->setEnabled(Optimizer::isAvailable(Optimizer::kTypeCeres)?true:false);
158 
159 #ifdef RTABMAP_POINTMATCHER
160  _ui->label_libpointmatcher->setText("Yes");
161  _ui->label_libpointmatcher_license->setEnabled(true);
162 #else
163  _ui->label_libpointmatcher->setText("No");
164  _ui->label_libpointmatcher_license->setEnabled(false);
165 #endif
166 
167 #ifdef RTABMAP_FOVIS
168  _ui->label_fovis->setText("Yes");
169  _ui->label_fovis_license->setEnabled(true);
170 #else
171  _ui->label_fovis->setText("No");
172  _ui->label_fovis_license->setEnabled(false);
173 #endif
174 #ifdef RTABMAP_VISO2
175  _ui->label_viso2->setText("Yes");
176  _ui->label_viso2_license->setEnabled(true);
177 #else
178  _ui->label_viso2->setText("No");
179  _ui->label_viso2_license->setEnabled(false);
180 #endif
181 #ifdef RTABMAP_DVO
182  _ui->label_dvo->setText("Yes");
183  _ui->label_dvo_license->setEnabled(true);
184 #else
185  _ui->label_dvo->setText("No");
186  _ui->label_dvo_license->setEnabled(false);
187 #endif
188 #ifdef RTABMAP_ORB_SLAM2
189  _ui->label_orbslam2->setText("Yes");
190  _ui->label_orbslam2_license->setEnabled(true);
191 #else
192  _ui->label_orbslam2->setText("No");
193  _ui->label_orbslam2_license->setEnabled(false);
194 #endif
195 
196 #ifdef RTABMAP_OKVIS
197  _ui->label_okvis->setText("Yes");
198  _ui->label_okvis_license->setEnabled(true);
199 #else
200  _ui->label_okvis->setText("No");
201  _ui->label_okvis_license->setEnabled(false);
202 #endif
203 
204 #ifdef RTABMAP_LOAM
205  _ui->label_loam->setText("Yes");
206  _ui->label_loam_license->setEnabled(true);
207 #else
208  _ui->label_loam->setText("No");
209  _ui->label_loam_license->setEnabled(false);
210 #endif
211 
212 #ifdef RTABMAP_MSCKF_VIO
213  _ui->label_msckf->setText("Yes");
214  _ui->label_msckf_license->setEnabled(true);
215 #else
216  _ui->label_msckf->setText("No");
217  _ui->label_msckf_license->setEnabled(false);
218 #endif
219 
220 }
221 
223 {
224  delete _ui;
225 }
226 
227 }
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 Dec 14 2020 03:34:58