pappsomspp
Library for mass spectrometry
pappso::FilterResampleKeepGreater Class Reference

#include <filterresample.h>

Inheritance diagram for pappso::FilterResampleKeepGreater:
pappso::FilterInterface

Public Member Functions

 FilterResampleKeepGreater (double x_value)
 
 FilterResampleKeepGreater (const FilterResampleKeepGreater &other)
 
virtual ~FilterResampleKeepGreater ()
 
Tracefilter (Trace &trace) const override
 
double getThresholdX () const
 

Private Attributes

double m_value
 

Detailed Description

Definition at line 66 of file filterresample.h.

Constructor & Destructor Documentation

◆ FilterResampleKeepGreater() [1/2]

FilterResampleKeepGreater::FilterResampleKeepGreater ( double  x_value)

Definition at line 54 of file filterresample.cpp.

56  : m_value(x_value)
57 {

◆ FilterResampleKeepGreater() [2/2]

FilterResampleKeepGreater::FilterResampleKeepGreater ( const FilterResampleKeepGreater other)

Definition at line 59 of file filterresample.cpp.

63 {

◆ ~FilterResampleKeepGreater()

virtual pappso::FilterResampleKeepGreater::~FilterResampleKeepGreater ( )
inlinevirtual

Definition at line 74 of file filterresample.h.

77 : public FilterInterface

Member Function Documentation

◆ filter()

Trace & FilterResampleKeepGreater::filter ( Trace trace) const
overridevirtual

Implements pappso::FilterInterface.

Definition at line 73 of file filterresample.cpp.

75 {
76  qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
77  << " spectrum.size()=" << spectrum.size();
78  auto last_it = findFirstGreaterX(spectrum.begin(), spectrum.end(), m_value);
79  spectrum.erase(spectrum.begin(), last_it);
80  qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__
81  << " spectrum.size()=" << spectrum.size();
82  return spectrum;

References pappso::findFirstGreaterX(), and m_value.

◆ getThresholdX()

double FilterResampleKeepGreater::getThresholdX ( ) const

Definition at line 67 of file filterresample.cpp.

69 {
70  return m_value;

References m_value.

Member Data Documentation

◆ m_value

double pappso::FilterResampleKeepGreater::m_value
private

Definition at line 69 of file filterresample.h.

Referenced by filter(), and getThresholdX().


The documentation for this class was generated from the following files:
pappso::FilterResampleKeepGreater::FilterResampleKeepGreater
FilterResampleKeepGreater(double x_value)
Definition: filterresample.cpp:54
pappso::FilterResampleKeepGreater::m_value
double m_value
Definition: filterresample.h:69
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:57