libpappsomspp
Library for mass spectrometry
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 "
filterinterface.h
"
31
#include <cstddef>
32
#include "../../mzrange.h"
33
#include "../../exportinmportconfig.h"
34
35
namespace
pappso
36
{
37
38
class
PMSPP_LIB_DECL
FilterResampleKeepSmaller :
public
FilterInterface
39
{
40
private
:
41
double
m_value;
42
43
public
:
44
FilterResampleKeepSmaller(
double
x_value);
45
FilterResampleKeepSmaller(
const
FilterResampleKeepSmaller &other);
46
virtual
~FilterResampleKeepSmaller(){};
47
Trace &filter(Trace &trace)
const override
;
48
};
49
50
class
PMSPP_LIB_DECL
FilterResampleKeepGreater :
public
FilterInterface
51
{
52
private
:
53
double
m_value;
54
55
public
:
56
FilterResampleKeepGreater
(
double
x_value);
57
FilterResampleKeepGreater
(
const
FilterResampleKeepGreater
&other);
58
virtual
~
FilterResampleKeepGreater
(){};
59
60
FilterResampleKeepGreater
&operator=(
const
FilterResampleKeepGreater
&other);
61
Trace
&filter(
Trace
&trace)
const override
;
62
63
double
getThresholdX()
const
;
64
};
65
66
class
PMSPP_LIB_DECL
FilterResampleRemoveXRange :
public
FilterInterface
67
{
68
private
:
69
double
m_minX;
70
double
m_maxX;
71
72
public
:
73
FilterResampleRemoveXRange
(
double
min_x,
double
max_x);
74
FilterResampleRemoveXRange
(
const
FilterResampleRemoveXRange
&other);
75
virtual
~
FilterResampleRemoveXRange
(){};
76
77
FilterResampleRemoveXRange
&
78
operator=(
const
FilterResampleRemoveXRange
&other);
79
Trace
&filter(
Trace
&trace)
const override
;
80
};
81
82
class
PMSPP_LIB_DECL
FilterResampleKeepXRange
:
public
FilterInterface
83
{
84
private
:
85
double
m_minX;
86
double
m_maxX;
87
88
public
:
89
FilterResampleKeepXRange
(
double
min_x = 0,
double
max_x = 0);
90
FilterResampleKeepXRange
(
const
FilterResampleKeepXRange
&other);
91
virtual
~
FilterResampleKeepXRange
(){};
92
93
FilterResampleKeepXRange
&operator=(
const
FilterResampleKeepXRange
&other);
94
95
Trace
&filter(
Trace
&trace)
const override
;
96
};
97
98
class
PMSPP_LIB_DECL
MassSpectrumFilterResampleRemoveMzRange
99
:
public
MassSpectrumFilterInterface
100
{
101
private
:
102
const
FilterResampleRemoveXRange
m_filterRange;
103
104
public
:
105
MassSpectrumFilterResampleRemoveMzRange
(
const
MzRange
&mz_range);
106
MassSpectrumFilterResampleRemoveMzRange
(
107
const
MassSpectrumFilterResampleRemoveMzRange
&other);
108
virtual
~
MassSpectrumFilterResampleRemoveMzRange
(){};
109
MassSpectrum
&filter(
MassSpectrum
&spectrum)
const override
;
110
};
111
112
113
class
PMSPP_LIB_DECL
MassSpectrumFilterResampleKeepMzRange
114
:
public
MassSpectrumFilterInterface
115
{
116
private
:
117
const
FilterResampleKeepXRange
m_filterRange;
118
119
public
:
120
MassSpectrumFilterResampleKeepMzRange
(
const
MzRange
&mz_range);
121
MassSpectrumFilterResampleKeepMzRange
(
122
const
MassSpectrumFilterResampleKeepMzRange
&other);
123
virtual
~
MassSpectrumFilterResampleKeepMzRange
(){};
124
MassSpectrum
&filter(
MassSpectrum
&spectrum)
const override
;
125
};
126
}
// namespace pappso
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition:
aa.cpp:39
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition:
massspectrum.h:92
pappso::FilterResampleKeepGreater
Definition:
filterresample.h:69
pappso::FilterInterface
generic interface to apply a filter on a trace
Definition:
filterinterface.h:58
pappso::MassSpectrumFilterResampleKeepMzRange
Definition:
filterresample.h:133
pappso::MassSpectrumFilterResampleRemoveMzRange
Definition:
filterresample.h:118
pappso::MzRange
Definition:
mzrange.h:67
pappso::Trace
A simple container of DataPoint instances.
Definition:
trace.h:132
filterinterface.h
pappso::MassSpectrumFilterInterface
generic interface to apply a filter on a MassSpectrum This is the same as FilterInterface,...
Definition:
filterinterface.h:73
pappso::FilterResampleKeepXRange
Definition:
filterresample.h:101
pappso::FilterResampleRemoveXRange
Definition:
filterresample.h:85
pappsomspp
processing
filters
filterresample.h
Generated on Wed Oct 21 2020 12:29:32 for libpappsomspp by
1.8.18