pappsomspp
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
Trace
&filter(
Trace
&trace)
const override
;
60
61
double
getThresholdX()
const
;
62
};
63
64
class
PMSPP_LIB_DECL
FilterResampleRemoveXRange :
public
FilterInterface
65
{
66
private
:
67
double
m_min_x;
68
double
m_max_x;
69
70
public
:
71
FilterResampleRemoveXRange
(
double
min_x,
double
max_x);
72
FilterResampleRemoveXRange
(
const
FilterResampleRemoveXRange
&other);
73
virtual
~
FilterResampleRemoveXRange
(){};
74
Trace
&filter(
Trace
&trace)
const override
;
75
};
76
77
class
PMSPP_LIB_DECL
FilterResampleKeepXRange
:
public
FilterInterface
78
{
79
private
:
80
double
m_min_x;
81
double
m_max_x;
82
83
public
:
84
FilterResampleKeepXRange
(
double
min_x = 0,
double
max_x = 0);
85
FilterResampleKeepXRange
(
const
FilterResampleKeepXRange
&other);
86
virtual
~
FilterResampleKeepXRange
(){};
87
Trace
&filter(
Trace
&trace)
const override
;
88
};
89
90
class
PMSPP_LIB_DECL
MassSpectrumFilterResampleRemoveMzRange
91
:
public
MassSpectrumFilterInterface
92
{
93
private
:
94
const
FilterResampleRemoveXRange
m_filterRange;
95
96
public
:
97
MassSpectrumFilterResampleRemoveMzRange
(
const
MzRange
&mz_range);
98
MassSpectrumFilterResampleRemoveMzRange
(
99
const
MassSpectrumFilterResampleRemoveMzRange
&other);
100
virtual
~
MassSpectrumFilterResampleRemoveMzRange
(){};
101
MassSpectrum
&filter(
MassSpectrum
&spectrum)
const override
;
102
};
103
104
105
class
PMSPP_LIB_DECL
MassSpectrumFilterResampleKeepMzRange
:
public
MassSpectrumFilterInterface
106
{
107
private
:
108
const
FilterResampleKeepXRange
m_filterRange;
109
110
public
:
111
MassSpectrumFilterResampleKeepMzRange
(
const
MzRange
&mz_range);
112
MassSpectrumFilterResampleKeepMzRange
(
113
const
MassSpectrumFilterResampleKeepMzRange
&other);
114
virtual
~
MassSpectrumFilterResampleKeepMzRange
(){};
115
MassSpectrum
&filter(
MassSpectrum
&spectrum)
const override
;
116
};
117
}
// namespace pappso
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:12
pappso
Definition:
aa.cpp:38
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition:
massspectrum.h:89
pappso::FilterResampleKeepGreater
Definition:
filterresample.h:66
pappso::FilterInterface
generic interface to apply a filter on a trace
Definition:
filterinterface.h:55
pappso::MassSpectrumFilterResampleKeepMzRange
Definition:
filterresample.h:121
pappso::MassSpectrumFilterResampleRemoveMzRange
Definition:
filterresample.h:106
pappso::MzRange
Definition:
mzrange.h:64
pappso::Trace
A simple container of DataPoint instances.
Definition:
trace.h:125
filterinterface.h
pappso::MassSpectrumFilterInterface
generic interface to apply a filter on a MassSpectrum This is the same as FilterInterface,...
Definition:
filterinterface.h:70
pappso::FilterResampleKeepXRange
Definition:
filterresample.h:93
pappso::FilterResampleRemoveXRange
Definition:
filterresample.h:80
pappsomspp
processing
filters
filterresample.h
Generated on Tue Apr 28 2020 14:35:52 for pappsomspp by
1.8.16