PdfPlot.h
Go to the documentation of this file.
00001 // Taken from RTAB-Map library r606 [www.rtabmap.googlecode.com]
00002 
00003 /*
00004  * Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke
00005  *
00006  * This file is part of RTAB-Map.
00007  *
00008  * RTAB-Map is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 3 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * RTAB-Map is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with RTAB-Map.  If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 #ifndef PDFPLOT_H_
00023 #define PDFPLOT_H_
00024 
00025 #include "utilite/UPlot.h"
00026 
00027 namespace rtabmap {
00028 
00029 class PdfPlotItem : public UPlotItem
00030 {
00031 public:
00032         PdfPlotItem(float dataX, float dataY, float width, int childCount = -1);
00033         virtual ~PdfPlotItem();
00034 
00035         void setLikelihood(int id, float value, int childCount);
00036         void setImagesRef(const QMap<int, QByteArray> * imagesRef) {_imagesRef = imagesRef;}
00037 
00038         float value() const {return this->data().y();}
00039         int id() const {return this->data().x();}
00040 
00041 protected:
00042         virtual void showDescription(bool shown);
00043 
00044 private:
00045         QGraphicsTextItem * _text;
00046         QGraphicsPixmapItem * _img;
00047         int _childCount;
00048         const QMap<int, QByteArray> * _imagesRef;
00049 
00050 };
00051 
00052 class PdfPlotCurve : public UPlotCurve
00053 {
00054         Q_OBJECT
00055 
00056 public:
00057         PdfPlotCurve(const QString & name, const QMap<int, QByteArray> * imagesMapRef, QObject * parent = 0);
00058         virtual ~PdfPlotCurve();
00059 
00060         virtual void clear();
00061         void setData(const QMap<int, int> & dataMap, const QMap<int, int> & weightsMap);
00062 
00063 private:
00064         const QMap<int, QByteArray> * _imagesMapRef;
00065 };
00066 
00067 }
00068 
00069 #endif /* PDFPLOT_H_ */


find_object_2d
Author(s): Mathieu Labbe
autogenerated on Thu Aug 27 2015 13:00:33