source: flair-src/trunk/lib/FlairSensorActuator/src/Camera.h @ 102

Last change on this file since 102 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

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