00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef OPENMS_TRANSFORMATIONS_RAW2PEAK_PEAKSHAPE_H
00029 #define OPENMS_TRANSFORMATIONS_RAW2PEAK_PEAKSHAPE_H
00030
00031 #include <math.h>
00032
00033 #include <OpenMS/CONCEPT/Types.h>
00034 #include <OpenMS/KERNEL/PickedPeak1D.h>
00035
00036 namespace OpenMS
00037 {
00038
00044 class PeakShape
00045 {
00046 public:
00048 typedef RawDataPoint1D RawDataPointType;
00050 typedef std::vector<RawDataPointType>::iterator RawDataPointIterator;
00051
00053 PeakShape()
00054 : height(0),
00055 mz_position(0),
00056 left_width(0),
00057 right_width(0),
00058 area(0),
00059 r_value(0),
00060 signal_to_noise(0.),
00061 left_endpoint(0),
00062 right_endpoint(0),
00063 type(PeakShapeType::UNDEFINED)
00064 {}
00066 PeakShape(double height_,
00067 double mz_position_,
00068 double left_width_,
00069 double right_width_,
00070 double area_,
00071 RawDataPointIterator left_,
00072 RawDataPointIterator right_,
00073 PeakShapeType::Enum type_);
00075 PeakShape(const PeakShape& peakshape);
00077 virtual ~PeakShape(){}
00079 PeakShape& operator = (const PeakShape& peakshape);
00080 bool operator == (const PeakShape& pf) const;
00081
00083 double operator() (double x) const;
00085 double getSymmetricMeasure() const;
00087 double getFWHM() const;
00089 double height;
00091 double mz_position;
00093 double left_width;
00095 double right_width;
00097 double area;
00102 double r_value;
00104 double signal_to_noise;
00106 RawDataPointIterator left_endpoint;
00108 RawDataPointIterator right_endpoint;
00109
00124 PeakShapeType::Enum type;
00125
00126
00132 class PositionLess
00133 {
00134 public:
00135
00136 PositionLess(Int i) : dimension_(i) {}
00137 PositionLess() : dimension_(-1) {}
00138 ~PositionLess() {}
00139
00140 inline bool operator () (const PeakShape& a, const PeakShape& b)
00141 {
00142 return (a.mz_position < b.mz_position);
00143 }
00144
00145 protected:
00146 Int dimension_;
00147 };
00148
00149 };
00150 }
00151
00152 #endif