Loading...
Searching...
No Matches
pappso::FilterSuiteString Class Reference

`#include <filtersuitestring.h>`

Inheritance diagram for pappso::FilterSuiteString:

## Public Types

using | FilterNameType = std::vector< FilterNameInterfaceCstSPtr >

## Public Member Functions

| FilterSuiteString (const QString &strBuildParams)
virtual | ~FilterSuiteString ()
pappso::Trace & | filter (pappso::Trace &data_points) const override
virtual QString | name () const override
QString | toString () const override
void | addFilterFromString (const QString &strBuildParams)
| takes a string that describes filters to add
FilterNameType::const_iterator | begin ()
FilterNameType::const_iterator | end ()
Public Member Functions inherited from pappso::FilterNameInterface
virtual | ~FilterNameInterface ()
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Protected Member Functions

void | buildFilterFromString (const QString &strBuildParams) override
| build this filter using a string

## Private Attributes

std::vector< FilterNameInterfaceCstSPtr > | m_filterVector

## Detailed Description

Todo:
  write docs

Definition at line 41 of file filtersuitestring.h.

## Member Typedef Documentation

## FilterNameType

using pappso::FilterSuiteString::FilterNameType = std::vector<FilterNameInterfaceCstSPtr>

Definition at line 65 of file filtersuitestring.h.

## Constructor & Destructor Documentation

## FilterSuiteString()

pappso::FilterSuiteString::FilterSuiteString | ( | const QString & | strBuildParams | ) |

Parameters

  strBuildParams | string to build the filter "chargeDeconvolution|0.02dalton anotherFilter|param1;param2"

Definition at line 42 of file filtersuitestring.cpp.

{
buildFilterFromString(strBuildParams);
}
pappso::FilterSuiteString::buildFilterFromString
void buildFilterFromString(const QString &strBuildParams) override
build this filter using a string
Definition filtersuitestring.cpp:92

References buildFilterFromString().

## ~FilterSuiteString()

pappso::FilterSuiteString::~FilterSuiteString | ( |  | ) |

virtual

Destructor

Definition at line 47 of file filtersuitestring.cpp.

{
}

## Member Function Documentation

## addFilterFromString()

void pappso::FilterSuiteString::addFilterFromString | ( | const QString & | strBuildParams | ) |

takes a string that describes filters to add

Parameters

  strBuildParams | string to build the filter "chargeDeconvolution|0.02dalton anotherFilter|param1;param2"

Definition at line 135 of file filtersuitestring.cpp.

{
buildFilterFromString(strBuildParams);
}

References buildFilterFromString().

## begin()

FilterSuiteString::FilterNameType::const_iterator pappso::FilterSuiteString::begin | ( |  | ) |

Definition at line 142 of file filtersuitestring.cpp.

{
return m_filterVector.begin();
};
pappso::FilterSuiteString::m_filterVector
std::vector< FilterNameInterfaceCstSPtr > m_filterVector
Definition filtersuitestring.h:74

References m_filterVector.

## buildFilterFromString()

void pappso::FilterSuiteString::buildFilterFromString | ( | const QString & | strBuildParams | ) |

override protected virtual

build this filter using a string

Parameters

  strBuildParams | a string coding the filter and its parameters "filterName|param1;param2;param3"

Implements pappso::FilterNameInterface.

Definition at line 92 of file filtersuitestring.cpp.

{
// qInfo() << strBuildParams;
QStringList filters = strBuildParams.split(" ", Qt::SkipEmptyParts);
for(QString filter_str : filters)
{
if(filter_str.startsWith("complementIonEnhancer|"))
{
m_filterVector.push_back(
std::make_shared<FilterComplementIonEnhancer>(filter_str));
}
else if(filter_str.startsWith("chargeDeconvolution|"))
{
m_filterVector.push_back(
std::make_shared<FilterChargeDeconvolution>(filter_str));
}
else if(filter_str.startsWith("mzExclusion|"))
{
m_filterVector.push_back(
std::make_shared<FilterMzExclusion>(filter_str));
}
else if(filter_str.startsWith("passQuantileBasedRemoveY|"))
{
m_filterVector.push_back(
std::make_shared<FilterQuantileBasedRemoveY>(filter_str));
}
else if(filter_str.startsWith("antiSpike|"))
{
m_filterVector.push_back(
std::make_shared<FilterMorphoAntiSpike>(filter_str));
}
else
{
throw pappso::ExceptionNotRecognized(
QString("building Filter from string %1 is "
"not possible")
.arg(filter_str));
}
}
}
pappso::ExceptionNotRecognized
excetion to use when an item type is not recognized
Definition exceptionnotrecognized.h:42

References m_filterVector.

Referenced by FilterSuiteString(), and addFilterFromString().

## end()

FilterSuiteString::FilterNameType::const_iterator pappso::FilterSuiteString::end | ( |  | ) |

Definition at line 147 of file filtersuitestring.cpp.

{
return m_filterVector.end();
};

References m_filterVector.

## filter()

pappso::Trace & pappso::FilterSuiteString::filter | ( | pappso::Trace & | data_points | ) | const

override virtual

Implements pappso::FilterInterface.

Definition at line 53 of file filtersuitestring.cpp.

{
qDebug();
for(auto &&filter : m_filterVector)
{
qDebug() << filter.get();
qDebug() << filter->toString();
filter->filter(data_points);
}
qDebug();
return data_points;
}
pappso::FilterSuiteString::filter
pappso::Trace & filter(pappso::Trace &data_points) const override
Definition filtersuitestring.cpp:53
pappso::Trace::filter
virtual Trace & filter(const FilterInterface &filter) final
apply a filter on this trace
Definition trace.cpp:1210
pappso::Trace::toString
QString toString() const
Definition trace.cpp:1153

References pappso::Trace::filter(), filter(), m_filterVector, and pappso::Trace::toString().

Referenced by filter(), and toString().

## name()

QString pappso::FilterSuiteString::name | ( |  | ) | const

override virtual

Implements pappso::FilterNameInterface.

Definition at line 71 of file filtersuitestring.cpp.

{
// FIXME: check if this makes sense
return "Suite of filters";
}

## toString()

QString pappso::FilterSuiteString::toString | ( |  | ) | const

override virtual

Implements pappso::FilterNameInterface.

Definition at line 79 of file filtersuitestring.cpp.

{
QStringList filter_str_list;
for(auto &&filter : m_filterVector)
{
filter_str_list << filter->toString();
}
return filter_str_list.join(" ");
}

References filter(), m_filterVector, and pappso::Trace::toString().

## Member Data Documentation

## m_filterVector

std::vector<FilterNameInterfaceCstSPtr> pappso::FilterSuiteString::m_filterVector

private

Definition at line 74 of file filtersuitestring.h.

Referenced by begin(), buildFilterFromString(), end(), filter(), and toString().

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

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