Ignore:
Timestamp:
02/07/18 17:49:27 (6 years ago)
Author:
Sanahuja Guillaume
Message:

matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairFilter/src/LowPassFilter_impl.cpp

    r148 r214  
    1818#include "LowPassFilter_impl.h"
    1919#include "LowPassFilter.h"
    20 #include <cvmatrix.h>
     20#include <Matrix.h>
    2121#include <Layout.h>
    2222#include <GroupBox.h>
    2323#include <SpinBox.h>
    2424#include <DoubleSpinBox.h>
    25 
     25#include <typeinfo>
    2626#define PI ((float)3.14159265358979323846)
    2727
     
    3434                                       const LayoutPosition *position,
    3535                                       string name,
    36                                        const cvmatrix *init_value) {
     36                                       const Matrix *init_value) {
    3737
    3838  if (init_value != NULL) {
     
    4545      }
    4646    }
    47     output = new cvmatrix(self, desc,init_value->GetDataType().GetElementDataType(), name);
     47    output = new Matrix(self, desc,init_value->GetDataType().GetElementDataType(), name);
    4848    for (int i = 0; i < init_value->Rows(); i++) {
    4949      for (int j = 0; j < init_value->Cols(); j++) {
     
    5656    cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1);
    5757    desc->SetElementName(0, 0, "output");
    58     output = new cvmatrix(self, desc, floatType, name);
     58    output = new Matrix(self, desc, floatType, name);
    5959    delete desc;
    6060  }
     
    6868                           
    6969  previous_time=GetTime();
     70  this->self = self;
    7071}
    7172
     
    7475void LowPassFilter_impl::UpdateFrom(const io_data *data) {
    7576  float delta_t;
    76   cvmatrix *input = (cvmatrix *)data;
     77  const Matrix* input = dynamic_cast<const Matrix*>(data);
     78 
     79  if (!input) {
     80      self->Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
     81      return;
     82  }
    7783
    7884  // on prend une fois pour toute les mutex et on fait des accès directs
Note: See TracChangeset for help on using the changeset viewer.