MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / add1DChromLayers

Function add1DChromLayers

src/openms_gui/source/VISUAL/TVSpectraViewController.cpp:64–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 bool add1DChromLayers(const std::vector<int>& indices,
65 Plot1DWidget* target,
66 const LayerDataDefs::ExperimentSharedPtrType& chrom_exp_sptr,
67 const LayerDataDefs::ODExperimentSharedPtrType& ondisc_sptr,
68 const OSWDataSharedPtrType& chrom_annotation,
69 const String& layer_basename,
70 const String& filename)
71 {
72 //
73 for (const auto& index : indices)
74 {
75 // get caption (either chromatogram idx or peptide sequence, if available)
76 String basename_suffix;
77 if (chrom_exp_sptr->metaValueExists("peptide_sequence"))
78 {
79 basename_suffix = String(chrom_exp_sptr->getMetaValue("peptide_sequence"));
80 }
81 ((basename_suffix += "[") += index) += "]";
82
83 // add chromatogram data
84 if (!target->canvas()->addChromLayer(chrom_exp_sptr, ondisc_sptr, chrom_annotation, index, filename, layer_basename, basename_suffix))
85 {
86 return false;
87 }
88 }
89 return true;
90 }
91
92 void TVSpectraViewController::showChromatogramsAsNew1D(const std::vector<int>& indices)
93 {

Callers 2

activate1DSpectrumMethod · 0.85

Calls 4

metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
StringClass · 0.50
addChromLayerMethod · 0.45

Tested by

no test coverage detected