OpenMS  3.0.0
PlotCanvas.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-2022.
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>
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 PlotWidget;
64 
65  using LayerDataBaseUPtr = std::unique_ptr<LayerDataBase>;
66 
72  class LayerStack
73  {
74  public:
77  void addLayer(LayerDataBaseUPtr new_layer);
78 
79  const LayerDataBase& getLayer(const Size index) const;
80 
81  LayerDataBase& getLayer(const Size index);
82 
83  const LayerDataBase& getCurrentLayer() const;
84 
86 
88  void setCurrentLayer(Size index);
89 
90  Size getCurrentLayerIndex() const;
91 
92  bool empty() const;
93 
94  Size getLayerCount() const;
95 
96  void removeLayer(Size layer_index);
97 
98  void removeCurrentLayer();
99 
100  protected:
101  std::vector<LayerDataBaseUPtr> layers_;
102  private:
104  };
105 
135  class OPENMS_GUI_DLLAPI PlotCanvas :
136  public QWidget,
137  public DefaultParamHandler
138  {
139  Q_OBJECT
140 
141 public:
144 
160 
167 
172 
174 
177  {
180  AM_MEASURE
181  };
182 
185  {
189  IM_LOG
190  };
191 
193 
195  PlotCanvas(const Param & preferences, QWidget * parent = nullptr);
196 
198  ~PlotCanvas() override;
199 
207  inline void setPlotWidget(PlotWidget * widget)
208  {
209  spectrum_widget_ = widget;
210  }
211 
218  inline PlotWidget * getPlotWidget() const
219  {
220  return spectrum_widget_;
221  }
222 
229  inline Int getActionMode() const
230  {
231  return action_mode_;
232  }
233 
242  {
243  return intensity_mode_;
244  }
245 
256  {
257  intensity_mode_ = mod;
258  intensityModeChange_();
259  }
260 
266  inline bool gridLinesShown() const
267  {
268  return show_grid_;
269  }
270 
272  inline const LayerDataBase& getLayer(Size index) const
273  {
274  return layers_.getLayer(index);
275  }
277  inline LayerDataBase& getLayer(Size index)
278  {
279  return layers_.getLayer(index);
280  }
281 
283  inline const LayerDataBase& getCurrentLayer() const
284  {
285  return layers_.getCurrentLayer();
286  }
289  {
290  return layers_.getCurrentLayer();
291  }
292 
294  inline Size getCurrentLayerIndex() const
295  {
296  return layers_.getCurrentLayerIndex();
297  }
298 
301  {
302  return getLayerFlag(layers_.getCurrentLayerIndex(), f);
303  }
304 
306  void setLayerFlag(LayerDataBase::Flags f, bool value)
307  {
308  setLayerFlag(layers_.getCurrentLayerIndex(), f, value);
309  }
310 
313  {
314  return layers_.getLayer(layer).flags.test(f);
315  }
316 
318  void setLayerFlag(Size layer, LayerDataBase::Flags f, bool value)
319  {
320  //abort if there are no layers
321  if (layers_.empty()) return;
322 
323  layers_.getLayer(layer).flags.set(f, value);
324  update_buffer_ = true;
325  update();
326  }
327 
329  {
330  //abort if there are no layers
331  if (layers_.empty()) return;
332  layers_.getCurrentLayer().label = label;
333  update_buffer_ = true;
334  update();
335  }
336 
342  inline const AreaType & getVisibleArea() const
343  {
344  return visible_area_;
345  }
346 
350  virtual void setFilters(const DataFilters & filters);
351 
353  inline bool isMzToXAxis() const
354  {
355  return mz_to_x_axis_;
356  }
357 
359  void mzToXAxis(bool mz_to_x_axis);
360 
367  inline Size getLayerCount() const
369  {
370  return layers_.getLayerCount();
371  }
372 
374  virtual void activateLayer(Size layer_index) = 0;
376  virtual void removeLayer(Size layer_index) = 0;
377 
380  {
381  for (Size i = getLayerCount(); i > 0; --i)
382  {
383  removeLayer(i-1);
384  }
385  }
386 
400  bool addLayer(ExperimentSharedPtrType map, ODExperimentSharedPtrType od_map, const String & filename = "");
401 
410  bool addLayer(FeatureMapSharedPtrType map, const String & filename = "");
411 
420  bool addLayer(ConsensusMapSharedPtrType map, const String & filename = "");
422 
431  bool addLayer(std::vector<PeptideIdentification> & peptides,
432  const String & filename = "");
433 
435  inline float getCurrentMinIntensity() const
436  {
437  return layers_.getCurrentLayer().getMinIntensity();
438  }
439 
441  inline float getCurrentMaxIntensity() const
442  {
443  return layers_.getCurrentLayer().getMaxIntensity();
444  }
445 
447  inline float getMinIntensity(Size index) const
448  {
449  return getLayer(index).getMinIntensity();
450  }
451 
453  inline float getMaxIntensity(Size index) const
454  {
455  return getLayer(index).getMaxIntensity();
456  }
457 
459  void setLayerName(Size i, const String & name);
460 
462  String getLayerName(Size i);
463 
465  inline void setCurrentLayerParameters(const Param& param)
466  {
467  getCurrentLayer().param = param;
468  emit preferencesChange();
469  }
470 
476  const DRange<3> & getDataRange();
477 
483  double getSnapFactor();
484 
486  double getPercentageFactor() const;
487 
489  virtual void showCurrentLayerPreferences() = 0;
490 
497  virtual void showMetaData(bool modifiable = false, Int index = -1);
498 
504  virtual void saveCurrentLayer(bool visible) = 0;
505 
506 public slots:
507 
514  void changeVisibility(Size i, bool b);
515 
522  void changeLayerFilterState(Size i, bool b);
523 
530  void showGridLines(bool show);
531 
539  void resetZoom(bool repaint = true);
540 
547  void setVisibleArea(const AreaType& area);
548 
554  virtual void horizontalScrollBarChange(int value);
555 
561  virtual void verticalScrollBarChange(int value);
562 
564  void setAdditionalContextMenu(QMenu * menu);
565 
573  void getVisiblePeakData(ExperimentType & map) const;
574 
575 
583  void getVisibleFeatureData(FeatureMapType & map) const;
584 
592  void getVisibleConsensusData(ConsensusMapType & map) const;
593 
601  void getVisibleIdentifications(std::vector<PeptideIdentification> & peptides) const;
602 
604  virtual void updateLayer(Size i) = 0;
605 
606 
610  inline void dataToWidgetDistance(double x, double y, QPoint& point)
611  {
612  dataToWidget_(x, y, point);
613  // substract the 'offset'
614  QPoint zero;
615  dataToWidget_(0, 0, zero);
616  point -= zero;
617  }
618 
622  inline PointType widgetToDataDistance(double x, double y)
623  {
624  PointType point = widgetToData_(x, y);
625  // substract the 'offset'
626  PointType zero = widgetToData_(0, 0);
627  point -= zero;
628  return point;
629  }
630 
631 signals:
632 
634  void layerModficationChange(Size layer, bool modified);
635 
637  void layerActivated(QWidget * w);
638 
640  void layerZoomChanged(QWidget * w);
641 
648  void visibleAreaChanged(DRange<2> area); //Do not change this to AreaType! QT needs the exact type...
649 
651  void sendCursorStatus(double mz = -1.0, double rt = -1.0);
652 
654  void sendStatusMessage(std::string message, OpenMS::UInt time);
655 
657  void recalculateAxes();
658 
660  void updateVScrollbar(float, float, float, float);
661 
663  void updateHScrollbar(float, float, float, float);
664 
666  void changeLegendVisibility();
667 
669  void actionModeChange();
670 
672  void preferencesChange();
673 
674 protected slots:
675 
677  void updateCursor_();
678 
679 protected:
680 
682  void drawText_(QPainter & painter, QStringList text);
683 
685  double getIdentificationMZ_(const Size layer_index,
686  const PeptideIdentification & peptide) const;
687 
689  virtual bool finishAdding_() = 0;
690 
693  void popIncompleteLayer_(const QString& error_message = "");
694 
696 
697  void resizeEvent(QResizeEvent * e) override;
698  void wheelEvent(QWheelEvent * e) override;
699  void keyPressEvent(QKeyEvent * e) override;
700  void keyReleaseEvent(QKeyEvent * e) override;
701  void focusOutEvent(QFocusEvent * e) override;
702  void leaveEvent(QEvent * e) override;
703  void enterEvent(QEvent * e) override;
705 
707  virtual void intensityModeChange_();
708 
719  virtual void changeVisibleArea_(const AreaType & new_area, bool repaint = true, bool add_to_stack = false);
720 
726  virtual void recalculateSnapFactor_();
727 
729 
730  virtual void zoom_(int x, int y, bool zoom_in);
733  void zoomBack_();
735  virtual void zoomForward_();
737  void zoomAdd_(const AreaType & area);
739  void zoomClear_();
741 
743 
744  virtual void translateLeft_(Qt::KeyboardModifiers m);
747  virtual void translateRight_(Qt::KeyboardModifiers m);
749  virtual void translateForward_();
751  virtual void translateBackward_();
753 
759  virtual void updateScrollbars_();
760 
770  inline PointType widgetToData_(double x, double y)
771  {
772  if (!isMzToXAxis())
773  {
774  return PointType(
775  visible_area_.minX() + (height() - y) / height() * visible_area_.width(),
776  visible_area_.minY() + x / width() * visible_area_.height()
777  );
778  }
779  else
780  {
781  return PointType(
782  visible_area_.minX() + x / width() * visible_area_.width(),
783  visible_area_.minY() + (height() - y) / height() * visible_area_.height()
784  );
785  }
786  }
787 
789  inline PointType widgetToData_(const QPoint & pos)
790  {
791  return widgetToData_(pos.x(), pos.y());
792  }
793 
802  inline void dataToWidget_(double x, double y, QPoint & point)
803  {
804  if (!isMzToXAxis())
805  {
806 
807 
808  if (intensity_mode_ != PlotCanvas::IM_LOG)
809  {
810  point.setX(int((y - visible_area_.minY()) / visible_area_.height() * width()));
811  }
812  else // IM_LOG
813  {
814  point.setX(int(
815  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * width())
816  );
817  }
818 
819  point.setY(height() - int((x - visible_area_.minX()) / visible_area_.width() * height()));
820  }
821  else
822  {
823  point.setX(int((x - visible_area_.minX()) / visible_area_.width() * width()));
824 
825  if (intensity_mode_ != PlotCanvas::IM_LOG)
826  {
827  point.setY(height() - int((y - visible_area_.minY()) / visible_area_.height() * height()));
828  }
829  else // IM_LOG
830  {
831  point.setY(height() - int(
832  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * height()
833  ));
834  }
835  }
836  }
837 
839  virtual void paintGridLines_(QPainter & painter);
840 
842  QImage buffer_;
843 
845  ActionModes action_mode_ = AM_TRANSLATE;
846 
848  IntensityModes intensity_mode_ = IM_NONE;
849 
852 
854  bool mz_to_x_axis_ = true;
855 
862  AreaType visible_area_ = AreaType::empty;
863 
873  void recalculateRanges_(UInt mz_dim, UInt rt_dim, UInt it_dim);
874 
882  DRange<3> overall_data_range_ = DRange<3>::empty;
883 
885  bool show_grid_ = true;
886 
888  std::vector<AreaType> zoom_stack_;
890  std::vector<AreaType>::iterator zoom_pos_ = zoom_stack_.end();
891 
901  virtual void update_(const char * caller_name);
902 
904  void modificationStatus_(Size layer_index, bool modified);
905 
907  bool update_buffer_ = false;
908 
910  PlotWidget* spectrum_widget_ = nullptr;
911 
914 
920  double percentage_factor_ = 1.0;
921 
929  std::vector<double> snap_factors_ = {1.0};
930 
932  QRubberBand rubber_band_;
933 
935  QMenu* context_add_ = nullptr;
936 
938  bool show_timing_ = false;
939 
944 
947  {
948  std::set<DataProcessing::ProcessingAction> actions;
949  actions.insert(action);
950 
951  DataProcessingPtr p = boost::shared_ptr<DataProcessing>(new DataProcessing);
952  //actions
953  p->setProcessingActions(actions);
954  //software
955  p->getSoftware().setName("PlotCanvas");
956  //version
957  p->getSoftware().setVersion(VersionInfo::getVersion());
958  //time
959  p->setCompletionTime(DateTime::now());
960 
961  for (Size i = 0; i < map.size(); ++i)
962  {
963  map[i].getDataProcessing().push_back(p);
964  }
965  }
966 
967  };
968 }
DefaultParamHandler.h
OpenMS::PlotCanvas::getCurrentMinIntensity
float getCurrentMinIntensity() const
Returns the minimum intensity of the active layer.
Definition: PlotCanvas.h:435
OpenMS::PlotCanvas::FeatureMapType
LayerDataBase::FeatureMapType FeatureMapType
Main data type (features)
Definition: PlotCanvas.h:153
OpenMS::PlotCanvas::setCurrentLayerParameters
void setCurrentLayerParameters(const Param &param)
Sets the parameters of the current layer.
Definition: PlotCanvas.h:465
OpenMS::PlotCanvas::IntensityModes
IntensityModes
Display modes of intensity.
Definition: PlotCanvas.h:184
Size
DRange.h
OpenMS::PlotCanvas::removeLayers
void removeLayers()
removes all layers by calling removeLayer() for all layer indices (from highest to lowest)
Definition: PlotCanvas.h:379
OpenMS::PlotWidget
Base class for spectrum widgets.
Definition: PlotWidget.h:80
VersionInfo.h
OpenMS::PlotCanvas::dataToWidgetDistance
void dataToWidgetDistance(double x, double y, QPoint &point)
converts a distance in axis values to pixel values
Definition: PlotCanvas.h:610
Types.h
OpenMS::PlotCanvas::AreaType
DRange< 2 > AreaType
Types of Ranges/Areas.
Definition: PlotCanvas.h:171
OpenMS::PlotCanvas::ExperimentType
LayerDataBase::ExperimentType ExperimentType
Main data type (experiment)
Definition: PlotCanvas.h:146
OpenMS::PlotCanvas::AM_TRANSLATE
translate
Definition: PlotCanvas.h:178
OpenMS::PlotCanvas::widgetToDataDistance
PointType widgetToDataDistance(double x, double y)
compute distance in widget coordinates (unit axis as shown) when moving x/y px in chart coordinates
Definition: PlotCanvas.h:622
OpenMS::LayerStack::current_layer_
Size current_layer_
Definition: PlotCanvas.h:103
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::PlotCanvas::IM_PERCENTAGE
Shows intensities normalized by layer maximum: f(x)=x/max(x)*100.
Definition: PlotCanvas.h:187
OpenMS::DRange< 2 >
OpenMS::PlotCanvas::selected_peak_
PeakIndex selected_peak_
selected peak
Definition: PlotCanvas.h:941
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
OpenMS::LayerDataBase::OSWDataSharedPtrType
boost::shared_ptr< OSWData > OSWDataSharedPtrType
SharedPtr on OSWData.
Definition: LayerDataBase.h:169
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
OpenMS::LayerStack::getCurrentLayer
const LayerDataBase & getCurrentLayer() const
OpenMS::PlotCanvas::OSWDataSharedPtrType
LayerDataBase::OSWDataSharedPtrType OSWDataSharedPtrType
Definition: PlotCanvas.h:151
OpenMS::PlotCanvas::getIntensityMode
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: PlotCanvas.h:241
OpenMS::PlotCanvas::PointType
DPosition< 2 > PointType
Type of the Points.
Definition: PlotCanvas.h:169
OpenMS::LayerStack::removeCurrentLayer
void removeCurrentLayer()
QWidget
OpenMS::PlotCanvas::ActionModes
ActionModes
Mouse action modes.
Definition: PlotCanvas.h:176
OpenMS::PlotCanvas::getCurrentMaxIntensity
float getCurrentMaxIntensity() const
Returns the maximum intensity of the active layer.
Definition: PlotCanvas.h:441
OpenMS::PlotCanvas::FeatureMapSharedPtrType
LayerDataBase::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: PlotCanvas.h:155
OpenMS::MSExperiment::size
Size size() const
Definition: MSExperiment.h:120
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
OpenMS::PlotCanvas::last_mouse_pos_
QPoint last_mouse_pos_
start position of mouse actions
Definition: PlotCanvas.h:913
OpenMS::PlotCanvas::rubber_band_
QRubberBand rubber_band_
Rubber band for selected area.
Definition: PlotCanvas.h:932
OpenMS::DateTime::now
static DateTime now()
Returns the current date and time.
OpenMS::PlotCanvas::SpectrumConstIteratorType
SpectrumType::ConstIterator SpectrumConstIteratorType
Spectrum iterator type (iterates over peaks)
Definition: PlotCanvas.h:164
OpenMS::LayerStack::addLayer
void addLayer(LayerDataBaseUPtr new_layer)
OpenMS::DataProcessingPtr
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: DataProcessing.h:136
OpenMS::PlotCanvas::SpectrumType
ExperimentType::SpectrumType SpectrumType
Spectrum type.
Definition: PlotCanvas.h:162
OpenMS::Int
int Int
Signed integer type.
Definition: Types.h:102
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
OpenMS::DataProcessing::ProcessingAction
ProcessingAction
Definition: DataProcessing.h:58
OpenMS::RangeManager
Handles the management of a multidimensional range, e.g. RangeMZ and RangeIntensity for spectra.
Definition: RangeManager.h:588
OpenMS::PlotCanvas
Base class for visualization canvas classes.
Definition: PlotCanvas.h:135
OpenMS::LayerStack::getCurrentLayerIndex
Size getCurrentLayerIndex() const
OpenMS::PlotCanvas::IM_LOG
Logarithmic mode.
Definition: PlotCanvas.h:189
OpenMS::LayerStack::setCurrentLayer
void setCurrentLayer(Size index)
throws Exception::IndexOverflow unless index is smaller than getLayerCount()
OpenMS::PeakIndex
Index of a peak or feature.
Definition: PeakIndex.h:50
OpenMS::PlotCanvas::dataToWidget_
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates.
Definition: PlotCanvas.h:802
OpenMS::LayerStack
Definition: PlotCanvas.h:72
OpenMS::LayerDataBaseUPtr
std::unique_ptr< LayerDataBase > LayerDataBaseUPtr
Definition: PlotCanvas.h:65
OpenMS::PlotCanvas::getPlotWidget
PlotWidget * getPlotWidget() const
Returns the spectrum widget.
Definition: PlotCanvas.h:218
OpenMS::PlotCanvas::setIntensityMode
void setIntensityMode(IntensityModes mod)
Sets the intensity mode.
Definition: PlotCanvas.h:255
OpenMS::PlotCanvas::setLayerFlag
void setLayerFlag(Size layer, LayerDataBase::Flags f, bool value)
sets a layer flag of the layer layer
Definition: PlotCanvas.h:318
OpenMS::PlotCanvas::ConsensusMapType
LayerDataBase::ConsensusMapType ConsensusMapType
Main data type (consensus features)
Definition: PlotCanvas.h:157
OpenMS::LayerDataBase::ExperimentSharedPtrType
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerDataBase.h:161
OpenMS::PlotCanvas::ConstExperimentSharedPtrType
LayerDataBase::ConstExperimentSharedPtrType ConstExperimentSharedPtrType
Definition: PlotCanvas.h:149
OpenMS::PlotCanvas::measurement_start_
PeakIndex measurement_start_
start peak of measuring mode
Definition: PlotCanvas.h:943
OpenMS::PlotCanvas::setLabel
void setLabel(LayerDataBase::LabelType label)
Definition: PlotCanvas.h:328
OpenMS::PlotCanvas::gridLinesShown
bool gridLinesShown() const
Returns if the grid is currently shown.
Definition: PlotCanvas.h:266
LayerDataBase.h
OpenMS::PlotCanvas::ExperimentSharedPtrType
LayerDataBase::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: PlotCanvas.h:148
OpenMS::LayerStack::getLayerCount
Size getLayerCount() const
OpenMS::LayerStack::getLayer
const LayerDataBase & getLayer(const Size index) const
OpenMS::VersionInfo::getVersion
static String getVersion()
Return the version number of OpenMS.
OpenMS::LayerStack::empty
bool empty() const
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:53
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:82
OpenMS::DPosition< 2 >
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::PlotCanvas::getLayer
LayerDataBase & getLayer(Size index)
returns the layer data with index index
Definition: PlotCanvas.h:277
OpenMS::PlotCanvas::getMaxIntensity
float getMaxIntensity(Size index) const
Returns the maximum intensity of the layer with index index.
Definition: PlotCanvas.h:453
OpenMS::PlotCanvas::AM_ZOOM
zoom
Definition: PlotCanvas.h:179
OpenMS::PlotCanvas::widgetToData_
PointType widgetToData_(const QPoint &pos)
Calls widgetToData_ with x and y position of pos.
Definition: PlotCanvas.h:789
OpenMS::FeatureMap
A container for features.
Definition: FeatureMap.h:98
OpenMS::PlotCanvas::buffer_
QImage buffer_
Buffer that stores the actual peak information.
Definition: PlotCanvas.h:842
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63
OpenMS::DataFilters
DataFilter array providing some convenience functions.
Definition: DataFilters.h:51
OpenMS::PlotCanvas::setPlotWidget
void setPlotWidget(PlotWidget *widget)
Sets the spectrum widget.
Definition: PlotCanvas.h:207
OpenMS::LayerStack::layers_
std::vector< LayerDataBaseUPtr > layers_
Definition: PlotCanvas.h:101
OpenMS::DataProcessing
Description of the applied preprocessing steps.
Definition: DataProcessing.h:51
OpenMS::LayerDataBase::ConsensusMapSharedPtrType
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerDataBase.h:155
OpenMS::PlotCanvas::IM_SNAP
Shows the maximum displayed intensity as if it was the overall maximum intensity.
Definition: PlotCanvas.h:188
OpenMS::PlotCanvas::getVisibleArea
const AreaType & getVisibleArea() const
Returns the currently visible area.
Definition: PlotCanvas.h:342
OpenMS::PlotCanvas::getLayerFlag
bool getLayerFlag(LayerDataBase::Flags f) const
returns a layer flag of the current layer
Definition: PlotCanvas.h:300
OpenMS::LayerDataBase::FeatureMapSharedPtrType
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerDataBase.h:149
OpenMS::PlotCanvas::zoom_stack_
std::vector< AreaType > zoom_stack_
The zoom stack.
Definition: PlotCanvas.h:888
OpenMS::PlotCanvas::getActionMode
Int getActionMode() const
Returns the action mode.
Definition: PlotCanvas.h:229
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:69
OpenMS::LayerDataBase::ConstExperimentSharedPtrType
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerDataBase.h:163
OpenMS::LayerDataBase::ODExperimentSharedPtrType
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerDataBase.h:166
OpenMS::LayerDataBase
Class that stores the data for one layer.
Definition: LayerDataBase.h:97
OpenMS::PlotCanvas::PeakType
SpectrumType::PeakType PeakType
Peak type.
Definition: PlotCanvas.h:166
OpenMS::PlotCanvas::getMinIntensity
float getMinIntensity(Size index) const
Returns the minimum intensity of the layer with index index.
Definition: PlotCanvas.h:447
OpenMS::PlotCanvas::getCurrentLayerIndex
Size getCurrentLayerIndex() const
returns the index of the active layer
Definition: PlotCanvas.h:294
OpenMS::PlotCanvas::isMzToXAxis
bool isMzToXAxis() const
Returns the mapping of m/z to axes.
Definition: PlotCanvas.h:353
OpenMS::LayerDataBase::Flags
Flags
Flags that determine which information is shown.
Definition: LayerDataBase.h:115
OpenMS::MSSpectrum::ConstIterator
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:130
OpenMS::PlotCanvas::addDataProcessing_
void addDataProcessing_(PeakMap &map, DataProcessing::ProcessingAction action) const
Data processing setter for peak maps.
Definition: PlotCanvas.h:946
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
OpenMS::PlotCanvas::setLayerFlag
void setLayerFlag(LayerDataBase::Flags f, bool value)
sets a layer flag of the current layer
Definition: PlotCanvas.h:306
OpenMS::PlotCanvas::layers_
LayerStack layers_
Layer data.
Definition: PlotCanvas.h:851
OpenMS::PlotCanvas::getLayerFlag
bool getLayerFlag(Size layer, LayerDataBase::Flags f) const
returns a layer flag of the layer layer
Definition: PlotCanvas.h:312
OpenMS::PlotCanvas::getCurrentLayer
const LayerDataBase & getCurrentLayer() const
returns the layer data of the active layer
Definition: PlotCanvas.h:283
OpenMS::LayerDataBase::LabelType
LabelType
Label used in visualization.
Definition: LayerDataBase.h:132
OpenMS::PlotCanvas::ODExperimentSharedPtrType
LayerDataBase::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: PlotCanvas.h:150
OpenMS::PlotCanvas::getCurrentLayer
LayerDataBase & getCurrentLayer()
returns the layer data of the active layer
Definition: PlotCanvas.h:288
OpenMS::PlotCanvas::IM_NONE
Normal mode: f(x)=x.
Definition: PlotCanvas.h:186
OpenMS::LayerStack::removeLayer
void removeLayer(Size layer_index)
OpenMS::PlotCanvas::widgetToData_
PointType widgetToData_(double x, double y)
Convert widget to chart coordinates.
Definition: PlotCanvas.h:770
OpenMS::PlotCanvas::ConsensusMapSharedPtrType
LayerDataBase::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: PlotCanvas.h:159
OpenMS::PlotCanvas::getLayer
const LayerDataBase & getLayer(Size index) const
returns the layer data with index index
Definition: PlotCanvas.h:272