source: flair-dev/trunk/include/FlairSensorActuator/Camera.h@ 11

Last change on this file since 11 was 4, checked in by Sanahuja Guillaume, 9 years ago

sensoractuator

File size: 3.4 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file Camera.h
7 * \brief Base class for Camera
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/03/06
10 * \version 4.0
11 */
12
13#ifndef CAMERA_H
14#define CAMERA_H
15
16#include <IODevice.h>
17#include <stdint.h>
18#include <cvimage.h>
19
20namespace flair
21{
22 namespace gui
23 {
24 class GroupBox;
25 class Tab;
26 class TabWidget;
27 class Picture;
28 class GridLayout;
29 }
30}
31
32namespace flair
33{
34namespace sensor
35{
36 /*! \class Camera
37 *
38 * \brief Base class for Camera
39 *
40 * Use this class to define a custom Camera.
41 *
42 */
43 class Camera : public core::IODevice
44 {
45 public:
46 /*!
47 * \brief Constructor
48 *
49 * Construct a Camera.
50 *
51 * \param parent parent
52 * \param name name
53 * \param width width
54 * \param height height
55 * \param format image format
56 */
57 Camera(const core::FrameworkManager* parent,std::string name,uint16_t width,uint16_t height,core::cvimage::Type::Format format);
58
59 /*!
60 * \brief Constructor
61 *
62 * Construct a Camera. \n
63 * This contructor must only be called for a simulated device.
64 *
65 * \param parent parent
66 * \param name name
67 */
68 Camera(const core::IODevice* parent,std::string name);
69
70 /*!
71 * \brief Destructor
72 *
73 */
74 ~Camera();
75
76 /*!
77 * \brief Use default plot
78 *
79 * \param image image to display
80 */
81 void UseDefaultPlot(const core::cvimage *image);
82
83 /*!
84 * \brief get Layout
85 *
86 * \return a Layout available
87 */
88 gui::GridLayout* GetLayout(void) const;
89
90 /*!
91 * \brief plot tab
92 *
93 * \return plot tab
94 */
95 gui::Tab* GetPlotTab(void) const;
96
97 /*!
98 * \brief Save picture to file
99 *
100 * \param filename filename
101 */
102 void SaveToFile(std::string filename) const;
103
104 /*!
105 * \brief Width
106 *
107 * \return width
108 */
109 uint16_t Width(void) const;
110
111 /*!
112 * \brief Height
113 *
114 * \return height
115 */
116 uint16_t Height(void) const;
117
118 /*!
119 * \brief Output matrix
120 *
121 * Output matrix is of the same size as declared in constructor. \n
122 *
123 * \return the output matrix
124 */
125 core::cvimage* Output(void);
126
127 core::DataType const &GetOutputDataType() const;
128
129 protected:
130 /*!
131 * \brief get GroupBox
132 *
133 * \return a GroupBox available
134 */
135 gui::GroupBox* GetGroupBox(void) const;
136
137 core::cvimage *output;
138
139 private:
140 gui::Tab *main_tab,*sensor_tab,*plot_tab;
141 gui::TabWidget *tab;
142 gui::GroupBox* setup_groupbox;
143 gui::GridLayout* setup_layout;
144 };
145} // end namespace sensor
146} // end namespace flair
147#endif // CAMERA_H
Note: See TracBrowser for help on using the repository browser.