source: flair-src/trunk/lib/FlairFilter/src/ButterworthLowPass.cpp@ 148

Last change on this file since 148 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 1.7 KB
RevLine 
[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: 2013/12/10
6// filename: ButterworthLowPass.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Class defining a Butterworth low pass filter
14//
15//
16/*********************************************************************/
17
18#include "ButterworthLowPass.h"
19#include "ButterworthLowPass_impl.h"
20#include <cvmatrix.h>
21#include <Layout.h>
22#include <LayoutPosition.h>
23
24using std::string;
25using namespace flair::core;
26using namespace flair::gui;
27
[15]28namespace flair {
29namespace filter {
[7]30
[15]31ButterworthLowPass::ButterworthLowPass(const IODevice *parent,
32 const LayoutPosition *position,
33 string name, int order)
34 : IODevice(parent, name) {
35 pimpl_ = new ButterworthLowPass_impl(this, position, name, order);
36 AddDataToLog(pimpl_->output);
[7]37}
38
[15]39ButterworthLowPass::ButterworthLowPass(const gui::LayoutPosition *position,
40 string name, int order)
41 : IODevice(position->getLayout(), name) {
42 pimpl_ = new ButterworthLowPass_impl(this, position, name, order);
43 AddDataToLog(pimpl_->output);
[7]44}
45
[15]46ButterworthLowPass::~ButterworthLowPass() { delete pimpl_; }
[7]47
[15]48cvmatrix *ButterworthLowPass::Matrix(void) const { return pimpl_->output; }
[7]49
[15]50float ButterworthLowPass::Output(void) const {
51 return pimpl_->output->Value(0, 0);
[7]52}
53
[15]54void ButterworthLowPass::UpdateFrom(const io_data *data) {
55 pimpl_->UpdateFrom(data);
56 ProcessUpdate(pimpl_->output);
[7]57}
58
59} // end namespace filter
60} // end namespace flair
Note: See TracBrowser for help on using the repository browser.