Files
rtabmap_ros/guilib/include/rtabmap/gui/DatabaseViewer.h
T

99 lines
2.6 KiB
C++
Raw Normal View History

/*
* Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke
*
* This file is part of RTAB-Map.
*
* RTAB-Map is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RTAB-Map is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RTAB-Map. If not, see <http://www.gnu.org/licenses/>.
*/
2012-12-11 18:05:05 +00:00
#ifndef DATABASEVIEWER_H_
#define DATABASEVIEWER_H_
2013-12-12 22:36:56 +00:00
#include "rtabmap/gui/RtabmapGuiExp.h" // DLL export/import defines
#include <QtGui/QMainWindow>
#include <QtCore/QByteArray>
#include <QtCore/QMap>
#include <QtCore/QSet>
#include <QtGui/QImage>
#include <opencv2/core/core.hpp>
2012-03-03 01:46:30 +00:00
#include <opencv2/features2d/features2d.hpp>
#include <set>
#include <rtabmap/core/Link.h>
2012-12-11 18:05:05 +00:00
class Ui_DatabaseViewer;
2012-03-03 01:46:30 +00:00
class QGraphicsScene;
2012-06-24 17:19:34 +00:00
class QGraphicsView;
class QLabel;
namespace rtabmap
{
2012-06-24 17:19:34 +00:00
class Memory;
2013-12-11 00:12:44 +00:00
class ImageView;
}
2013-12-12 22:36:56 +00:00
class RTABMAPGUI_EXP DatabaseViewer : public QMainWindow
{
Q_OBJECT
public:
2012-12-11 18:05:05 +00:00
DatabaseViewer(QWidget * parent = 0);
virtual ~DatabaseViewer();
bool openDatabase(const QString & path);
private slots:
void openDatabase();
void generateGraph();
2014-01-22 19:49:28 +00:00
void exportDatabase();
void extractImages();
void generateLocalGraph();
void generateTOROGraph();
void view3DMap();
2013-12-11 00:12:44 +00:00
void generate3DMap();
void sliderAValueChanged(int);
void sliderBValueChanged(int);
void sliderAMoved(int);
void sliderBMoved(int);
void sliderNeighborValueChanged(int);
void sliderLoopValueChanged(int);
void sliderIterationsValueChanged(int);
void updateGraphView();
private:
void updateIds();
2012-06-24 17:19:34 +00:00
void update(int value,
QLabel * labelIndex,
QLabel * labelParents,
QLabel * labelChildren,
2013-12-11 00:12:44 +00:00
rtabmap::ImageView * view,
2012-06-24 17:19:34 +00:00
QLabel * labelId);
void updateConstraintView(const rtabmap::Link & link);
private:
2012-12-11 18:05:05 +00:00
Ui_DatabaseViewer * ui_;
QList<int> ids_;
QMap<int, int> idToIndex_;
QList<rtabmap::Link> neighborLinks_;
QList<rtabmap::Link> loopLinks_;
2012-06-24 17:19:34 +00:00
rtabmap::Memory * memory_;
QString pathDatabase_;
std::list<std::map<int, rtabmap::Transform> > graphes_;
std::map<int, rtabmap::Transform> poses_;
std::multimap<int, rtabmap::Link> links_;
std::map<int, std::vector<unsigned char> > scans_;
};
2012-12-11 18:05:05 +00:00
#endif /* DATABASEVIEWER_H_ */