Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

PeakShape.h (Maintainer: Eva Lange)

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // --------------------------------------------------------------------------
00005 //                   OpenMS Mass Spectrometry Framework
00006 // --------------------------------------------------------------------------
00007 //  Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert
00008 //
00009 //  This library is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU Lesser General Public
00011 //  License as published by the Free Software Foundation; either
00012 //  version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //  This library is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 //  Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with this library; if not, write to the Free Software
00021 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //
00023 // --------------------------------------------------------------------------
00024 // $Maintainer: Eva Lange $
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 } // namespace OpenMS
00151 
00152 #endif

Generated Tue Apr 1 15:36:36 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1