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
& operator=(
const
FilterResampleRemoveXRange
&other);
78
Trace
&filter(
Trace
&trace)
const override
;
79
};
80
81
class
PMSPP_LIB_DECL
FilterResampleKeepXRange
:
public
FilterInterface
82
{
83
private
:
84
double
m_minX;
85
double
m_maxX;
86
87
public
:
88
FilterResampleKeepXRange
(
double
min_x = 0,
double
max_x = 0);
89
FilterResampleKeepXRange
(
const
FilterResampleKeepXRange
&other);
90
virtual
~
FilterResampleKeepXRange
(){};
91
92
FilterResampleKeepXRange
&operator=(
const
FilterResampleKeepXRange
&other);
93
94
Trace
&filter(
Trace
&trace)
const override
;
95
};
96
97
class
PMSPP_LIB_DECL
MassSpectrumFilterResampleRemoveMzRange
98
:
public
MassSpectrumFilterInterface
99
{
100
private
:
101
const
FilterResampleRemoveXRange
m_filterRange;
102
103
public
:
104
MassSpectrumFilterResampleRemoveMzRange
(
const
MzRange
&mz_range);
105
MassSpectrumFilterResampleRemoveMzRange
(
106
const
MassSpectrumFilterResampleRemoveMzRange
&other);
107
virtual
~
MassSpectrumFilterResampleRemoveMzRange
(){};
108
MassSpectrum
&filter(
MassSpectrum
&spectrum)
const override
;
109
};
110
111
112
class
PMSPP_LIB_DECL
MassSpectrumFilterResampleKeepMzRange
113
:
public
MassSpectrumFilterInterface
114
{
115
private
:
116
const
FilterResampleKeepXRange
m_filterRange;
117
118
public
:
119
MassSpectrumFilterResampleKeepMzRange
(
const
MzRange
&mz_range);
120
MassSpectrumFilterResampleKeepMzRange
(
121
const
MassSpectrumFilterResampleKeepMzRange
&other);
122
virtual
~
MassSpectrumFilterResampleKeepMzRange
(){};
123
MassSpectrum
&filter(
MassSpectrum
&spectrum)
const override
;
124
};
125
}
// 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
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:132
pappso::MassSpectrumFilterResampleRemoveMzRange
Definition:
filterresample.h:117
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:100
pappso::FilterResampleRemoveXRange
Definition:
filterresample.h:85
pappsomspp
processing
filters
filterresample.h
Generated on Mon Aug 24 2020 17:42:19 for libpappsomspp by
1.8.18