85 template <
typename SpectrumType>
88 if (spectrum.empty())
return;
95 if (method_ ==
"to_one")
97 divisor = spectrum.begin()->getIntensity();
98 for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
100 if (divisor < it->getIntensity()) divisor = it->getIntensity();
103 else if (method_ ==
"to_TIC")
105 for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
107 divisor += it->getIntensity();
117 for (Iterator it = spectrum.begin(); it != spectrum.end(); ++it)
119 it->setIntensity(it->getIntensity() / divisor);
129 void filterPeakMap(
PeakMap & exp)
const;
131 void updateMembers_()
override;
A more convenient string class.
Definition: String.h:57
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:103
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:101
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
void filterSpectrum(SpectrumType &spectrum) const
Definition: Normalizer.h:86
Invalid value exception.
Definition: Exception.h:335
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
Normalizes the peak intensities spectrum-wise.
Definition: Normalizer.h:57
String method_
Definition: Normalizer.h:136