source: pacpussensors/trunk/Vislab/VislabViewerComponent.hpp@ 149

Last change on this file since 149 was 148, checked in by ldecherf, 7 years ago

Ajout VislabViewerComponent

File size: 1.7 KB
Line 
1#ifndef DEF_VISLAB_VIEWER_COMPONENT_HPP
2#define DEF_VISLAB_VIEWER_COMPONENT_HPP
3
4
5// Includes, qt.
6#include <QTimer>
7#include <QObject>
8
9// Includes, pacpus.
10#include <Pacpus/kernel/ComponentBase.h>
11#include <Pacpus/kernel/DbiteFile.h>
12#include <Pacpus/kernel/pacpus.h>
13
14// Includes, opencv.
15#include <opencv/cv.h>
16#include <opencv/highgui.h>
17
18#include "VislabImageProcessor.h"
19
20#ifdef WIN32
21# ifdef VISLAB_VIEWER_COMPONENT_EXPORTS
22# define VISLAB_VIEWER_COMPONENT_API __declspec(dllexport)
23# else
24# define VISLAB_VIEWER_COMPONENT_API __declspec(dllimport)
25# endif
26#else
27# define VISLAB_VIEWER_COMPONENT_API
28#endif
29
30namespace pacpus
31{
32 class VISLAB_VIEWER_COMPONENT_API VislabViewerComponent
33 : public QObject
34 , public ComponentBase
35 {
36 Q_OBJECT
37 public:
38
39 //device(){}
40 /// Ctor of VislabViewerComponent.
41 //VislabViewerComponent(const QString& windowName, lib3dv::image::type::types imageType);
42
43 VislabViewerComponent(QString const& name);
44
45 /// Dtor of VislabViewerComponent
46 ~VislabViewerComponent();
47
48 /// Stop the processing thread.
49 virtual void stopActivity();
50
51 /// Start the processing thread.
52 virtual void startActivity();
53
54 /// Configure the component.
55 virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
56 void process(cv::Mat const& frame);
57
58 // Working thread, grabbing frame from a webcam.
59 DbiteFile mDBTFile;
60
61 public:
62 virtual void addInputs();
63 QString getName();
64 //device(){}
65
66 private:
67 std::string mOutputFileName;
68 Q_SIGNAL void doDisplay(cv::Mat const& frame);
69 Q_SLOT void DisplayFrame(cv::Mat const& frame);
70 QString mName;
71
72
73 };
74}
75
76#endif
Note: See TracBrowser for help on using the repository browser.