pappso::FilterHighPassPercentage Class Reference

remove datapoints below a given intensity percentage (ratio) of the maximum intensity More...

`#include <filterpass.h>`

Inheritance diagram for pappso::FilterHighPassPercentage:

## Public Member Functions

| FilterHighPassPercentage (double y_ratio)
| FilterHighPassPercentage (const FilterHighPassPercentage &other)
virtual | ~FilterHighPassPercentage ()
FilterHighPassPercentage & | operator= (const FilterHighPassPercentage &other)
Trace & | filter (Trace &data_points) const override
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Private Attributes

double | m_ratioPassY = 0

## Detailed Description

remove datapoints below a given intensity percentage (ratio) of the maximum intensity

Definition at line 75 of file filterpass.h.

## Constructor & Destructor Documentation

## FilterHighPassPercentage() [1/2]

FilterHighPassPercentage::FilterHighPassPercentage | ( | double | y_ratio | ) |

Definition at line 104 of file filterpass.cpp.

: m_ratioPassY(ratio_pass_y)
{
}
pappso::FilterHighPassPercentage::m_ratioPassY
double m_ratioPassY
Definition: filterpass.h:89

## FilterHighPassPercentage() [2/2]

FilterHighPassPercentage::FilterHighPassPercentage | ( | const FilterHighPassPercentage & | other | ) |

Definition at line 109 of file filterpass.cpp.

: m_ratioPassY(other.m_ratioPassY)
{
}

## ~FilterHighPassPercentage()

virtual pappso::FilterHighPassPercentage::~FilterHighPassPercentage | ( |  | ) |

inline virtual

Definition at line 81 of file filterpass.h.

{};

## Member Function Documentation

## filter()

Trace & FilterHighPassPercentage::filter | ( | Trace & | data_points | ) | const

override virtual

Implements pappso::FilterInterface.

Definition at line 125 of file filterpass.cpp.

{
auto it_max = maxYDataPoint(data_points.begin(), data_points.end());
if(it_max == data_points.end())
return data_points;
double pass = (it_max->y * m_ratioPassY);
Trace new_data_points;
for(auto &&data_point : data_points)
{
if(data_point.y > pass)
{
new_data_points.push_back(data_point);
}
}
data_points = std::move(new_data_points);
return data_points;
}
pappso::Trace
A simple container of DataPoint instances.
Definition: trace.h:148
pappso::maxYDataPoint
std::vector< DataPoint >::const_iterator maxYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
Definition: trace.cpp:139

References m_ratioPassY, and pappso::maxYDataPoint().

## operator=()

FilterHighPassPercentage & FilterHighPassPercentage::operator= | ( | const FilterHighPassPercentage & | other | ) |

Definition at line 116 of file filterpass.cpp.

{
m_ratioPassY = other.m_ratioPassY;
return *this;
}

References m_ratioPassY.

## Member Data Documentation

## m_ratioPassY

double pappso::FilterHighPassPercentage::m_ratioPassY = 0

private

Definition at line 89 of file filterpass.h.

Referenced by filter(), and operator=().

The documentation for this class was generated from the following files:

- pappsomspp/processing/filters/filterpass.h
- pappsomspp/processing/filters/filterpass.cpp