35 #ifndef OPENMS_VISUAL_DIALOGS_LAYERSTATISTICSDIALOG_H 36 #define OPENMS_VISUAL_DIALOGS_LAYERSTATISTICSDIALOG_H 39 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 41 #include <OpenMS/VISUAL/DIALOGS/UIC/ui_LayerStatisticsDialog.h> 44 #include <QtGui/QPushButton> 61 public Ui::LayerStatisticsDialogTemplate
73 void showDistribution_();
104 void computePeakStats_();
106 void computeFeatureStats_();
108 void computeConsensusStats_();
110 template <
typename MetaDataIterator>
111 void computeMetaDataArrayStats_(MetaDataIterator begin, MetaDataIterator end);
115 void computeMetaAverages_();
156 template <
typename MetaDataIterator>
159 for (MetaDataIterator meta_array_it = begin; meta_array_it != end; meta_array_it++)
161 String meta_name = meta_array_it->getName();
163 std::map<String, MetaStatsValue_>::iterator it = meta_array_stats_.find(meta_name);
164 if (it != meta_array_stats_.end())
166 meta_stats_value = it->second;
167 for (
typename MetaDataIterator::value_type::const_iterator value_it = meta_array_it->begin(); value_it != meta_array_it->end(); value_it++)
169 float value = *value_it;
170 meta_stats_value.
count++;
171 if (value < meta_stats_value.
min)
173 meta_stats_value.
min = value;
175 else if (value > meta_stats_value.
max)
177 meta_stats_value.
max = value;
179 meta_stats_value.
avg += value;
181 it->second = meta_stats_value;
183 else if (meta_array_it->size() > 0)
185 float init_value = *(meta_array_it->begin());
187 for (
typename MetaDataIterator::value_type::const_iterator value_it = meta_array_it->begin(); value_it != meta_array_it->end(); value_it++)
189 float value = *value_it;
190 meta_stats_value.
count++;
191 if (value < meta_stats_value.
min)
193 meta_stats_value.
min = value;
195 else if (value > meta_stats_value.
max)
197 meta_stats_value.
max = value;
199 meta_stats_value.
avg += value;
201 meta_array_stats_.insert(make_pair(meta_name, meta_stats_value));
207 #endif // OPENMS_VISUAL_DIALOGS_LAYERSTATISTICSDIALOG_H Base::const_iterator ConstIterator
Definition: FeatureMap.h:139
std::map< String, MetaStatsValue_ > meta_array_stats_
Map containing the statistics about the FloatDataArrays of all spectra in this layer.
Definition: LayerStatisticsDialog.h:120
A more convenient string class.
Definition: String.h:57
double min_charge_
Minimum charge value.
Definition: LayerStatisticsDialog.h:132
double avg_elements_
Average number of elements (for consensus features only)
Definition: LayerStatisticsDialog.h:148
void computeMetaDataArrayStats_(MetaDataIterator begin, MetaDataIterator end)
Computes the statistics of all meta data contained in the FloatDataArray or IntegerDataArray of an MS...
Definition: LayerStatisticsDialog.h:157
double avg_quality_
Average quality value.
Definition: LayerStatisticsDialog.h:142
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:96
double min_elements_
Minimum number of elements (for consensus features only)
Definition: LayerStatisticsDialog.h:144
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double max_charge_
Maximum charge value.
Definition: LayerStatisticsDialog.h:134
double avg_intensity_
Average intensity value.
Definition: LayerStatisticsDialog.h:130
std::map< UInt, MetaStatsValue_ > meta_stats_
Map containing the statistics about all meta information of the peaks/features in the layer...
Definition: LayerStatisticsDialog.h:118
Dialog showing statistics about the data of the current layer.
Definition: LayerStatisticsDialog.h:59
double min_quality_
Minimum quality value.
Definition: LayerStatisticsDialog.h:138
std::map< UInt, MetaStatsValue_ >::iterator MetaIterator_
Iterates over the meta_stats map.
Definition: LayerStatisticsDialog.h:101
double avg_charge_
Average charge value.
Definition: LayerStatisticsDialog.h:136
LayerData::ExperimentType::SpectrumType::ConstIterator PeakIterator_
Iterates over peaks of a spectrum.
Definition: LayerStatisticsDialog.h:95
LayerData::ConsensusMapType::ConstIterator ConsensusIterator_
Iterates over features of a feature map.
Definition: LayerStatisticsDialog.h:99
double max_elements_
Maximum number of elements (for consensus features only)
Definition: LayerStatisticsDialog.h:146
LayerData layer_data_
The LayerData object we compute statistics about.
Definition: LayerStatisticsDialog.h:124
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:118
LayerData::FeatureMapType::ConstIterator FeatureIterator_
Iterates over features of a feature map.
Definition: LayerStatisticsDialog.h:97
SpectrumCanvas * canvas_
The canvas of the layer.
Definition: LayerStatisticsDialog.h:122
double min_intensity_
Minimum intensity value.
Definition: LayerStatisticsDialog.h:126
std::vector< ConsensusFeature >::const_iterator ConstIterator
Non-mutable iterator.
Definition: ConsensusMap.h:137
double max_intensity_
Maximum intensity value.
Definition: LayerStatisticsDialog.h:128
double max_quality_
Maximum quality value.
Definition: LayerStatisticsDialog.h:140
Class that stores the data for one layer.
Definition: LayerData.h:62