Changeset 214 in flair-src for trunk/demos/Sinus/src/MeanFilter.cpp


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

matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/Sinus/src/MeanFilter.cpp

    r157 r214  
    1313
    1414#include "MeanFilter.h"
    15 #include <cvmatrix.h>
     15#include <Matrix.h>
    1616#include <LayoutPosition.h>
    1717#include <GroupBox.h>
     
    4242  desc->SetElementName(0, 0,
    4343                       "mean filter"); // name will be used for graphs and logs
    44   output = new cvmatrix(this, desc, floatType, name);
     44  output = new Matrix(this, desc, floatType, name);
    4545  delete desc;
    4646
     
    5252MeanFilter::~MeanFilter() {}
    5353
    54 cvmatrix *MeanFilter::GetMatrix() const { return output; }
     54Matrix *MeanFilter::GetMatrix() const { return output; }
    5555
    5656float MeanFilter::GetValue(void) const { return output->Value(0, 0); }
     
    6464
    6565  float result = 0;
    66   // get input argument in a cvmatrix
    67   cvmatrix *input = (cvmatrix *)data;
     66  // get input argument in a matrix
     67  const Matrix* input = dynamic_cast<const Matrix*>(data);
     68 
     69  if (!input) {
     70      Warn("casting %s to Matrix failed\n",data->ObjectName().c_str());
     71      return;
     72  }
    6873
    6974  // simple (and not efficent!) implementation of the filter
Note: See TracChangeset for help on using the changeset viewer.