Changeset 13 in flair-dev for trunk/include/FlairFilter/LowPassFilter.h
- Timestamp:
- 04/08/16 15:39:24 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairFilter/LowPassFilter.h
r9 r13 16 16 #include <IODevice.h> 17 17 18 namespace flair 19 { 20 namespace core 21 { 22 class cvmatrix; 23 } 24 namespace gui 25 { 26 class Layout; 27 class LayoutPosition; 28 } 18 namespace flair { 19 namespace core { 20 class cvmatrix; 21 } 22 namespace gui { 23 class Layout; 24 class LayoutPosition; 25 } 29 26 } 30 27 31 28 class LowPassFilter_impl; 32 29 33 namespace flair 34 {35 namespace filter36 { 37 /*! \class LowPassFilter38 * 39 * \brief Class defining a first order low pass filter 40 */ 41 class LowPassFilter : public core::IODevice42 {43 public:44 /*!45 * \brief Constructor46 *47 * Construct a LowPassFilter at position. \n48 * After calling this function, position will be deleted as it is no longer usefull. \n49 * The filter is automatically updated when parent's50 * IODevice::ProcessUpdate is called. \n51 * The optional init_value parameters allow to specify52 * the size of the input datas and its inital values.53 * If unspecified, a 1*1 size is used, and values are54 * initialized with 0.55 *56 * \param parent parent57 * \param position position to display settings58 * \param name name59 * \param init_value initial value60 */61 LowPassFilter(const core::IODevice* parent,const gui::LayoutPosition* position,std::string name,const core::cvmatrix* init_value=NULL);30 namespace flair { 31 namespace filter { 32 /*! \class LowPassFilter 33 * 34 * \brief Class defining a first order low pass filter 35 */ 36 class LowPassFilter : public core::IODevice { 37 public: 38 /*! 39 * \brief Constructor 40 * 41 * Construct a LowPassFilter at position. \n 42 * After calling this function, position will be deleted as it is no longer 43 *usefull. \n 44 * The filter is automatically updated when parent's 45 * IODevice::ProcessUpdate is called. \n 46 * The optional init_value parameters allow to specify 47 * the size of the input datas and its inital values. 48 * If unspecified, a 1*1 size is used, and values are 49 * initialized with 0. 50 * 51 * \param parent parent 52 * \param position position to display settings 53 * \param name name 54 * \param init_value initial value 55 */ 56 LowPassFilter(const core::IODevice *parent, 57 const gui::LayoutPosition *position, std::string name, 58 const core::cvmatrix *init_value = NULL); 62 59 63 64 65 66 67 60 /*! 61 * \brief Destructor 62 * 63 */ 64 ~LowPassFilter(); 68 65 69 70 71 72 73 74 75 76 77 66 /*! 67 * \brief Output value 68 * 69 * \param row row element 70 * \param col column element 71 * 72 * \return element value 73 */ 74 float Output(int row, int col) const; 78 75 79 80 81 82 83 84 core::cvmatrix*Matrix(void) const;76 /*! 77 * \brief Output matrix 78 * 79 * \return filtered output 80 */ 81 core::cvmatrix *Matrix(void) const; 85 82 86 87 88 89 90 91 92 93 94 83 private: 84 /*! 85 * \brief Update using provided datas 86 * 87 * Reimplemented from IODevice. 88 * 89 * \param data data from the parent to process 90 */ 91 void UpdateFrom(const core::io_data *data); 95 92 96 class LowPassFilter_impl*pimpl_;97 93 class LowPassFilter_impl *pimpl_; 94 }; 98 95 } // end namespace filter 99 96 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.