X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FCommon%2FPeakDetector.h;fp=lib%2Ffpa%2FCommon%2FPeakDetector.h;h=0000000000000000000000000000000000000000;hb=a8ac405fe1422bc0792a810f7f0693096a22c20e;hp=8796cc33de8ca98493afbede9976ea2bb2a8fd9d;hpb=8abe87eaa0d29ba667d5cbf35f4ca1ca2e38c6c4;p=FrontAlgorithms.git diff --git a/lib/fpa/Common/PeakDetector.h b/lib/fpa/Common/PeakDetector.h deleted file mode 100644 index 8796cc3..0000000 --- a/lib/fpa/Common/PeakDetector.h +++ /dev/null @@ -1,75 +0,0 @@ -// ========================================================================= -// @author Leonardo Florez Valencia -// @email florez-l@javeriana.edu.co -// ========================================================================= -#ifndef __fpa__Common__PeakDetector__h__ -#define __fpa__Common__PeakDetector__h__ - -#include -#include -#include - -namespace fpa -{ - namespace Common - { - /** - */ - /** - * https://stackoverflow.com/questions/22583391/peak-signal-detection-in-realtime-timeseries-data - */ - class FPA_EXPORT PeakDetector - { - public: - typedef PeakDetector Self; - - enum TPeak - { - NoPeak = 0, - PosPeak, - NegPeak - }; - - public: - PeakDetector( ); - virtual ~PeakDetector( ); - - unsigned long GetKernelSize( ) const; - double GetThreshold( ) const; - double GetInfluence( ) const; - - void SetKernelSize( unsigned long k ); - void SetThreshold( double t ); - void SetInfluence( double i ); - - const std::vector< double >& GetXValues( ) const; - const std::vector< double >& GetYValues( ) const; - const std::vector< double >& GetFilteredYValues( ) const; - const std::vector< double >& GetAverages( ) const; - const std::vector< double >& GetDeviations( ) const; - const std::vector< TPeak >& GetPeaks( ) const; - - void Clear( ); - unsigned long GetNumberOfSamples( ) const; - TPeak AddValue( double x, double y ); - - protected: - unsigned long m_K; - double m_T; - double m_I; - - std::vector< double > m_X; - std::vector< double > m_Y; - std::vector< double > m_YF; - std::vector< double > m_Avg; - std::vector< double > m_STD; - std::vector< TPeak > m_Peaks; - fpa::Common::IncrementalMeanAndVariance m_MeanAndVar; - }; - - } // ecapseman - -} // ecapseman - -#endif // __fpa__Common__PeakDetector__h__ -// eof - $RCSfile$