53 spectrum.erase(begin_it, spectrum.end());
89 spectrum.erase(spectrum.begin(), last_it);
98 : m_minX(min_x), m_maxX(max_x)
134 spectrum.erase(begin_it, end_it);
143 : m_minX(min_x), m_maxX(max_x)
149 : m_minX(other.m_minX), m_maxX(other.m_maxX)
180 if(end_it == spectrum.end())
195 spectrum.erase(end_it, spectrum.end());
196 spectrum.erase(spectrum.begin(), begin_it);
204 : m_filterRange(mz_range.lower(), mz_range.upper())
211 : m_filterRange(other.m_filterRange)
226 : m_filterRange(mz_range.lower(), mz_range.upper())
232 : m_filterRange(other.m_filterRange)
257 qFatal(
"Failed to get point.");
262 qFatal(
"Failed to get height.");
273 integration_scope_specs.end());
277 if(item.integrationScopeSPtr->isRectangle())
282 if(!item.integrationScopeSPtr->getPoint(point))
283 qFatal(
"Failed to get point.");
287 if(!item.integrationScopeSPtr->getHeight(height))
288 qFatal(
"Failed to get height.");
293 if(!item.integrationScopeSPtr->isRhomboid())
295 "If integration scope is not Rectangle, then it must be "
305 if(!item.integrationScopeSPtr->getBottomMostPoint(point))
306 qFatal(
"Failed to get point.");
309 if(!item.integrationScopeSPtr->getTopMostPoint(point))
310 qFatal(
"Failed to get point.");
328 if(!item.integrationScopeSPtr->getPoint(point))
329 qFatal(
"Failed to get point.");
333 if(!item.integrationScopeSPtr->getHeight(height))
334 qFatal(
"Failed to get height.");
349 qFatal(
"Failed to get point.");
354 qFatal(
"Failed to get height.");
379 qFatal(
"Programming error.");
387 double rt_value)
const
408 trace = the_filter.
filter(trace);
414 auto begin_it = trace.begin();
415 auto end_it = trace.end();
424 while(iter > begin_it)
437 double checked_value;
447 qFatal(
"Programming error.");
449 checked_value = dt_value;
455 checked_value = rt_value;
460 qFatal(
"Programming error.");
465 if(!spec.integrationScopeSPtr->contains(
466 QPointF(checked_value, iter->x)))
467 iter = trace.erase(iter);
double getThresholdX() const
FilterResampleKeepGreater & operator=(const FilterResampleKeepGreater &other)
FilterResampleKeepGreater(double x_value)
Trace & filter(Trace &trace) const override
void newSelectionPolygonSpec(const IntegrationScopeSpec &integration_scope_spec)
IntegrationScopeSpecVector m_integrationScopeSpecs
FilterResampleKeepPointInPolygon & operator=(const FilterResampleKeepPointInPolygon &other)
Trace & filter(Trace &trace) const override
FilterResampleKeepPointInPolygon()
Trace & filter(Trace &trace) const override
FilterResampleKeepSmaller(double x_value)
FilterResampleKeepXRange & operator=(const FilterResampleKeepXRange &other)
FilterResampleKeepXRange(double min_x=0, double max_x=0)
Trace & filter(Trace &trace) const override
FilterResampleRemoveXRange(double min_x, double max_x)
FilterResampleRemoveXRange & operator=(const FilterResampleRemoveXRange &other)
Trace & filter(Trace &trace) const override
MassSpectrumFilterResampleKeepMzRange(const MzRange &mz_range)
MassSpectrum & filter(MassSpectrum &spectrum) const override
const FilterResampleKeepXRange m_filterRange
const FilterResampleRemoveXRange m_filterRange
MassSpectrumFilterResampleRemoveMzRange(const MzRange &mz_range)
MassSpectrum & filter(MassSpectrum &spectrum) const override
Class to represent a mass spectrum.
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 >::iterator findFirstEqualOrGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is equal or greater than the value searched important : it implies ...
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...
std::shared_ptr< IntegrationScopeBase > IntegrationScopeBaseSPtr
std::vector< IntegrationScopeSpec > IntegrationScopeSpecVector