1
// -*- mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
24
// $Maintainer: Clemens Groepl $
26
// --------------------------------------------------------------------------
28
#ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_FITTER1D_H
29
#define OPENMS_TRANSFORMATIONS_FEATUREFINDER_FITTER1D_H
31
#include <OpenMS/DATASTRUCTURES/IsotopeCluster.h>
32
#include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
33
#include <OpenMS/CONCEPT/Exception.h>
34
#include <OpenMS/KERNEL/Feature.h>
35
#include <OpenMS/MATH/STATISTICS/BasicStatistics.h>
36
#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/FeatureFinderDefs.h>
40
class InterpolationModel;
43
@brief Abstract base class for all 1D-dimensional model fitter.
45
Every derived class has to implement the static functions
46
"T* create()" and "const String getProductName()" (see DefaultParamHandler for details)
48
@htmlinclude OpenMS_Fitter1D.parameters
50
@ingroup FeatureFinder
52
class OPENMS_DLLAPI Fitter1D
53
: public DefaultParamHandler,
54
public FeatureFinderDefs
59
typedef IsotopeCluster::IndexSet IndexSet;
60
/// IndexSet with charge information
61
typedef IsotopeCluster::ChargedIndexSet ChargedIndexSet;
63
typedef Feature::CoordinateType CoordinateType;
64
/// Quality of a feature
65
typedef Feature::QualityType QualityType;
66
/// Raw data point type
67
typedef Peak1D PeakType;
68
/// Raw data container type using for the temporary storage of the input data
69
typedef std::vector<PeakType > RawDataArrayType;
71
typedef RawDataArrayType::iterator PeakIterator;
73
/// Default constructor.
77
Fitter1D(const Fitter1D& source);
84
/// assignment operator
85
virtual Fitter1D& operator = (const Fitter1D& source);
87
/// return interpolation model
88
virtual QualityType fit1d(const RawDataArrayType& /* range */, InterpolationModel*& /* model */)
90
throw Exception::NotImplemented(__FILE__,__LINE__,__PRETTY_FUNCTION__);
93
/// register all derived classes here
94
static void registerChildren();
98
/// standard derivation in bounding box
99
CoordinateType tolerance_stdev_box_;
100
/// minimum of the bounding box
102
/// maximum of the bounding box
104
/// standard derivation
105
CoordinateType stdev1_;
106
/// standard derivation
107
CoordinateType stdev2_;
109
Math::BasicStatistics<> statistics_;
110
/// interpolation step size
111
CoordinateType interpolation_step_;
113
virtual void updateMembers_();
119
#endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_FITTER1D_H