File: filter_scale.cpp

package info (click to toggle)
odin 2.0.5-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,196 kB
  • sloc: cpp: 62,638; sh: 4,541; makefile: 779
file content (17 lines) | stat: -rw-r--r-- 329 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "filter_scale.h"

void FilterScale::init(){
  slope=1.0;
  slope.set_description("Slope");
  append_arg(slope,"slope");

  offset=0.0;
  offset.set_description("Offset");
  append_arg(offset,"offset");
}


bool FilterScale::process(Data<float,4>& data, Protocol& prot) const {
  data=slope*data+offset;
  return true;
}