37 Module(
"LowPassFilter"), _width(width), _iterations(iterations) { }
40 Module(
"LowPassFilter", c), _width(width),
41 _iterations(iterations) {
42 _data = filterIterator(c.ref(), _width, _iterations);
47 int width = 3,
int iterations = 1) :
48 Module(
"LowPassFilter", h), _width(width),
49 _iterations(iterations) {
50 _data = filterIterator(v, _width, _iterations);
58 _data = filterIterator(v, _width, _iterations);
63 inline int Width()
const {
return (_width); }
69 QString formHistory() {
70 return (QString(
"LowPassFilter(Width[" +
ToString(_width) +
71 "],Iters["+
ToString(_iterations)+
"])"));
76 for (
int i = 0 ; i < iterations; i++) {
77 vout = filter(vout,width);
83 QuickFilter lowpass(v.dim(), width, 1);
84 lowpass.AddLine(&v[0]);
86 for (
int i = 0 ; i < v.dim() ; i ++) {
87 vout[i] = lowpass.Average(i);
Definition HiCalTypes.h:30
void clear()
Definition HiCalTypes.h:65
void add(const QString &event)
Definition HiCalTypes.h:55
Compute a low pass filter from a Module class content.
Definition LowPassFilter.h:30
LowPassFilter(const HiVector &v, const HiHistory &h, int width=3, int iterations=1)
Definition LowPassFilter.h:46
LowPassFilter(int width, int iterations=1)
Definition LowPassFilter.h:36
void Process(const HiVector &v)
Default processing behavior makes a reference copy of data array.
Definition LowPassFilter.h:57
virtual ~LowPassFilter()
Destructor.
Definition LowPassFilter.h:55
int Width() const
Definition LowPassFilter.h:63
LowPassFilter(const Module &c, int width=3, int iterations=1)
Definition LowPassFilter.h:39
LowPassFilter()
Definition LowPassFilter.h:34
Module manages HiRISE calibration vectors from various sources.
Definition Module.h:39
HiVector _data
Data vector.
Definition Module.h:151
HiHistory _history
Hierarchial component history.
Definition Module.h:152
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
TNT::Array1D< double > HiVector
1-D Buffer
Definition HiCalTypes.h:27
QString ToString(const T &value)
Helper function to convert values to strings.
Definition HiCalUtil.h:236