#include <SimplePeakFinder.h>
Public Member Functions | |
virtual void | findPeaks (const std::vector< std::vector< double > > &signal, std::vector< std::vector< unsigned int > > &indexes) const |
virtual void | findPeaks (const std::vector< double > &signal, std::vector< unsigned int > &indexes) const |
double | getMinDifference () const |
double | getMinValue () const |
virtual bool | isPeak (const std::vector< std::vector< double > > &signal, unsigned int index1, unsigned int index2) const |
virtual bool | isPeak (const std::vector< double > &signal, unsigned int index) const |
void | setMinDifference (double value) |
void | setMinValue (double value) |
SimplePeakFinder (double minValue=0.0, double minDifference=0.0) | |
Protected Attributes | |
double | m_minDifference |
double | m_minValue |
Representation of a simple algorithm for peak finding. The class represents a simple algorithm for finding peaks in discrete signals.
Definition at line 36 of file SimplePeakFinder.h.
SimplePeakFinder::SimplePeakFinder | ( | double | minValue = 0.0 , |
|
double | minDifference = 0.0 | |||
) |
Constructor. Creates and initializes the peak finder.
minValue | The minimum value for a peak to be considerated valid. | |
minDifference | The minimum difference a peak should have with respect to its immediate neighbours. |
Definition at line 3 of file SimplePeakFinder.cpp.
void SimplePeakFinder::findPeaks | ( | const std::vector< std::vector< double > > & | signal, | |
std::vector< std::vector< unsigned int > > & | indexes | |||
) | const [virtual] |
Finds the indexes of the peaks in a bidimensional signal.
Implements PeakFinder.
Definition at line 26 of file SimplePeakFinder.cpp.
void SimplePeakFinder::findPeaks | ( | const std::vector< double > & | signal, | |
std::vector< unsigned int > & | indexes | |||
) | const [virtual] |
Finds the indexes of the peaks in a monodimensional signal.
Implements PeakFinder.
Definition at line 11 of file SimplePeakFinder.cpp.
double SimplePeakFinder::getMinDifference | ( | ) | const [inline] |
Gets the minimum difference a peak should have with respect to its immediate neighbours.
Definition at line 59 of file SimplePeakFinder.h.
double SimplePeakFinder::getMinValue | ( | ) | const [inline] |
Gets the minimum value for a peak to be considerated valid.
Definition at line 55 of file SimplePeakFinder.h.
bool SimplePeakFinder::isPeak | ( | const std::vector< std::vector< double > > & | signal, | |
unsigned int | index1, | |||
unsigned int | index2 | |||
) | const [virtual] |
Checks if the given indexes represent a peak in the bidimensional signal
Implements PeakFinder.
Definition at line 33 of file SimplePeakFinder.cpp.
bool SimplePeakFinder::isPeak | ( | const std::vector< double > & | signal, | |
unsigned int | index | |||
) | const [virtual] |
Checks if the given index represents a peak in the monodimensional signal
Implements PeakFinder.
Reimplemented in SimpleMinMaxPeakFinder.
Definition at line 20 of file SimplePeakFinder.cpp.
void SimplePeakFinder::setMinDifference | ( | double | value | ) | [inline] |
Sets the minimum difference a peak should have with respect to its immediate neighbours.
Definition at line 67 of file SimplePeakFinder.h.
void SimplePeakFinder::setMinValue | ( | double | value | ) | [inline] |
Sets the minimum value for a peak to be considerated valid.
Definition at line 63 of file SimplePeakFinder.h.
double SimplePeakFinder::m_minDifference [protected] |
The minimum difference a peak should have with respect to its immediate neighbours.
Definition at line 71 of file SimplePeakFinder.h.
double SimplePeakFinder::m_minValue [protected] |
The minimum value for a peak to be considerated valid.
Definition at line 70 of file SimplePeakFinder.h.