| OpenMS 2.5.0

SpectrumCanvas.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34
35 #pragma once
36
37 // OpenMS_GUI config
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
39
40 //OpenMS
41 #include <OpenMS/CONCEPT/Types.h>
42 #include <OpenMS/CONCEPT/VersionInfo.h>
43 #include <OpenMS/DATASTRUCTURES/DRange.h>
44 #include <OpenMS/VISUAL/LayerData.h>
45 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
46
47 //QT
48 #include <QtWidgets>
49 #include <QRubberBand>
50
51 class QWheelEvent;
52 class QKeyEvent;
53 class QMouseEvent;
54 class QFocusEvent;
55 class QMenu;
56
57 //STL
58 #include <stack>
59 #include <vector>
60
61 namespace OpenMS
62 {
63 class SpectrumWidget;
64
98 class OPENMS_GUI_DLLAPI SpectrumCanvas :
99 public QWidget,
100 public DefaultParamHandler
101 {
102 Q_OBJECT
103
104 public:
107
109 typedef LayerData::ExperimentType ExperimentType;
111 typedef LayerData::ExperimentSharedPtrType ExperimentSharedPtrType;
112 typedef LayerData::ConstExperimentSharedPtrType ConstExperimentSharedPtrType;
113 typedef LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType;
115 typedef LayerData::FeatureMapType FeatureMapType;
117 typedef LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType;
119 typedef LayerData::ConsensusMapType ConsensusMapType;
121 typedef LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType;
122
124 typedef ExperimentType::SpectrumType SpectrumType;
126 typedef SpectrumType::ConstIterator SpectrumConstIteratorType;
128 typedef SpectrumType::PeakType PeakType;
130 typedef FeatureMapType::FeatureType FeatureType;
131
133 typedef DPosition<2> PointType;
135 typedef DRange<2> AreaType;
136
137
139 enum ActionModes
140 {
141 AM_TRANSLATE,
142 AM_ZOOM,
143 AM_MEASURE
144 };
145
147 enum IntensityModes
148 {
149 IM_NONE,
150 IM_PERCENTAGE,
151 IM_SNAP,
152 IM_LOG
153 };
154
156
158 SpectrumCanvas(const Param & preferences, QWidget * parent = nullptr);
159
161 ~SpectrumCanvas() override;
162
170 inline void setSpectrumWidget(SpectrumWidget * widget)
171 {
172 spectrum_widget_ = widget;
173 }
174
181 inline SpectrumWidget * getSpectrumWidget() const
182 {
183 return spectrum_widget_;
184 }
185
192 inline Int getActionMode() const
193 {
194 return action_mode_;
195 }
196
204 inline IntensityModes getIntensityMode() const
205 {
206 return intensity_mode_;
207 }
208
218 inline void setIntensityMode(IntensityModes mod)
219 {
220 intensity_mode_ = mod;
221 intensityModeChange_();
222 }
223
229 inline bool gridLinesShown() const
230 {
231 return show_grid_;
232 }
233
235 inline const LayerData & getLayer(Size index) const
236 {
237 OPENMS_PRECONDITION(index < layers_.size(), "SpectrumCanvas::getLayer(index) index overflow");
238 return layers_[index];
239 }
240
242 inline const LayerData & getCurrentLayer() const
243 {
244 OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::getCurrentLayer() index overflow");
245 return layers_[current_layer_];
246 }
247
249 inline Size getCurrentLayerIndex() const
250 {
251 return current_layer_;
252 }
253
255 inline LayerData & getCurrentLayer()
256 {
257 OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::getCurrentLayer() index overflow");
258 return layers_[current_layer_];
259 }
260
262 bool getLayerFlag(LayerData::Flags f) const
263 {
264 return getLayerFlag(current_layer_, f);
265 }
266
268 void setLayerFlag(LayerData::Flags f, bool value)
269 {
270 setLayerFlag(current_layer_, f, value);
271 }
272
274 bool getLayerFlag(Size layer, LayerData::Flags f) const
275 {
276 OPENMS_PRECONDITION(layer < layers_.size(), "SpectrumCanvas::getLayerFlag() index overflow");
277 return layers_[layer].flags.test(f);
278 }
279
281 void setLayerFlag(Size layer, LayerData::Flags f, bool value)
282 {
283 //abort if there are no layers
284 if (layers_.empty()) return;
285
286 OPENMS_PRECONDITION(layer < layers_.size(), "SpectrumCanvas::setLayerFlag() index overflow");
287
288 layers_[layer].flags.set(f, value);
289 update_buffer_ = true;
290 update();
291 }
292
293 inline void setLabel(LayerData::LabelType label)
294 {
295 //abort if there are no layers
296 if (layers_.empty()) return;
297
298 OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::setLabel() index overflow");
299 layers_[current_layer_].label = label;
300
301 update_buffer_ = true;
302 update();
303 }
304
310 inline const AreaType & getVisibleArea() const
311 {
312 return visible_area_;
313 }
314
318 virtual void setFilters(const DataFilters & filters);
319
321 inline bool isMzToXAxis()
322 {
323 return mz_to_x_axis_;
324 }
325
327 void mzToXAxis(bool mz_to_x_axis);
328
335 inline Size getLayerCount() const
337 {
338 return layers_.size();
339 }
340
342 Size activeLayerIndex() const;
344 virtual void activateLayer(Size layer_index) = 0;
346 virtual void removeLayer(Size layer_index) = 0;
347
361 bool addLayer(ExperimentSharedPtrType map, ODExperimentSharedPtrType od_map, const String & filename = "");
362
371 bool addLayer(FeatureMapSharedPtrType map, const String & filename = "");
372
381 bool addLayer(ConsensusMapSharedPtrType map, const String & filename = "");
383
392 bool addLayer(std::vector<PeptideIdentification> & peptides,
393 const String & filename = "");
394
396 inline float getCurrentMinIntensity() const
397 {
398 if (getCurrentLayer().type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
399 {
400 return getCurrentLayer().getPeakData()->getMinInt();
401 }
402 else if (getCurrentLayer().type == LayerData::DT_FEATURE)
403 {
404 return getCurrentLayer().getFeatureMap()->getMinInt();
405 }
406 else
407 {
408 return getCurrentLayer().getConsensusMap()->getMinInt();
409 }
410 }
411
413 inline float getCurrentMaxIntensity() const
414 {
415 if (getCurrentLayer().type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
416 {
417 return getCurrentLayer().getPeakData()->getMaxInt();
418 }
419 else if (getCurrentLayer().type == LayerData::DT_FEATURE)
420 {
421 return getCurrentLayer().getFeatureMap()->getMaxInt();
422 }
423 else
424 {
425 return getCurrentLayer().getConsensusMap()->getMaxInt();
426 }
427 }
428
430 inline float getMinIntensity(Size index) const
431 {
432 if (getLayer(index).type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
433 {
434 return getLayer(index).getPeakData()->getMinInt();
435 }
436 else if (getLayer(index).type == LayerData::DT_FEATURE)
437 {
438 return getLayer(index).getFeatureMap()->getMinInt();
439 }
440 else
441 {
442 return getLayer(index).getConsensusMap()->getMinInt();
443 }
444 }
445
447 inline float getMaxIntensity(Size index) const
448 {
449 if (getLayer(index).type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
450 {
451 return getLayer(index).getPeakData()->getMaxInt();
452 }
453 else if (getLayer(index).type == LayerData::DT_FEATURE)
454 {
455 return getLayer(index).getFeatureMap()->getMaxInt();
456 }
457 else
458 {
459 return getLayer(index).getConsensusMap()->getMaxInt();
460 }
461 }
462
464 void setLayerName(Size i, const String & name);
465
467 String getLayerName(Size i);
468
470 inline void setCurrentLayerParameters(const Param & param)
471 {
472 getCurrentLayer_().param = param;
473 emit preferencesChange();
474 }
475
481 const DRange<3> & getDataRange();
482
488 double getSnapFactor();
489
491 double getPercentageFactor();
492
494 virtual void showCurrentLayerPreferences() = 0;
495
502 virtual void showMetaData(bool modifiable = false, Int index = -1);
503
509 virtual void saveCurrentLayer(bool visible) = 0;
510
511 public slots:
512
519 void changeVisibility(Size i, bool b);
520
527 void changeLayerFilterState(Size i, bool b);
528
535 void showGridLines(bool show);
536
544 void resetZoom(bool repaint = true);
545
552 void setVisibleArea(AreaType area);
553
559 virtual void horizontalScrollBarChange(int value);
560
566 virtual void verticalScrollBarChange(int value);
567
569 void setAdditionalContextMenu(QMenu * menu);
570
578 void getVisiblePeakData(ExperimentType & map) const;
579
580
588 void getVisibleFeatureData(FeatureMapType & map) const;
589
597 void getVisibleConsensusData(ConsensusMapType & map) const;
598
606 void getVisibleIdentifications(std::vector<PeptideIdentification> & peptides) const;
607
609 virtual void updateLayer(Size i) = 0;
610
611 signals:
612
614 void layerModficationChange(Size layer, bool modified);
615
617 void layerActivated(QWidget * w);
618
620 void layerZoomChanged(QWidget * w);
621
628 void visibleAreaChanged(DRange<2> area); //Do not change this to AreaType! QT needs the exact type...
629
631 void sendCursorStatus(double mz = -1.0, double rt = -1.0);
632
634 void sendStatusMessage(std::string message, OpenMS::UInt time);
635
637 void recalculateAxes();
638
640 void updateVScrollbar(float, float, float, float);
641
643 void updateHScrollbar(float, float, float, float);
644
646 void changeLegendVisibility();
647
649 void actionModeChange();
650
652 void preferencesChange();
653
654 protected slots:
655
657 void updateCursor_();
658
659 protected:
660
662 void drawText_(QPainter & painter, QStringList text);
663
665 double getIdentificationMZ_(const Size layer_index,
666 const PeptideIdentification & peptide) const;
667
669 virtual bool finishAdding_() = 0;
670
672 inline LayerData & getLayer_(Size index)
673 {
674 OPENMS_PRECONDITION(index < layers_.size(), "SpectrumCanvas::getLayer_(index) index overflow");
675 return layers_[index];
676 }
677
679 inline LayerData & getCurrentLayer_()
680 {
681 return getLayer_(current_layer_);
682 }
683
685
686 void resizeEvent(QResizeEvent * e) override;
687 void wheelEvent(QWheelEvent * e) override;
688 void keyPressEvent(QKeyEvent * e) override;
689 void keyReleaseEvent(QKeyEvent * e) override;
690 void focusOutEvent(QFocusEvent * e) override;
691 void leaveEvent(QEvent * e) override;
692 void enterEvent(QEvent * e) override;
694
696 virtual void intensityModeChange_();
697
708 virtual void changeVisibleArea_(const AreaType & new_area, bool repaint = true, bool add_to_stack = false);
709
715 virtual void recalculateSnapFactor_();
716
718
719 virtual void zoom_(int x, int y, bool zoom_in);
722 void zoomBack_();
724 virtual void zoomForward_();
726 void zoomAdd_(const AreaType & area);
728 void zoomClear_();
730
732
733 virtual void translateLeft_(Qt::KeyboardModifiers m);
736 virtual void translateRight_(Qt::KeyboardModifiers m);
738 virtual void translateForward_();
740 virtual void translateBackward_();
742
748 virtual void updateScrollbars_();
749
759 inline PointType widgetToData_(double x, double y)
760 {
761 if (!isMzToXAxis())
762 {
763 return PointType(
764 visible_area_.minX() + (height() - y) / height() * visible_area_.width(),
765 visible_area_.minY() + x / width() * visible_area_.height()
766 );
767 }
768 else
769 {
770 return PointType(
771 visible_area_.minX() + x / width() * visible_area_.width(),
772 visible_area_.minY() + (height() - y) / height() * visible_area_.height()
773 );
774 }
775 }
776
778 inline PointType widgetToData_(const QPoint & pos)
779 {
780 return widgetToData_(pos.x(), pos.y());
781 }
782
791 inline void dataToWidget_(double x, double y, QPoint & point)
792 {
793 if (!isMzToXAxis())
794 {
795
796
797 if (intensity_mode_ != SpectrumCanvas::IM_LOG)
798 {
799 point.setX(int((y - visible_area_.minY()) / visible_area_.height() * width()));
800 }
801 else // IM_LOG
802 {
803 point.setX(int(
804 std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * width())
805 );
806 }
807
808 point.setY(height() - int((x - visible_area_.minX()) / visible_area_.width() * height()));
809 }
810 else
811 {
812 point.setX(int((x - visible_area_.minX()) / visible_area_.width() * width()));
813
814 if (intensity_mode_ != SpectrumCanvas::IM_LOG)
815 {
816 point.setY(height() - int((y - visible_area_.minY()) / visible_area_.height() * height()));
817 }
818 else // IM_LOG
819 {
820 point.setY(height() - int(
821 std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * height()
822 ));
823 }
824 }
825 }
826
828 virtual void paintGridLines_(QPainter & painter);
829
831 QImage buffer_;
832
834 ActionModes action_mode_;
835
837 IntensityModes intensity_mode_;
838
840 std::vector<LayerData> layers_;
841
843 bool mz_to_x_axis_;
844
851 AreaType visible_area_;
852
862 void recalculateRanges_(UInt mz_dim, UInt rt_dim, UInt it_dim);
863
871 DRange<3> overall_data_range_;
872
874 bool show_grid_;
875
877 std::vector<AreaType> zoom_stack_;
879 std::vector<AreaType>::iterator zoom_pos_;
880
890 virtual void update_(const char * caller_name);
891
893 void modificationStatus_(Size layer_index, bool modified);
894
896 bool update_buffer_;
897
899 Size current_layer_;
900
902 void adjustBuffer_();
903
905 SpectrumWidget * spectrum_widget_;
906
908 QPoint last_mouse_pos_;
909
915 double percentage_factor_;
916
922 std::vector<double> snap_factors_;
923
925 QRubberBand rubber_band_;
926
928 QMenu * context_add_;
929
931 bool show_timing_;
932
934 PeakIndex selected_peak_;
936 PeakIndex measurement_start_;
937
939 void addDataProcessing_(PeakMap & map, DataProcessing::ProcessingAction action) const
940 {
941 std::set<DataProcessing::ProcessingAction> actions;
942 actions.insert(action);
943
944 DataProcessingPtr p = boost::shared_ptr<DataProcessing>(new DataProcessing);
945 //actions
946 p->setProcessingActions(actions);
947 //software
948 p->getSoftware().setName("SpectrumCanvas");
949 //version
950 p->getSoftware().setVersion(VersionInfo::getVersion());
951 //time
952 p->setCompletionTime(DateTime::now());
953
954 for (Size i = 0; i < map.size(); ++i)
955 {
956 map[i].getDataProcessing().push_back(p);
957 }
958 }
959
960 };
961 }
962
OpenMS::Feature
An LC-MS feature.
Definition: Feature.h:70
OpenMS::SpectrumCanvas::setCurrentLayerParameters
void setCurrentLayerParameters(const Param &param)
Sets the parameters of the current layer.
Definition: SpectrumCanvas.h:470
OpenMS::SpectrumCanvas::last_mouse_pos_
QPoint last_mouse_pos_
start position of mouse actions
Definition: SpectrumCanvas.h:908
OpenMS::SpectrumCanvas::snap_factors_
std::vector< double > snap_factors_
Intensity scaling factor for &#39;snap to maximum intensity mode&#39;.
Definition: SpectrumCanvas.h:922
OpenMS::SpectrumCanvas::getCurrentMinIntensity
float getCurrentMinIntensity() const
Returns the minimum intensity of the active layer.
Definition: SpectrumCanvas.h:396
OpenMS::SpectrumCanvas::getMaxIntensity
float getMaxIntensity(Size index) const
Returns the maximum intensity of the layer with index index.
Definition: SpectrumCanvas.h:447
OpenMS::String
A more convenient string class.
Definition: String.h:58
QWidget
OpenMS::DateTime::now
static DateTime now()
Returns the current date and time.
OpenMS::LayerData
Class that stores the data for one layer.
Definition: LayerData.h:85
OpenMS::SpectrumCanvas::percentage_factor_
double percentage_factor_
Intensity scaling factor for relative scale with multiple layers.
Definition: SpectrumCanvas.h:915
OpenMS::SpectrumCanvas::PointType
DPosition< 2 > PointType
Type of the Points.
Definition: SpectrumCanvas.h:133
OpenMS::SpectrumCanvas::getVisibleArea
const AreaType & getVisibleArea() const
Returns the currently visible area.
Definition: SpectrumCanvas.h:310
OpenMS::SpectrumCanvas::addDataProcessing_
void addDataProcessing_(PeakMap &map, DataProcessing::ProcessingAction action) const
Data processing setter for peak maps.
Definition: SpectrumCanvas.h:939
OpenMS::DataProcessing
Description of the applied preprocessing steps.
Definition: DataProcessing.h:51
OpenMS::SpectrumCanvas::ActionModes
ActionModes
Mouse action modes.
Definition: SpectrumCanvas.h:139
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
DRange.h
OpenMS::SpectrumCanvas::ODExperimentSharedPtrType
LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: SpectrumCanvas.h:113
OpenMS::SpectrumCanvas::widgetToData_
PointType widgetToData_(const QPoint &pos)
Calls widgetToData_ with x and y position of pos.
Definition: SpectrumCanvas.h:778
OpenMS::SpectrumCanvas::IM_NONE
Normal mode: f(x)=x.
Definition: SpectrumCanvas.h:149
OpenMS::SpectrumCanvas::setSpectrumWidget
void setSpectrumWidget(SpectrumWidget *widget)
Sets the spectrum widget.
Definition: SpectrumCanvas.h:170
OpenMS::LayerData::DT_CHROMATOGRAM
Chromatogram data.
Definition: LayerData.h:95
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::SpectrumCanvas::current_layer_
Size current_layer_
Stores the index of the currently active layer.
Definition: SpectrumCanvas.h:899
LayerData.h
OpenMS::SpectrumWidget
Base class for spectrum widgets.
Definition: SpectrumWidget.h:80
OpenMS::SpectrumCanvas::spectrum_widget_
SpectrumWidget * spectrum_widget_
Back-pointer to the enclosing spectrum widget.
Definition: SpectrumCanvas.h:905
OpenMS::SpectrumCanvas::setLayerFlag
void setLayerFlag(LayerData::Flags f, bool value)
sets a layer flag of the current layer
Definition: SpectrumCanvas.h:268
OpenMS::SpectrumCanvas::show_timing_
bool show_timing_
Flag that determines if timing data is printed to the command line.
Definition: SpectrumCanvas.h:931
OpenMS::FeatureMap
A container for features.
Definition: FeatureMap.h:95
OpenMS::SpectrumCanvas::SpectrumType
ExperimentType::SpectrumType SpectrumType
Spectrum type.
Definition: SpectrumCanvas.h:124
OpenMS::SpectrumCanvas::FeatureMapSharedPtrType
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: SpectrumCanvas.h:117
OpenMS::SpectrumCanvas::getCurrentLayer_
LayerData & getCurrentLayer_()
Returns the currently active layer.
Definition: SpectrumCanvas.h:679
OpenMS::SpectrumCanvas::setLayerFlag
void setLayerFlag(Size layer, LayerData::Flags f, bool value)
sets a layer flag of the layer layer
Definition: SpectrumCanvas.h:281
OpenMS::SpectrumCanvas::dataToWidget_
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates.
Definition: SpectrumCanvas.h:791
Types.h
OpenMS::SpectrumCanvas::zoom_pos_
std::vector< AreaType >::iterator zoom_pos_
The current position in the zoom stack.
Definition: SpectrumCanvas.h:879
OpenMS::SpectrumCanvas::buffer_
QImage buffer_
Buffer that stores the actual peak information.
Definition: SpectrumCanvas.h:831
OpenMS::SpectrumCanvas::FeatureType
FeatureMapType::FeatureType FeatureType
Feature type.
Definition: SpectrumCanvas.h:130
OpenMS::SpectrumCanvas
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:98
OpenMS::SpectrumCanvas::ConsensusMapType
LayerData::ConsensusMapType ConsensusMapType
Main data type (consensus features)
Definition: SpectrumCanvas.h:119
OpenMS::SpectrumCanvas::getCurrentLayer
const LayerData & getCurrentLayer() const
returns the layer data of the active layer
Definition: SpectrumCanvas.h:242
OpenMS::SpectrumCanvas::setIntensityMode
void setIntensityMode(IntensityModes mod)
Sets the intensity mode.
Definition: SpectrumCanvas.h:218
OpenMS::SpectrumCanvas::AM_ZOOM
zoom
Definition: SpectrumCanvas.h:142
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
OpenMS::SpectrumCanvas::action_mode_
ActionModes action_mode_
Stores the current action mode (Pick, Zoom, Translate)
Definition: SpectrumCanvas.h:834
OpenMS::LayerData::ODExperimentSharedPtrType
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerData.h:154
OpenMS::SpectrumCanvas::AM_TRANSLATE
translate
Definition: SpectrumCanvas.h:141
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
OpenMS::SpectrumCanvas::ExperimentType
LayerData::ExperimentType ExperimentType
Main data type (experiment)
Definition: SpectrumCanvas.h:109
OpenMS::SpectrumCanvas::getIntensityMode
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: SpectrumCanvas.h:204
OpenMS::SpectrumCanvas::getActionMode
Int getActionMode() const
Returns the action mode.
Definition: SpectrumCanvas.h:192
OpenMS::SpectrumCanvas::IM_SNAP
Shows the maximum displayed intensity as if it was the overall maximum intensity. ...
Definition: SpectrumCanvas.h:151
OpenMS::SpectrumCanvas::IntensityModes
IntensityModes
Display modes of intensity.
Definition: SpectrumCanvas.h:147
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(Size layer, LayerData::Flags f) const
returns a layer flag of the layer layer
Definition: SpectrumCanvas.h:274
OPENMS_PRECONDITION
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:136
OpenMS::LayerData::ExperimentSharedPtrType
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:149
OpenMS::SpectrumCanvas::SpectrumConstIteratorType
SpectrumType::ConstIterator SpectrumConstIteratorType
Spectrum iterator type (iterates over peaks)
Definition: SpectrumCanvas.h:126
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::DRange< 2 >
OpenMS::DataProcessingPtr
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: DataProcessing.h:135
OpenMS::SpectrumCanvas::layers_
std::vector< LayerData > layers_
Layer data.
Definition: SpectrumCanvas.h:840
OpenMS::LayerData::Flags
Flags
Flags that determine which information is shown.
Definition: LayerData.h:103
OpenMS::LayerData::LabelType
LabelType
Label used in visualization.
Definition: LayerData.h:120
OpenMS::SpectrumCanvas::widgetToData_
PointType widgetToData_(double x, double y)
Convert widget to chart coordinates.
Definition: SpectrumCanvas.h:759
OpenMS::SpectrumCanvas::getLayer
const LayerData & getLayer(Size index) const
returns the layer data with index index
Definition: SpectrumCanvas.h:235
OpenMS::SpectrumCanvas::ExperimentSharedPtrType
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: SpectrumCanvas.h:111
OpenMS::SpectrumCanvas::rubber_band_
QRubberBand rubber_band_
Rubber band for selected area.
Definition: SpectrumCanvas.h:925
DefaultParamHandler.h
OpenMS::SpectrumCanvas::measurement_start_
PeakIndex measurement_start_
start peak of measuring mode
Definition: SpectrumCanvas.h:936
OpenMS::VersionInfo::getVersion
static String getVersion()
Return the version number of OpenMS.
OpenMS::MSSpectrum::ConstIterator
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:104
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::SpectrumCanvas::getLayer_
LayerData & getLayer_(Size index)
Returns the layer with index index.
Definition: SpectrumCanvas.h:672
OpenMS::SpectrumCanvas::IM_LOG
Logarithmic mode.
Definition: SpectrumCanvas.h:152
OpenMS::SpectrumCanvas::update_buffer_
bool update_buffer_
Whether to recalculate the data in the buffer when repainting.
Definition: SpectrumCanvas.h:896
OpenMS::DPosition< 2 >
OpenMS::SpectrumCanvas::context_add_
QMenu * context_add_
External context menu extension.
Definition: SpectrumCanvas.h:928
OpenMS::SpectrumCanvas::setLabel
void setLabel(LayerData::LabelType label)
Definition: SpectrumCanvas.h:293
OpenMS::MSExperiment::size
Size size() const
Definition: MSExperiment.h:127
OpenMS::SpectrumCanvas::PeakType
SpectrumType::PeakType PeakType
Peak type.
Definition: SpectrumCanvas.h:128
OpenMS::LayerData::ConsensusMapSharedPtrType
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:143
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::PeakIndex
Index of a peak or feature.
Definition: PeakIndex.h:50
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
int
OpenMS::SpectrumCanvas::visible_area_
AreaType visible_area_
Stores the currently visible area.
Definition: SpectrumCanvas.h:851
OpenMS::LayerData::FeatureMapSharedPtrType
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:137
OpenMS::SpectrumCanvas::AreaType
DRange< 2 > AreaType
Types of Ranges/Areas.
Definition: SpectrumCanvas.h:135
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:79
OpenMS::SpectrumCanvas::getCurrentLayerIndex
Size getCurrentLayerIndex() const
returns the index of the active layer
Definition: SpectrumCanvas.h:249
OpenMS::SpectrumCanvas::show_grid_
bool show_grid_
Stores whether or not to show a grid.
Definition: SpectrumCanvas.h:874
OpenMS::DataProcessing::ProcessingAction
ProcessingAction
Definition: DataProcessing.h:58
OpenMS::SpectrumCanvas::ConsensusMapSharedPtrType
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: SpectrumCanvas.h:121
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(LayerData::Flags f) const
returns a layer flag of the current layer
Definition: SpectrumCanvas.h:262
OpenMS::SpectrumCanvas::overall_data_range_
DRange< 3 > overall_data_range_
Stores the data range (m/z, RT and intensity) of all layers.
Definition: SpectrumCanvas.h:871
OpenMS::SpectrumCanvas::getSpectrumWidget
SpectrumWidget * getSpectrumWidget() const
Returns the spectrum widget.
Definition: SpectrumCanvas.h:181
OpenMS::LayerData::ConstExperimentSharedPtrType
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerData.h:151
VersionInfo.h
OpenMS::SpectrumCanvas::selected_peak_
PeakIndex selected_peak_
selected peak
Definition: SpectrumCanvas.h:934
OpenMS::SpectrumCanvas::FeatureMapType
LayerData::FeatureMapType FeatureMapType
Main data type (features)
Definition: SpectrumCanvas.h:115
OpenMS::SpectrumCanvas::getCurrentLayer
LayerData & getCurrentLayer()
returns the layer data of the active layer
Definition: SpectrumCanvas.h:255
OpenMS::SpectrumCanvas::gridLinesShown
bool gridLinesShown() const
Returns if the grid is currently shown.
Definition: SpectrumCanvas.h:229
OpenMS::SpectrumCanvas::ConstExperimentSharedPtrType
LayerData::ConstExperimentSharedPtrType ConstExperimentSharedPtrType
Definition: SpectrumCanvas.h:112
OpenMS::SpectrumCanvas::getMinIntensity
float getMinIntensity(Size index) const
Returns the minimum intensity of the layer with index index.
Definition: SpectrumCanvas.h:430
OpenMS::SpectrumCanvas::mz_to_x_axis_
bool mz_to_x_axis_
Stores the mapping of m/z.
Definition: SpectrumCanvas.h:843
OpenMS::SpectrumCanvas::intensity_mode_
IntensityModes intensity_mode_
Stores the used intensity mode function.
Definition: SpectrumCanvas.h:837
OpenMS::LayerData::DT_PEAK
Spectrum profile or centroided data.
Definition: LayerData.h:94
OpenMS::SpectrumCanvas::isMzToXAxis
bool isMzToXAxis()
Returns the mapping of m/z to axes.
Definition: SpectrumCanvas.h:321
OpenMS::SpectrumCanvas::getCurrentMaxIntensity
float getCurrentMaxIntensity() const
Returns the maximum intensity of the active layer.
Definition: SpectrumCanvas.h:413
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
OpenMS::SpectrumCanvas::zoom_stack_
std::vector< AreaType > zoom_stack_
The zoom stack.
Definition: SpectrumCanvas.h:877
OpenMS::DataFilters
DataFilter array providing some convenience functions.
Definition: DataFilters.h:50
OpenMS::LayerData::DT_FEATURE
Feature data.
Definition: LayerData.h:96
OpenMS::SpectrumCanvas::IM_PERCENTAGE
Shows intensities normalized by layer maximum: f(x)=x/max(x)*100.
Definition: SpectrumCanvas.h:150