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 ButterworthLowPass.h
|
---|
7 | * \brief Class defining a Butterworth low pass filter
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2013/12/10
|
---|
10 | * \version 4.0
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef BUTTERWORTHLOWPASS_H
|
---|
14 | #define BUTTERWORTHLOWPASS_H
|
---|
15 |
|
---|
16 | #include <IODevice.h>
|
---|
17 |
|
---|
18 | namespace flair {
|
---|
19 | namespace core {
|
---|
20 | class cvmatrix;
|
---|
21 | }
|
---|
22 | namespace gui {
|
---|
23 | class LayoutPosition;
|
---|
24 | }
|
---|
25 | }
|
---|
26 |
|
---|
27 | class ButterworthLowPass_impl;
|
---|
28 |
|
---|
29 | namespace flair {
|
---|
30 | namespace filter {
|
---|
31 | /*! \class ButterworthLowPass
|
---|
32 | *
|
---|
33 | * \brief Class defining a Butterworth low pass filter
|
---|
34 | */
|
---|
35 | class ButterworthLowPass : public core::IODevice {
|
---|
36 | public:
|
---|
37 | /*!
|
---|
38 | * \brief Constructor
|
---|
39 | *
|
---|
40 | * Construct a ButterworthLowPass at position. \n
|
---|
41 | * After calling this function, position will be deleted as it is no longer
|
---|
42 | *usefull. \n
|
---|
43 | * The filter is automatically updated when parent's
|
---|
44 | * IODevice::ProcessUpdate is called.
|
---|
45 | *
|
---|
46 | * \param parent parent
|
---|
47 | * \param position position to display settings
|
---|
48 | * \param name name
|
---|
49 | * \param order order of the filter
|
---|
50 | * \param nbRow number of rows of input/output
|
---|
51 | * \param nbCol number of cols of input/output
|
---|
52 | */
|
---|
53 | ButterworthLowPass(const IODevice *parent,
|
---|
54 | const gui::LayoutPosition *position, std::string name,
|
---|
55 | uint32_t order,uint32_t nbRow=1,uint32_t nbCol=1);
|
---|
56 |
|
---|
57 | /*!
|
---|
58 | * \brief Constructor
|
---|
59 | *
|
---|
60 | * Construct a ButterworthLowPass at position. \n
|
---|
61 | * The ButterworthLowPass will automatically be child of position->getLayout()
|
---|
62 | *Layout. After calling this function,
|
---|
63 | * position will be deleted as it is no longer usefull. \n
|
---|
64 | * The filter is updated manually with UpdateFrom method. \n
|
---|
65 | *
|
---|
66 | * \param position position to display settings
|
---|
67 | * \param name name
|
---|
68 | * \param order order of the filter
|
---|
69 | * \param nbRow number of rows of input/output
|
---|
70 | * \param nbCol number of cols of input/output
|
---|
71 | */
|
---|
72 | ButterworthLowPass(const gui::LayoutPosition *position, std::string name,
|
---|
73 | uint32_t order,uint32_t nbRow,uint32_t nbCol);
|
---|
74 |
|
---|
75 | /*!
|
---|
76 | * \brief Destructor
|
---|
77 | *
|
---|
78 | */
|
---|
79 | ~ButterworthLowPass();
|
---|
80 |
|
---|
81 | /*!
|
---|
82 | * \brief Output value
|
---|
83 | *
|
---|
84 | * \return filtered output
|
---|
85 | */
|
---|
86 | float Output(void) const;
|
---|
87 |
|
---|
88 | /*!
|
---|
89 | * \brief Output matrix
|
---|
90 | *
|
---|
91 | * \return filtered output
|
---|
92 | */
|
---|
93 | core::cvmatrix *Matrix(void) const;
|
---|
94 |
|
---|
95 | /*!
|
---|
96 | * \brief Update using provided datas
|
---|
97 | *
|
---|
98 | * Reimplemented from IODevice.
|
---|
99 | *
|
---|
100 | * \param data data from the parent to process
|
---|
101 | */
|
---|
102 | void UpdateFrom(const core::io_data *data);
|
---|
103 |
|
---|
104 | private:
|
---|
105 | class ButterworthLowPass_impl *pimpl_;
|
---|
106 | };
|
---|
107 | } // end namespace filter
|
---|
108 | } // end namespace flair
|
---|
109 | #endif // BUTTERWORTHLOWPASS_H
|
---|