VAT  3.0
Video Analysis Tool
drawInterface.h
1 #ifndef DRAWINTERFACE_H
2 #define DRAWINTERFACE_H
3 
4 #include <map>
5 #include <string>
6 #include <QImage>
7 #include <QPainter>
8 #include <QDir>
9 #include "string.h"
10 #include "Datapool.h"
11 
12 #include "QtXml/QDomDocument"
13 
14 
15 typedef std::map<std::string, std::map<std::string, std::string> >* TParameterList;
16 
17 /*
18 enum DrawType {
19  SETBLOBS,
20  OTHER
21 };
22 */
24 {
25 public:
26  drawInterface(Datapool *i_data);
27  virtual ~drawInterface() = 0;
28 
29  //Set module configuration parameters
30  virtual bool setParameters(QDomNode &config) = 0;
31 
32  //Initialization after reading parameters
33  virtual bool init() = 0;
34 
35  //Function executed at each frame
36  virtual bool draw(QImage **image) = 0;
37 
38  static QDomNode getParameterNode(QString pname, QDomElement& elem);
39  static QDomNode getParameterNode(QString pname, QDomNode& node);
40  static QString getParameterValue(QDomNode& node);
41  static QString getParameterValue(QDomElement& elem);
42  static void copyBytes(QImage *im1, QImage *im2);
43  static void showPolygon3D(QPainter& painter, SceneModel *i_pSmNode, QSharedPointer < polygon3D<double> > poly, const QColor& color);
44  static void showImagePolygon(QPainter& painter, QSharedPointer < polygon2D<int> > poly, const QColor& color);
45  static void paintImageLine(QPainter& painter, point2D<int> *pointBegin, point2D<int> *pointEnd, const QColor& color);
46  static int get2Dfrom3D(SceneModel *i_pSmNode, point3D<double> *point3D, point2D<double> *point2D);
47  static void paintLine(QPainter& painter, point2D<double> *pointBegin, point2D<double> *pointEnd);
48 
49  std::string name;
50 protected:
51  //Reference to external datapool:
52  Datapool *m_data;
53 };
54 
55 #endif // DRAWINTERFACE_H
Definition: calibration.h:51
Definition: drawInterface.h:23
An object of this class is instantiated at main code, and this object is used by every class to push ...
Definition: Datapool.h:39
Definition: geometric.h:256
Definition: geometric.h:224