/* * 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 . */ #ifndef DATABASEVIEWER_H_ #define DATABASEVIEWER_H_ #include "rtabmap/gui/RtabmapGuiExp.h" // DLL export/import defines #include #include #include #include #include #include #include #include #include class Ui_DatabaseViewer; class QGraphicsScene; class QGraphicsView; class QLabel; namespace rtabmap { class Memory; class ImageView; } class RTABMAPGUI_EXP DatabaseViewer : public QMainWindow { Q_OBJECT public: DatabaseViewer(QWidget * parent = 0); virtual ~DatabaseViewer(); bool openDatabase(const QString & path); private slots: void openDatabase(); void generateGraph(); void exportDatabase(); void extractImages(); void generateLocalGraph(); void generateTOROGraph(); void view3DMap(); 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(); void update(int value, QLabel * labelIndex, QLabel * labelParents, QLabel * labelChildren, rtabmap::ImageView * view, QLabel * labelId); void updateConstraintView(const rtabmap::Link & link); private: Ui_DatabaseViewer * ui_; QList ids_; QMap idToIndex_; QList neighborLinks_; QList loopLinks_; rtabmap::Memory * memory_; QString pathDatabase_; std::list > graphes_; std::map poses_; std::multimap links_; std::map > scans_; }; #endif /* DATABASEVIEWER_H_ */