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: Marc Sturm$ 00025 // -------------------------------------------------------------------------- 00026 00027 00028 #ifndef OPENMS_VISUAL_DIALOGS_LAYERSTATISTICSDIALOG_H 00029 #define OPENMS_VISUAL_DIALOGS_LAYERSTATISTICSDIALOG_H 00030 00031 #include <OpenMS/VISUAL/DIALOGS/UIC/LayerStatisticsDialogTemplate.h> 00032 #include <OpenMS/VISUAL/SpectrumWidget.h> 00033 00034 #include <QtGui/QPushButton> 00035 00036 #include <utility> 00037 #include <map> 00038 00039 namespace OpenMS 00040 { 00046 class LayerStatisticsDialog 00047 : public QDialog, 00048 public Ui::LayerStatisticsDialogTemplate 00049 { 00050 Q_OBJECT 00051 00052 public: 00053 00055 LayerStatisticsDialog(SpectrumWidget* parent); 00056 00057 protected slots: 00058 00059 protected: 00060 00064 struct MetaStatsValue_ 00065 { 00066 MetaStatsValue_(unsigned long c = 0, DoubleReal mi = 0, DoubleReal ma = 0, DoubleReal a = 0) 00067 { 00068 count = c; 00069 min = mi; 00070 max = ma; 00071 avg = a; 00072 } 00073 00074 unsigned long count; 00075 DoubleReal min, max, avg; 00076 }; 00077 00079 typedef MSExperiment<>::ConstIterator RTIterator_; 00081 typedef MSSpectrum<>::ConstIterator PeakIterator_; 00083 typedef FeatureMap<>::ConstIterator FeatureIterator_; 00085 typedef std::map<UInt, MetaStatsValue_>::iterator MetaIterator_; 00086 00088 void computePeakStats_(); 00090 void computeFeatureStats_(); 00092 void bringInMetaStats_(const MetaInfoInterface& meta_interface); 00094 void computeMetaAverages_(); 00095 00097 std::map<UInt,MetaStatsValue_> meta_stats_; 00099 SpectrumCanvas* canvas_; 00101 LayerData layer_data_; 00103 DoubleReal min_intensity_; 00105 DoubleReal max_intensity_; 00107 DoubleReal avg_intensity_; 00109 DoubleReal min_charge_; 00111 DoubleReal max_charge_; 00113 DoubleReal avg_charge_; 00115 DoubleReal min_quality_; 00117 DoubleReal max_quality_; 00119 DoubleReal avg_quality_; 00120 00121 private: 00123 LayerStatisticsDialog(); 00124 00125 }; 00126 00127 } 00128 #endif // OPENMS_VISUAL_DIALOGS_LAYERSTATISTICSDIALOG_H
Generated Tue Apr 1 15:36:35 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |