libpappsomspp
Library for mass spectrometry
filterlocalmaximum.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/filers/filterlocalmaximum.h
3
* \date 24/09/2019
4
* \author Olivier Langella
5
* \brief filter to select local maximum in a spectrum
6
* inspired from the proteowizard library "LocalMaximumPeakDetector"
7
*/
8
9
/*******************************************************************************
10
* Copyright (c) 2019 Olivier Langella <Olivier.Langella@u-psud.fr>.
11
*
12
* This file is part of the PAPPSOms++ library.
13
*
14
* PAPPSOms++ is free software: you can redistribute it and/or modify
15
* it under the terms of the GNU General Public License as published by
16
* the Free Software Foundation, either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* PAPPSOms++ is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
26
*
27
******************************************************************************/
28
29
#pragma once
30
31
#include "
filterinterface.h
"
32
33
namespace
pappso
34
{
35
36
/**
37
* @brief finds all local maxima, i.e. any point that has a greater y value than
38
* both of its neighboring points and only keep those points
39
*
40
* usefull documentation :
41
* http://pd.chem.ucl.ac.uk/pdnn/peaks/peakindx.htm
42
*/
43
class
PMSPP_LIB_DECL
FilterLocalMaximum :
public
FilterInterface
44
{
45
public
:
46
/**
47
* Default constructor
48
*/
49
FilterLocalMaximum(std::size_t half_window_size);
50
51
/**
52
* Copy constructor
53
*
54
* @param other TODO
55
*/
56
FilterLocalMaximum(
const
FilterLocalMaximum &other);
57
58
/**
59
* Destructor
60
*/
61
virtual
~
FilterLocalMaximum
();
62
Trace
&filter(
Trace
&data_points)
const override
;
63
64
std::size_t getHalfWindowSize()
const
;
65
66
67
private
:
68
std::size_t m_halfWindowSize = 0;
69
};
70
}
// namespace pappso
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:14
pappso
Definition:
aa.cpp:38
pappso::Trace
A simple container of DataPoint instances.
Definition:
trace.h:126
pappso::FilterLocalMaximum
finds all local maxima, i.e. any point that has a greater y value than both of its neighboring points...
Definition:
filterlocalmaximum.h:61
filterinterface.h
pappsomspp
processing
filters
filterlocalmaximum.h
Generated on Thu Jul 9 2020 07:26:14 for libpappsomspp by
1.8.17