43#include "../../exception/exceptionnotrecognized.h"
44#include "../../exception/exceptionnotpossible.h"
51 : m_newYMax(new_max_y_value)
57 const QString ¶meters)
91 if(parameters.startsWith(QString(
"%1|").arg(
name())))
93 QStringList params = parameters.split(
"|").back().split(
";");
100 QString(
"Building of FilterNormalizeIntensities from string %1 failed")
112 auto max_dp_iter =
maxYDataPoint(trace.cbegin(), trace.cend());
114 if(max_dp_iter == trace.cend())
116 QString(
"Failed to find the max intensity data point in the trace."));
120 QString(
"The max intensity data point in the trace has intensity 0."));
122 double ratio =
m_newYMax / max_dp_iter->y;
131 qDebug() <<
"Now max int:" << max_dp_iter->y;
143 return QString(
"%1").arg(
name()).arg(QString::number(
m_newYMax,
'f', 2));
150 return "FilterNormalizeIntensities";
excetion to use when an item type is not recognized
Sets the maximum intensity of the trace to the provided value.
QString toString() const override
Return a string with the textual representation of the configuration data.
void buildFilterFromString(const QString &strBuildParams) override
build this filter using a string
Trace & filter(Trace &data_points) const override
FilterNormalizeIntensities & operator=(const FilterNormalizeIntensities &other)
virtual ~FilterNormalizeIntensities()
FilterNormalizeIntensities(double new_max_y_value)
QString name() const override
A simple container of DataPoint instances.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::vector< DataPoint >::const_iterator maxYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)