source: flair-src/trunk/lib/FlairFilter/src/LowPassFilter.h@ 10

Last change on this file since 10 was 10, checked in by Sanahuja Guillaume, 7 years ago

lic

File size: 2.6 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 LowPassFilter.h
7 * \brief Class defining a first order low pass filter
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/05/01
10 * \version 4.0
11 */
12
13#ifndef LOWPASSFILTER_FILTER_H
14#define LOWPASSFILTER_FILTER_H
15
16#include <IODevice.h>
17
18namespace flair
19{
20 namespace core
21 {
22 class cvmatrix;
23 }
24 namespace gui
25 {
26 class Layout;
27 class LayoutPosition;
28 }
29}
30
31class LowPassFilter_impl;
32
33namespace flair
34{
35namespace filter
36{
37 /*! \class LowPassFilter
38 *
39 * \brief Class defining a first order low pass filter
40 */
41 class LowPassFilter : public core::IODevice
42 {
43 public:
44 /*!
45 * \brief Constructor
46 *
47 * Construct a LowPassFilter at position. \n
48 * After calling this function, position will be deleted as it is no longer usefull. \n
49 * The filter is automatically updated when parent's
50 * IODevice::ProcessUpdate is called. \n
51 * The optional init_value parameters allow to specify
52 * the size of the input datas and its inital values.
53 * If unspecified, a 1*1 size is used, and values are
54 * initialized with 0.
55 *
56 * \param parent parent
57 * \param position position to display settings
58 * \param name name
59 * \param init_value initial value
60 */
61 LowPassFilter(const core::IODevice* parent,const gui::LayoutPosition* position,std::string name,const core::cvmatrix* init_value=NULL);
62
63 /*!
64 * \brief Destructor
65 *
66 */
67 ~LowPassFilter();
68
69 /*!
70 * \brief Output value
71 *
72 * \param row row element
73 * \param col column element
74 *
75 * \return element value
76 */
77 float Output(int row, int col) const;
78
79 /*!
80 * \brief Output matrix
81 *
82 * \return filtered output
83 */
84 core::cvmatrix* Matrix(void) const;
85
86 private:
87 /*!
88 * \brief Update using provided datas
89 *
90 * Reimplemented from IODevice.
91 *
92 * \param data data from the parent to process
93 */
94 void UpdateFrom(const core::io_data *data);
95
96 class LowPassFilter_impl* pimpl_;
97 };
98} // end namespace filter
99} // end namespace flair
100#endif // LOWPASSFILTER_FILTER_H
Note: See TracBrowser for help on using the repository browser.