2011-06-05 14:45:39 +00:00
|
|
|
/*
|
|
|
|
|
* 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/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef MAINWINDOW_H_
|
|
|
|
|
#define MAINWINDOW_H_
|
|
|
|
|
|
|
|
|
|
#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>
|
2011-06-05 14:45:39 +00:00
|
|
|
#include <set>
|
|
|
|
|
|
|
|
|
|
class Ui_MainWindow;
|
2012-03-03 01:46:30 +00:00
|
|
|
class QGraphicsScene;
|
2012-06-24 17:19:34 +00:00
|
|
|
class QGraphicsView;
|
|
|
|
|
class QLabel;
|
2011-06-05 14:45:39 +00:00
|
|
|
|
|
|
|
|
namespace rtabmap
|
|
|
|
|
{
|
2012-06-24 17:19:34 +00:00
|
|
|
class Memory;
|
2011-06-05 14:45:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
MainWindow(QWidget * parent = 0);
|
|
|
|
|
virtual ~MainWindow();
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void openDatabase();
|
|
|
|
|
void cleanDatabase();
|
|
|
|
|
void cleanLocalGraph();
|
|
|
|
|
void generateGraph();
|
|
|
|
|
void generateLocalGraph();
|
|
|
|
|
void sliderAValueChanged(int);
|
|
|
|
|
void sliderBValueChanged(int);
|
|
|
|
|
void sliderAMoved(int);
|
|
|
|
|
void sliderBMoved(int);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void updateIds();
|
|
|
|
|
QImage ipl2QImage(const IplImage *newImage);
|
2012-03-03 01:46:30 +00:00
|
|
|
void drawKeypoints(const std::multimap<int, cv::KeyPoint> & refWords, QGraphicsScene * scene);
|
2012-06-24 17:19:34 +00:00
|
|
|
void update(int value,
|
|
|
|
|
QLabel * labelIndex,
|
|
|
|
|
QLabel * labelActions,
|
|
|
|
|
QLabel * labelParents,
|
|
|
|
|
QLabel * labelChildren,
|
|
|
|
|
QGraphicsView * view,
|
|
|
|
|
QLabel * labelId);
|
2011-06-05 14:45:39 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui_MainWindow * ui_;
|
|
|
|
|
QMap<int, QByteArray> imagesMap_;
|
|
|
|
|
QList<int> ids_;
|
2012-06-24 17:19:34 +00:00
|
|
|
rtabmap::Memory * memory_;
|
2011-06-05 14:45:39 +00:00
|
|
|
QString pathDatabase_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* MAINWINDOW_H_ */
|