libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
filterresample.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/filers/filterresample.h
3 * \date 28/04/2019
4 * \author Olivier Langella
5 * \brief collection of filters concerned by X selection
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2019 Olivier Langella <Olivier.Langella@u-psud.fr>.
10 *
11 * This file is part of the PAPPSOms++ library.
12 *
13 * PAPPSOms++ is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * PAPPSOms++ is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
25 *
26 ******************************************************************************/
27
28#pragma once
29
30#include <cstddef>
31
32
33#include "../../exportinmportconfig.h"
34#include "filterinterface.h"
35#include "../../mzrange.h"
36#include "../combiners/integrationscopebase.h"
37
38namespace pappso
39{
40
42{
43 private:
44 double m_value;
45
46 public:
47 FilterResampleKeepSmaller(double x_value);
50 Trace &filter(Trace &trace) const override;
51};
52
53
55{
56 private:
57 double m_value;
58
59 public:
60 FilterResampleKeepGreater(double x_value);
63
65 Trace &filter(Trace &trace) const override;
66
67 double getThresholdX() const;
68};
69
70
72{
73 private:
74 double m_minX;
75 double m_maxX;
76
77 public:
78 FilterResampleRemoveXRange(double min_x, double max_x);
81
83 operator=(const FilterResampleRemoveXRange &other);
84 Trace &filter(Trace &trace) const override;
85};
86
87
89{
90 private:
91 double m_minX;
92 double m_maxX;
93
94 public:
95 FilterResampleKeepXRange(double min_x = 0, double max_x = 0);
98
100
101 Trace &filter(Trace &trace) const override;
102};
103
104
105using IntegrationScopeSpecVector = std::vector<IntegrationScopeSpec>;
106
108{
109 public:
111
113 DataKind data_kind);
114
116 const IntegrationScopeSpecVector &integration_scope_specs);
117
120
122
123 void
124 newSelectionPolygonSpec(const IntegrationScopeSpec &integration_scope_spec);
125
127 operator=(const FilterResampleKeepPointInPolygon &other);
128
129 using FilterInterface::filter;
130
131 Trace &filter(Trace &trace) const override;
132 Trace &filter(Trace &trace, double dt_value, double rt_value) const;
133
134 private:
136 double m_lowestMz = std::numeric_limits<double>::max();
137 double m_greatestMz = std::numeric_limits<double>::min();
138};
139
140
154
155
169
170
171} // namespace pappso
generic interface to apply a filter on a trace
IntegrationScopeSpecVector m_integrationScopeSpecs
generic interface to apply a filter on a MassSpectrum This is the same as FilterInterface,...
const FilterResampleKeepXRange m_filterRange
const FilterResampleRemoveXRange m_filterRange
Class to represent a mass spectrum.
A simple container of DataPoint instances.
Definition trace.h:148
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< IntegrationScopeBase > IntegrationScopeBaseSPtr
DataKind
Definition types.h:215
std::vector< IntegrationScopeSpec > IntegrationScopeSpecVector