50 spectrum.erase(begin_it, spectrum.end());
84 spectrum.erase(spectrum.begin(), last_it);
126 spectrum.erase(begin_it, end_it);
170 if(end_it == spectrum.end())
185 spectrum.erase(end_it, spectrum.end());
186 spectrum.erase(spectrum.begin(), begin_it);
245 qFatal(
"Failed to get point.");
250 qFatal(
"Failed to get height.");
264 if(item.integrationScopeSPtr->isRectangle())
269 if(!item.integrationScopeSPtr->getPoint(point))
270 qFatal(
"Failed to get point.");
274 if(!item.integrationScopeSPtr->getHeight(height))
275 qFatal(
"Failed to get height.");
280 if(!item.integrationScopeSPtr->isRhomboid())
282 "If integration scope is not Rectangle, then it must be "
292 if(!item.integrationScopeSPtr->getBottomMostPoint(point))
293 qFatal(
"Failed to get point.");
296 if(!item.integrationScopeSPtr->getTopMostPoint(point))
297 qFatal(
"Failed to get point.");
315 if(!item.integrationScopeSPtr->getPoint(point))
316 qFatal(
"Failed to get point.");
320 if(!item.integrationScopeSPtr->getHeight(height))
321 qFatal(
"Failed to get height.");
336 qFatal(
"Failed to get point.");
341 qFatal(
"Failed to get height.");
365 qFatal(
"Programming error.");
392 trace = the_filter.
filter(trace);
398 auto begin_it = trace.begin();
399 auto end_it = trace.end();
408 while(iter > begin_it)
421 double checked_value;
431 qFatal(
"Programming error.");
433 checked_value = dt_value;
439 checked_value = rt_value;
444 qFatal(
"Programming error.");
449 if(!spec.integrationScopeSPtr->contains(QPointF(checked_value, iter->x)))
450 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