00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SIMPLEPEAKFINDER_H_
00024 #define SIMPLEPEAKFINDER_H_
00025
00026 #include <utils/PeakFinder.h>
00027 #include <vector>
00028
00036 class SimplePeakFinder: public PeakFinder{
00037 public:
00044 SimplePeakFinder(double minValue = 0.0, double minDifference = 0.0);
00045
00046 virtual void findPeaks(const std::vector<double>& signal, std::vector<unsigned int>& indexes) const;
00047
00048 virtual void findPeaks(const std::vector< std::vector<double> >& signal, std::vector< std::vector<unsigned int> >& indexes) const;
00049
00050 virtual bool isPeak(const std::vector<double>& signal, unsigned int index) const;
00051
00052 virtual bool isPeak(const std::vector< std::vector<double> >& signal, unsigned int index1, unsigned int index2) const;
00053
00055 inline double getMinValue() const
00056 {return m_minValue;}
00057
00059 inline double getMinDifference() const
00060 {return m_minDifference;}
00061
00063 inline void setMinValue(double value)
00064 {m_minValue = value;}
00065
00067 inline void setMinDifference(double value)
00068 {m_minDifference = value;}
00069 protected:
00070 double m_minValue;
00071 double m_minDifference;
00072 };
00073
00074 #endif