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

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

filter and meta

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