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

mean filter apply mean of y values inside the window : this results in a kind of smoothing More...

`#include <filtermorpho.h>`

Inheritance diagram for pappso::FilterMorphoMean:

## Public Member Functions

| FilterMorphoMean (const QString &strBuildParams)
| FilterMorphoMean (std::size_t half_window_size)
| FilterMorphoMean (const FilterMorphoMean &other)
virtual | ~FilterMorphoMean ()
FilterMorphoMean & | operator= (const FilterMorphoMean &other)
void | buildFilterFromString (const QString &strBuildParams) override
| build this filter using a string
QString | toString () const override
QString | name () const override
Public Member Functions inherited from pappso::FilterMorphoWindowBase
| FilterMorphoWindowBase (std::size_t half_window_size)
| FilterMorphoWindowBase (const FilterMorphoWindowBase &other)
virtual | ~FilterMorphoWindowBase ()
FilterMorphoWindowBase & | operator= (const FilterMorphoWindowBase &other)
virtual Trace & | filter (Trace &data_points) const override
virtual std::size_t | getHalfWindowSize () const
Public Member Functions inherited from pappso::FilterNameInterface
virtual | ~FilterNameInterface ()
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Protected Member Functions

double | getWindowValue (std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const override
Protected Member Functions inherited from pappso::FilterMorphoWindowBase
void | buildFilterFromString (const QString &strBuildParams) override
| build this filter using a string

## Additional Inherited Members

Protected Attributes inherited from pappso::FilterMorphoWindowBase
std::size_t | m_halfWindowSize = 0

## Detailed Description

mean filter apply mean of y values inside the window : this results in a kind of smoothing

Definition at line 224 of file filtermorpho.h.

## Constructor & Destructor Documentation

## FilterMorphoMean() [1/3]

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

Definition at line 464 of file filtermorpho.cpp.

: FilterMorphoWindowBase(0)
{
buildFilterFromString(strBuildParams);
}
pappso::FilterMorphoMean::buildFilterFromString
void buildFilterFromString(const QString &strBuildParams) override
build this filter using a string
Definition filtermorpho.cpp:394
pappso::FilterMorphoWindowBase::FilterMorphoWindowBase
FilterMorphoWindowBase(std::size_t half_window_size)
Definition filtermorpho.cpp:36

References pappso::FilterMorphoWindowBase::FilterMorphoWindowBase(), and buildFilterFromString().

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

## FilterMorphoMean() [2/3]

FilterMorphoMean::FilterMorphoMean | ( | std::size_t | half_window_size | ) |

Definition at line 440 of file filtermorpho.cpp.

: FilterMorphoWindowBase(half_window_size)
{
}

References pappso::FilterMorphoWindowBase::FilterMorphoWindowBase().

## FilterMorphoMean() [3/3]

FilterMorphoMean::FilterMorphoMean | ( | const FilterMorphoMean & | other | ) |

Definition at line 444 of file filtermorpho.cpp.

: FilterMorphoWindowBase(other.m_halfWindowSize)
{
}
pappso::FilterMorphoWindowBase::m_halfWindowSize
std::size_t m_halfWindowSize
Definition filtermorpho.h:66

References FilterMorphoMean(), pappso::FilterMorphoWindowBase::FilterMorphoWindowBase(), and pappso::FilterMorphoWindowBase::m_halfWindowSize.

## ~FilterMorphoMean()

virtual pappso::FilterMorphoMean::~FilterMorphoMean | ( |  | ) |

inline virtual

Definition at line 231 of file filtermorpho.h.

{};

## Member Function Documentation

## buildFilterFromString()

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

override 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 394 of file filtermorpho.cpp.

{
if(strBuildParams.startsWith(QString("%1|").arg(name())))
{
QStringList params = strBuildParams.split("|").back().split(";");
m_halfWindowSize = params.at(0).toDouble();
}
else
{
throw pappso::ExceptionNotRecognized(
QString("Building of FilterMorphoMean from string %1 failed").arg(strBuildParams));
}
}
pappso::FilterMorphoMean::name
QString name() const override
Definition filtermorpho.cpp:418

References pappso::FilterMorphoWindowBase::m_halfWindowSize, and name().

Referenced by FilterMorphoMean().

## getWindowValue()

double FilterMorphoMean::getWindowValue | ( | std::vector< DataPoint >::const_iterator | begin,
|  | std::vector< DataPoint >::const_iterator | end ) const

override protected virtual

Implements pappso::FilterMorphoWindowBase.

Definition at line 458 of file filtermorpho.cpp.

{
return meanYTrace(begin, end);
}
pappso::meanYTrace
double meanYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the mean of y value of a trace
Definition trace.cpp:234

References pappso::meanYTrace().

## name()

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

override virtual

Reimplemented from pappso::FilterMorphoWindowBase.

Definition at line 418 of file filtermorpho.cpp.

{
return "morphoMean";
}

Referenced by buildFilterFromString(), and toString().

## operator=()

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

Definition at line 450 of file filtermorpho.cpp.

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

References FilterMorphoMean(), and pappso::FilterMorphoWindowBase::m_halfWindowSize.

## toString()

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

override virtual

Reimplemented from pappso::FilterMorphoWindowBase.

Definition at line 410 of file filtermorpho.cpp.

{
QString strCode = QString("%1|%2").arg(name()).arg(m_halfWindowSize);
return strCode;
}

References pappso::FilterMorphoWindowBase::m_halfWindowSize, and name().

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

- pappsomspp/core/processing/filters/filtermorpho.h
- pappsomspp/core/processing/filters/filtermorpho.cpp