[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[7] | 5 | /*!
|
---|
| 6 | * \file EulerDerivative.h
|
---|
| 7 | * \brief Class defining an euler derivative
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2011/05/01
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef EULERDERIVATIVE_H
|
---|
| 14 | #define EULERDERIVATIVE_H
|
---|
| 15 |
|
---|
| 16 | #include <IODevice.h>
|
---|
| 17 |
|
---|
[15] | 18 | namespace flair {
|
---|
| 19 | namespace core {
|
---|
| 20 | class cvmatrix;
|
---|
[7] | 21 | }
|
---|
[15] | 22 | namespace gui {
|
---|
| 23 | class LayoutPosition;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
[7] | 26 |
|
---|
| 27 | class EulerDerivative_impl;
|
---|
| 28 |
|
---|
[15] | 29 | namespace flair {
|
---|
| 30 | namespace filter {
|
---|
| 31 | /*! \class EulerDerivative
|
---|
| 32 | *
|
---|
| 33 | * \brief Class defining an euler derivative
|
---|
| 34 | */
|
---|
[7] | 35 |
|
---|
[15] | 36 | class EulerDerivative : public core::IODevice {
|
---|
| 37 | public:
|
---|
| 38 | /*!
|
---|
| 39 | * \brief Constructor
|
---|
| 40 | *
|
---|
| 41 | * Construct an EulerDerivative at given 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 | EulerDerivative(const core::IODevice *parent,
|
---|
| 57 | const gui::LayoutPosition *position, std::string name,
|
---|
| 58 | const core::cvmatrix *init_value = NULL);
|
---|
[7] | 59 |
|
---|
[15] | 60 | /*!
|
---|
| 61 | * \brief Destructor
|
---|
| 62 | *
|
---|
| 63 | */
|
---|
| 64 | ~EulerDerivative();
|
---|
[7] | 65 |
|
---|
[15] | 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;
|
---|
[7] | 75 |
|
---|
[15] | 76 | /*!
|
---|
| 77 | * \brief Output matrix
|
---|
| 78 | *
|
---|
| 79 | * \return filtered output
|
---|
| 80 | */
|
---|
| 81 | core::cvmatrix *Matrix(void) const;
|
---|
[7] | 82 |
|
---|
[15] | 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);
|
---|
[7] | 92 |
|
---|
[15] | 93 | class EulerDerivative_impl *pimpl_;
|
---|
| 94 | };
|
---|
[7] | 95 | } // end namespace filter
|
---|
| 96 | } // end namespace flair
|
---|
| 97 | #endif // EULERDERIVATIVE_H
|
---|