38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
42 #include <QtWidgets/QDialog>
43 #include <QtWidgets/QPushButton>
50 class LayerStatisticsDialogTemplate;
115 template <
typename MetaDataIterator>
116 void computeMetaDataArrayStats_(MetaDataIterator begin, MetaDataIterator end);
159 Ui::LayerStatisticsDialogTemplate*
ui_;
163 template <
typename MetaDataIterator>
166 for (MetaDataIterator meta_array_it = begin; meta_array_it != end; meta_array_it++)
168 String meta_name = meta_array_it->getName();
170 std::map<String, MetaStatsValue_>::iterator it =
meta_array_stats_.find(meta_name);
173 meta_stats_value = it->second;
174 for (
typename MetaDataIterator::value_type::const_iterator value_it = meta_array_it->begin(); value_it != meta_array_it->end(); value_it++)
176 float value = *value_it;
177 meta_stats_value.
count++;
178 if (value < meta_stats_value.
min)
180 meta_stats_value.
min = value;
182 else if (value > meta_stats_value.
max)
184 meta_stats_value.
max = value;
186 meta_stats_value.
avg += value;
188 it->second = meta_stats_value;
190 else if (meta_array_it->size() > 0)
192 float init_value = *(meta_array_it->begin());
194 for (
typename MetaDataIterator::value_type::const_iterator value_it = meta_array_it->begin(); value_it != meta_array_it->end(); value_it++)
196 float value = *value_it;
197 meta_stats_value.
count++;
198 if (value < meta_stats_value.
min)
200 meta_stats_value.
min = value;
202 else if (value > meta_stats_value.
max)
204 meta_stats_value.
max = value;
206 meta_stats_value.
avg += value;
std::vector< ConsensusFeature >::const_iterator ConstIterator
Non-mutable iterator.
Definition: ConsensusMap.h:176
Base::const_iterator ConstIterator
Definition: FeatureMap.h:144
Class that stores the data for one layer.
Definition: LayerData.h:96
Dialog showing statistics about the data of the current layer.
Definition: LayerStatisticsDialog.h:65
double min_intensity_
Minimum intensity value.
Definition: LayerStatisticsDialog.h:131
double avg_quality_
Average quality value.
Definition: LayerStatisticsDialog.h:147
void computeConsensusStats_()
Computes the statistics of a consensus feature layer.
LayerData::ConsensusMapType::ConstIterator ConsensusIterator_
Iterates over features of a feature map.
Definition: LayerStatisticsDialog.h:104
void computeMetaAverages_()
Computes the averages of all meta values stored in meta_stats and meta_array_stats.
void showDistribution_()
Shows the distribution according to the clicked button.
double max_elements_
Maximum number of elements (for consensus features only)
Definition: LayerStatisticsDialog.h:151
const LayerData & layer_data_
The LayerData object we compute statistics about.
Definition: LayerStatisticsDialog.h:129
std::map< UInt, MetaStatsValue_ > meta_stats_
Map containing the statistics about all meta information of the peaks/features in the layer.
Definition: LayerStatisticsDialog.h:123
double max_quality_
Maximum quality value.
Definition: LayerStatisticsDialog.h:145
std::map< UInt, MetaStatsValue_ >::iterator MetaIterator_
Iterates over the meta_stats map.
Definition: LayerStatisticsDialog.h:106
LayerStatisticsDialog(PlotWidget *parent)
Constructor.
double avg_charge_
Average charge value.
Definition: LayerStatisticsDialog.h:141
LayerData::FeatureMapType::ConstIterator FeatureIterator_
Iterates over features of a feature map.
Definition: LayerStatisticsDialog.h:102
double avg_elements_
Average number of elements (for consensus features only)
Definition: LayerStatisticsDialog.h:153
void computeFeatureStats_()
Computes the statistics of a feature layer.
void bringInMetaStats_(const MetaInfoInterface &meta_interface)
Brings the meta values of one meta_interface (a peak or feature) into the statistics.
PlotCanvas * canvas_
The canvas of the layer.
Definition: LayerStatisticsDialog.h:127
LayerData::ExperimentType::SpectrumType::ConstIterator PeakIterator_
Iterates over peaks of a spectrum.
Definition: LayerStatisticsDialog.h:100
double max_intensity_
Maximum intensity value.
Definition: LayerStatisticsDialog.h:133
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:164
Ui::LayerStatisticsDialogTemplate * ui_
Definition: LayerStatisticsDialog.h:159
LayerStatisticsDialog()
Not implemented.
double avg_intensity_
Average intensity value.
Definition: LayerStatisticsDialog.h:135
double max_charge_
Maximum charge value.
Definition: LayerStatisticsDialog.h:139
void computePeakStats_()
Computes the statistics of a peak layer.
double min_charge_
Minimum charge value.
Definition: LayerStatisticsDialog.h:137
std::map< String, MetaStatsValue_ > meta_array_stats_
Map containing the statistics about the FloatDataArrays of all spectra in this layer.
Definition: LayerStatisticsDialog.h:125
double min_elements_
Minimum number of elements (for consensus features only)
Definition: LayerStatisticsDialog.h:149
double min_quality_
Minimum quality value.
Definition: LayerStatisticsDialog.h:143
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:113
Base class for visualization canvas classes.
Definition: PlotCanvas.h:136
A more convenient string class.
Definition: String.h:61
const double c
Definition: Constants.h:209
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: SwathWizardBase.h:63