[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 | // created: 2011/05/01
|
---|
| 6 | // filename: EulerDerivative.cpp
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: Class defining an euler derivative
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
| 18 | #include "EulerDerivative.h"
|
---|
| 19 | #include "EulerDerivative_impl.h"
|
---|
| 20 | #include <cvmatrix.h>
|
---|
| 21 | #include <LayoutPosition.h>
|
---|
| 22 |
|
---|
| 23 | using std::string;
|
---|
| 24 | using namespace flair::core;
|
---|
| 25 | using namespace flair::gui;
|
---|
| 26 |
|
---|
[15] | 27 | namespace flair {
|
---|
| 28 | namespace filter {
|
---|
[7] | 29 |
|
---|
[15] | 30 | EulerDerivative::EulerDerivative(const IODevice *parent,
|
---|
| 31 | const LayoutPosition *position, string name,
|
---|
| 32 | const cvmatrix *init_value)
|
---|
| 33 | : IODevice(parent, name) {
|
---|
| 34 | pimpl_ = new EulerDerivative_impl(this, position, name, init_value);
|
---|
| 35 | AddDataToLog(pimpl_->output);
|
---|
[157] | 36 |
|
---|
| 37 | SetIsReady(true);
|
---|
[7] | 38 | }
|
---|
| 39 |
|
---|
[15] | 40 | EulerDerivative::~EulerDerivative() { delete pimpl_; }
|
---|
[7] | 41 |
|
---|
[15] | 42 | cvmatrix *EulerDerivative::Matrix(void) const { return pimpl_->output; }
|
---|
[7] | 43 |
|
---|
[15] | 44 | float EulerDerivative::Output(int row, int col) const {
|
---|
| 45 | return pimpl_->output->Value(row, col);
|
---|
[7] | 46 | }
|
---|
| 47 |
|
---|
[15] | 48 | void EulerDerivative::UpdateFrom(const io_data *data) {
|
---|
| 49 | pimpl_->UpdateFrom(data);
|
---|
| 50 | ProcessUpdate(pimpl_->output);
|
---|
[7] | 51 | }
|
---|
| 52 |
|
---|
| 53 | } // end namespace filter
|
---|
| 54 | } // end namespace flair
|
---|