pappso::FilterResampleRemoveXRange Class Reference

`#include <filterresample.h>`

Inheritance diagram for pappso::FilterResampleRemoveXRange:

## Public Member Functions

| FilterResampleRemoveXRange (double min_x, double max_x)
| FilterResampleRemoveXRange (const FilterResampleRemoveXRange &other)
virtual | ~FilterResampleRemoveXRange ()
FilterResampleRemoveXRange & | operator= (const FilterResampleRemoveXRange &other)
Trace & | filter (Trace &trace) const override
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Private Attributes

double | m_minX
double | m_maxX

## Detailed Description

Definition at line 69 of file filterresample.h.

## Constructor & Destructor Documentation

## FilterResampleRemoveXRange() [1/2]

pappso::FilterResampleRemoveXRange::FilterResampleRemoveXRange | ( | double | min_x,
|  | double | max_x
| ) |  |

Definition at line 95 of file filterresample.cpp.

: m_minX(min_x), m_maxX(max_x)
{
}
pappso::FilterResampleRemoveXRange::m_maxX
double m_maxX
Definition: filterresample.h:73
pappso::FilterResampleRemoveXRange::m_minX
double m_minX
Definition: filterresample.h:72

## FilterResampleRemoveXRange() [2/2]

pappso::FilterResampleRemoveXRange::FilterResampleRemoveXRange | ( | const FilterResampleRemoveXRange & | other | ) |

Definition at line 101 of file filterresample.cpp.

: FilterResampleRemoveXRange(other.m_minX, other.m_maxX)
{
}
pappso::FilterResampleRemoveXRange::FilterResampleRemoveXRange
FilterResampleRemoveXRange(double min_x, double max_x)
Definition: filterresample.cpp:95

## ~FilterResampleRemoveXRange()

virtual pappso::FilterResampleRemoveXRange::~FilterResampleRemoveXRange | ( |  | ) |

inline virtual

Definition at line 78 of file filterresample.h.

{};

## Member Function Documentation

## filter()

Trace & pappso::FilterResampleRemoveXRange::filter | ( | Trace & | trace | ) | const

override virtual

Implements pappso::FilterInterface.

Definition at line 119 of file filterresample.cpp.

{
// qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
// << " m_min_x=" << m_min_x;
// qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
// << " m_max_x=" << m_max_x;
auto begin_it =
findFirstEqualOrGreaterX(spectrum.begin(), spectrum.end(), m_minX);
// qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
// << " begin_it->x=" << begin_it->x;
auto end_it = findFirstGreaterX(begin_it, spectrum.end(), m_maxX);
// qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
// << " end_it->x=" << end_it->x;
spectrum.erase(begin_it, end_it);
// qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
// << " spectrum.size()=" << spectrum.size();
return spectrum;
}
pappso::findFirstEqualOrGreaterX
std::vector< DataPoint >::iterator findFirstEqualOrGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is equal or greater than the value searched important : it implies ...
Definition: trace.cpp:32
pappso::findFirstGreaterX
std::vector< DataPoint >::iterator findFirstGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is greater than the value searched important : it implies that Trac...
Definition: trace.cpp:60

References pappso::findFirstEqualOrGreaterX(), pappso::findFirstGreaterX(), m_maxX, and m_minX.

Referenced by pappso::MassSpectrumFilterResampleRemoveMzRange::filter().

## operator=()

FilterResampleRemoveXRange & pappso::FilterResampleRemoveXRange::operator= | ( | const FilterResampleRemoveXRange & | other | ) |

Definition at line 109 of file filterresample.cpp.

{
m_minX = other.m_minX;
m_maxX = other.m_maxX;
return *this;
}

References m_maxX, and m_minX.

## Member Data Documentation

## m_maxX

double pappso::FilterResampleRemoveXRange::m_maxX

private

Definition at line 73 of file filterresample.h.

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

## m_minX

double pappso::FilterResampleRemoveXRange::m_minX

private

Definition at line 72 of file filterresample.h.

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

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

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