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>
48 
49 //QT
50 #include <QtWidgets>
51 #include <QRubberBand>
52 
53 class QWheelEvent;
54 class QKeyEvent;
55 class QMouseEvent;
56 class QFocusEvent;
57 class QMenu;
58 
59 //STL
60 #include <stack>
61 #include <vector>
62 
63 namespace OpenMS
64 {
65  class PlotWidget;
66  class LayerDataChrom;
67  class LayerDataPeak;
68  class LayerDataFeature;
69  class LayerDataConsensus;
70 
71  using LayerDataBaseUPtr = std::unique_ptr<LayerDataBase>;
72  using LayerDataChromUPtr = std::unique_ptr<LayerDataChrom>;
73  using LayerDataPeakUPtr = std::unique_ptr<LayerDataPeak>;
74  using LayerDataFeatureUPtr = std::unique_ptr<LayerDataFeature>;
75  using LayerDataConsensusUPtr = std::unique_ptr<LayerDataConsensus>;
76 
82  class LayerStack
83  {
84  public:
87  void addLayer(LayerDataBaseUPtr new_layer);
88 
89  const LayerDataBase& getLayer(const Size index) const;
90 
91  LayerDataBase& getLayer(const Size index);
92 
93  const LayerDataBase& getCurrentLayer() const;
94 
96 
98  void setCurrentLayer(Size index);
99 
100  Size getCurrentLayerIndex() const;
101 
102  bool empty() const;
103 
104  Size getLayerCount() const;
105 
106  void removeLayer(Size layer_index);
107 
108  void removeCurrentLayer();
109 
110  protected:
111  std::vector<LayerDataBaseUPtr> layers_;
112  private:
114  };
115 
145  class OPENMS_GUI_DLLAPI PlotCanvas : public QWidget, public DefaultParamHandler
146  {
147  Q_OBJECT
148 
149  public:
152 
167 
176 
181 
184 
188 
190 
192 
195  {
198  AM_MEASURE
199  };
200 
203  {
207  IM_LOG
208  };
209 
211 
213  PlotCanvas(const Param& preferences, QWidget* parent = nullptr);
214 
216  ~PlotCanvas() override;
217 
225  inline void setPlotWidget(PlotWidget* widget)
226  {
227  spectrum_widget_ = widget;
228  }
229 
236  inline PlotWidget* getPlotWidget() const
237  {
238  return spectrum_widget_;
239  }
240 
247  inline Int getActionMode() const
248  {
249  return action_mode_;
250  }
251 
260  {
261  return intensity_mode_;
262  }
263 
274  {
275  intensity_mode_ = mod;
276  intensityModeChange_();
277  }
278 
284  inline bool gridLinesShown() const
285  {
286  return show_grid_;
287  }
288 
290  const LayerDataBase& getLayer(Size index) const
291  {
292  return layers_.getLayer(index);
293  }
296  {
297  return layers_.getLayer(index);
298  }
299 
302  {
303  return layers_.getCurrentLayer();
304  }
307  {
308  return layers_.getCurrentLayer();
309  }
310 
312  inline Size getCurrentLayerIndex() const
313  {
314  return layers_.getCurrentLayerIndex();
315  }
316 
319  {
320  return getLayerFlag(layers_.getCurrentLayerIndex(), f);
321  }
322 
324  void setLayerFlag(LayerDataBase::Flags f, bool value)
325  {
326  setLayerFlag(layers_.getCurrentLayerIndex(), f, value);
327  }
328 
331  {
332  return layers_.getLayer(layer).flags.test(f);
333  }
334 
336  void setLayerFlag(Size layer, LayerDataBase::Flags f, bool value)
337  {
338  // abort if there are no layers
339  if (layers_.empty())
340  return;
341 
342  layers_.getLayer(layer).flags.set(f, value);
343  update_buffer_ = true;
344  update();
345  }
346 
348  {
349  // abort if there are no layers
350  if (layers_.empty())
351  return;
352  layers_.getCurrentLayer().label = label;
353  update_buffer_ = true;
354  update();
355  }
356 
363  {
364  return visible_area_;
365  }
366 
369  bool isVisible(const PointOnAxis& p) const
370  {
371  return visible_area_.getAreaXY().encloses(p);
372  }
373 
377  {
378  int X_pixel_count = buffer_.width();
379  int Y_pixel_count = buffer_.height();
380  PixelArea area(&unit_mapper_);
381  area.setArea(AreaXYType(0, 0, X_pixel_count, Y_pixel_count));
382  return area;
383  }
384 
388  virtual void setFilters(const DataFilters& filters);
389 
396  inline Size getLayerCount() const
398  {
399  return layers_.getLayerCount();
400  }
401 
403  virtual void activateLayer(Size layer_index) = 0;
405  virtual void removeLayer(Size layer_index) = 0;
406 
409  {
410  for (Size i = getLayerCount(); i > 0; --i)
411  {
412  removeLayer(i - 1);
413  }
414  visible_area_.clear(); // reset visible area
415  }
416 
418  bool addLayer(std::unique_ptr<LayerData1DBase> layer);
419 
430  bool addPeakLayer(const ExperimentSharedPtrType& map, ODExperimentSharedPtrType od_map, const String& filename = "", const bool use_noise_cutoff = false);
431 
441  bool addChromLayer(const ExperimentSharedPtrType& map, ODExperimentSharedPtrType od_map, const String& filename = "");
442 
443 
452  bool addLayer(FeatureMapSharedPtrType map, const String& filename = "");
453 
462  bool addLayer(ConsensusMapSharedPtrType map, const String& filename = "");
464 
474  bool addLayer(std::vector<PeptideIdentification>& peptides, const String& filename = "");
475 
477  inline float getCurrentMinIntensity() const
478  {
479  return layers_.getCurrentLayer().getMinIntensity();
480  }
481 
483  inline float getCurrentMaxIntensity() const
484  {
485  return layers_.getCurrentLayer().getMaxIntensity();
486  }
487 
489  inline float getMinIntensity(Size index) const
490  {
491  return getLayer(index).getMinIntensity();
492  }
493 
495  inline float getMaxIntensity(Size index) const
496  {
497  return getLayer(index).getMaxIntensity();
498  }
499 
501  void setLayerName(Size i, const String& name);
502 
504  String getLayerName(Size i);
505 
507  inline void setCurrentLayerParameters(const Param& param)
508  {
509  getCurrentLayer().param = param;
510  emit preferencesChange();
511  }
512 
518  const RangeType& getDataRange() const;
519 
525  double getSnapFactor();
526 
528  double getPercentageFactor() const;
529 
531  virtual void showCurrentLayerPreferences() = 0;
532 
539  virtual void showMetaData(bool modifiable = false, Int index = -1);
540 
541  public slots:
542 
549  void changeVisibility(Size i, bool b);
550 
557  void changeLayerFilterState(Size i, bool b);
558 
565  void showGridLines(bool show);
566 
574  virtual void resetZoom(bool repaint = true);
575 
583  void setVisibleArea(const VisibleArea& area);
584 
592  void setVisibleArea(const RangeAllType& area);
593 
601  void setVisibleArea(const AreaXYType& area);
602 
608  void setVisibleAreaX(double min, double max);
609 
615  void setVisibleAreaY(double min, double max);
616 
622  void saveCurrentLayer(bool visible);
623 
629  virtual void horizontalScrollBarChange(int value);
630 
636  virtual void verticalScrollBarChange(int value);
637 
639  void setAdditionalContextMenu(QMenu * menu);
640 
642  virtual void updateLayer(Size i) = 0;
643 
644 
650  {
651  return AreaXYType({0, 0}, {(float)width(), (float)height()});
652  }
653 
658  const DimMapper<2>& getMapper() const;
659 
664  void setMapper(const DimMapper<2>& mapper);
665 
666  signals:
668  void layerModficationChange(Size layer, bool modified);
669 
671  void layerActivated(QWidget * w);
672 
674  void layerZoomChanged(QWidget * w);
675 
682  void visibleAreaChanged(const VisibleArea& area);
683 
685  void sendCursorStatus(const String& x_value, const String& y_value);
686 
688  void sendStatusMessage(std::string message, OpenMS::UInt time);
689 
691  void recalculateAxes();
692 
694  void updateVScrollbar(float f_min, float disp_min, float disp_max, float f_max);
695 
697  void updateHScrollbar(float f_min, float disp_min, float disp_max, float f_max);
698 
700  void changeLegendVisibility();
701 
703  void actionModeChange();
704 
706  void preferencesChange();
707 
708 protected slots:
709 
711  void updateCursor_();
712 
713 protected:
714 
716  void drawText_(QPainter & painter, const QStringList& text);
717 
719  double getIdentificationMZ_(const Size layer_index,
720  const PeptideIdentification & peptide) const;
721 
723  virtual bool finishAdding_() = 0;
724 
727  void popIncompleteLayer_(const QString& error_message = "");
728 
730 
731  void resizeEvent(QResizeEvent * e) override;
732  void wheelEvent(QWheelEvent * e) override;
733  void keyPressEvent(QKeyEvent * e) override;
734  void keyReleaseEvent(QKeyEvent * e) override;
735  void focusOutEvent(QFocusEvent * e) override;
736  void leaveEvent(QEvent * e) override;
737  void enterEvent(QEvent * e) override;
739 
741  virtual void intensityModeChange_();
742 
744  void dimensionsChanged_();
745 
756  virtual void changeVisibleArea_(VisibleArea new_area, bool repaint = true, bool add_to_stack = false);
757 
763  virtual void recalculateSnapFactor_();
764 
766 
767  virtual void zoom_(int x, int y, bool zoom_in);
770  void zoomBack_();
772  virtual void zoomForward_();
774  void zoomAdd_(const VisibleArea& area);
776  void zoomClear_();
778 
780 
781  virtual void translateLeft_(Qt::KeyboardModifiers m);
784  virtual void translateRight_(Qt::KeyboardModifiers m);
786  virtual void translateForward_();
788  virtual void translateBackward_();
790 
796  virtual void updateScrollbars_();
797 
807  inline PointXYType widgetToData_(double x, double y)
808  {
809  const auto& xy = visible_area_.getAreaXY();
810  return PointXYType(
811  xy.minX() + x / width() * xy.width(),
812  xy.minY() + (height() - y) / height() * xy.height()
813  );
814  }
815 
817  inline PointXYType widgetToData_(const QPoint& pos)
818  {
819  return widgetToData_(pos.x(), pos.y());
820  }
821 
823  virtual void paintGridLines_(QPainter & painter);
824 
826  QImage buffer_;
827 
830 
832  ActionModes action_mode_ = AM_TRANSLATE;
833 
835  IntensityModes intensity_mode_ = IM_NONE;
836 
839 
847 
853  virtual void recalculateRanges_();
854 
859 
861  bool show_grid_ = true;
862 
864  std::vector<VisibleArea> zoom_stack_;
866  std::vector<VisibleArea>::iterator zoom_pos_ = zoom_stack_.end();
867 
877  virtual void update_(const char* caller_name);
878 
880  void modificationStatus_(Size layer_index, bool modified);
881 
883  bool update_buffer_ = false;
884 
886  PlotWidget* spectrum_widget_ = nullptr;
887 
890 
897  double percentage_factor_ = 1.0;
898 
906  std::vector<double> snap_factors_;
907 
909  QRubberBand rubber_band_;
910 
912  QMenu* context_add_ = nullptr;
913 
915  bool show_timing_ = false;
916 
921 
924  {
925  std::set<DataProcessing::ProcessingAction> actions;
926  actions.insert(action);
927 
928  DataProcessingPtr p = boost::shared_ptr<DataProcessing>(new DataProcessing);
929  //actions
930  p->setProcessingActions(actions);
931  //software
932  p->getSoftware().setName("PlotCanvas");
933  //version
934  p->getSoftware().setVersion(VersionInfo::getVersion());
935  //time
936  p->setCompletionTime(DateTime::now());
937 
938  for (Size i = 0; i < map.size(); ++i)
939  {
940  map[i].getDataProcessing().push_back(p);
941  }
942  }
943 
944  };
945 }
Description of the applied preprocessing steps.
Definition: DataProcessing.h:51
std::vector< VisibleArea > zoom_stack_
The zoom stack.
Definition: PlotCanvas.h:864
PeakIndex selected_peak_
selected peak
Definition: PlotCanvas.h:918
ActionModes
Mouse action modes.
Definition: PlotCanvas.h:194
LayerStack layers_
Layer data.
Definition: PlotCanvas.h:838
bool getLayerFlag(Size layer, LayerDataBase::Flags f) const
returns a layer flag of the layer layer
Definition: PlotCanvas.h:330
RangeManager< RangeRT, RangeMZ, RangeIntensity, RangeMobility > RangeAllType
Range which contains all known dimensions.
Definition: RangeManager.h:920
A more convenient string class.
Definition: String.h:58
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerDataBase.h:152
QPoint last_mouse_pos_
start position of mouse actions
Definition: PlotCanvas.h:889
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerDataBase.h:157
void setLayerFlag(LayerDataBase::Flags f, bool value)
sets a layer flag of the current layer
Definition: PlotCanvas.h:324
Size current_layer_
Definition: PlotCanvas.h:113
std::unique_ptr< LayerDataChrom > LayerDataChromUPtr
Definition: PlotCanvas.h:72
const Area & setArea(const RangeAllType &data)
Set the area using unit data (RT, m/z, ...)
Definition: DimMapper.h:865
Size getCurrentLayerIndex() const
returns the index of the active layer
Definition: PlotCanvas.h:312
Allows dynamical switching (at runtime) between a dimension (RT, m/z, int, IM, etc) and X...
Definition: DimMapper.h:644
A container for features.
Definition: FeatureMap.h:98
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
std::unique_ptr< LayerDataConsensus > LayerDataConsensusUPtr
Definition: PlotCanvas.h:75
const LayerDataBase & getLayer(const Size index) const
Normal mode: f(x)=x; y-axis shows the maximum of all layers, no scaling.
Definition: PlotCanvas.h:204
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:134
std::unique_ptr< LayerDataBase > LayerDataBaseUPtr
Definition: PlotCanvas.h:71
DimMapper< 2 > unit_mapper_
Mapper for X and Y axis.
Definition: PlotCanvas.h:829
A container for consensus elements.
Definition: ConsensusMap.h:82
PixelArea getPixelRange() const
Definition: PlotCanvas.h:376
void setLabel(LayerDataBase::LabelType label)
Definition: PlotCanvas.h:347
Size size() const
The number of spectra.
Definition: MSExperiment.h:147
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerDataBase.h:146
RangeType overall_data_range_
Stores the data range (m/z, RT and intensity) of all layers.
Definition: PlotCanvas.h:858
std::vector< LayerDataBaseUPtr > layers_
Definition: PlotCanvas.h:111
LayerDataBase & getCurrentLayer()
returns the layer data of the active layer
Definition: PlotCanvas.h:306
Shows intensities normalized by each layer&#39;s maximum: f(x)=x/max(x)*100.
Definition: PlotCanvas.h:205
SpectrumType::PeakType PeakType
Peak type.
Definition: PlotCanvas.h:173
LayerDataBase & getLayer(Size index)
returns the layer data with index index
Definition: PlotCanvas.h:295
PeakIndex measurement_start_
start peak of measuring mode
Definition: PlotCanvas.h:920
bool getLayerFlag(LayerDataBase::Flags f) const
returns a layer flag of the current layer
Definition: PlotCanvas.h:318
QImage buffer_
Buffer that stores the actual peak information.
Definition: PlotCanvas.h:826
LabelType
Label used in visualization.
Definition: LayerDataBase.h:123
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
Area< 2 >::AreaXYType AreaXYType
The range of data shown on the X and Y axis (unit depends on runtime config)
Definition: PlotCanvas.h:178
DimMapper< 2 >::Point PointOnAxis
Definition: PlotCanvas.h:191
const VisibleArea & getVisibleArea() const
Returns the currently visible area. This is the authority which determines the X and Y axis&#39; scale...
Definition: PlotCanvas.h:362
ProcessingAction
Definition: DataProcessing.h:58
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: DataProcessing.h:136
Shows the maximum displayed intensity (across all layers) as if it was the overall maximum intensity...
Definition: PlotCanvas.h:206
Base class for spectrum widgets.
Definition: PlotWidget.h:80
PointXYType widgetToData_(double x, double y)
Convert widget (pixel) to chart (unit) coordinates.
Definition: PlotCanvas.h:807
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:53
bool empty() const
LayerDataBase::ExperimentType ExperimentType
Main data type (experiment)
Definition: PlotCanvas.h:154
bool isVisible(const PointOnAxis &p) const
Definition: PlotCanvas.h:369
float getMinIntensity(Size index) const
Returns the minimum intensity of the layer with index index.
Definition: PlotCanvas.h:489
LayerDataBase::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: PlotCanvas.h:162
const LayerDataBase & getCurrentLayer() const
DPosition< 2U > PointXYType
Type of the Points in a &#39;flat&#39; canvas (1D and 2D)
Definition: CommonDefs.h:59
const LayerDataBase & getLayer(Size index) const
returns the layer data with index index
Definition: PlotCanvas.h:290
Int getActionMode() const
Returns the action mode.
Definition: PlotCanvas.h:247
LayerDataBase::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: PlotCanvas.h:166
PlotWidget * getPlotWidget() const
Returns the spectrum widget.
Definition: PlotCanvas.h:236
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: PlotCanvas.h:259
std::unique_ptr< LayerDataFeature > LayerDataFeatureUPtr
Definition: PlotCanvas.h:74
const LayerDataBase & getCurrentLayer() const
returns the layer data of the active layer
Definition: PlotCanvas.h:301
Management and storage of parameters / INI files.
Definition: Param.h:69
LayerDataBase::FeatureMapType FeatureMapType
Main data type (features)
Definition: PlotCanvas.h:160
void setCurrentLayer(Size index)
throws Exception::IndexOverflow unless index is smaller than getLayerCount()
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
IntensityModes
Display modes of intensity.
Definition: PlotCanvas.h:202
void addDataProcessing_(PeakMap &map, DataProcessing::ProcessingAction action) const
Data processing setter for peak maps.
Definition: PlotCanvas.h:923
static String getVersion()
Return the version number of OpenMS.
float getMaxIntensity(Size index) const
Returns the maximum intensity of the layer with index index.
Definition: PlotCanvas.h:495
QRubberBand rubber_band_
Rubber band for selected area.
Definition: PlotCanvas.h:909
PointXYType widgetToData_(const QPoint &pos)
Calls widgetToData_ with x and y position of pos.
Definition: PlotCanvas.h:817
Definition: DimMapper.h:818
float getCurrentMinIntensity() const
Returns the minimum intensity of the active layer.
Definition: PlotCanvas.h:477
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
LayerDataBase::ConstExperimentSharedPtrType ConstExperimentSharedPtrType
Definition: PlotCanvas.h:157
void setIntensityMode(IntensityModes mod)
Sets the intensity mode.
Definition: PlotCanvas.h:273
LayerDataBase::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: PlotCanvas.h:156
std::vector< double > snap_factors_
Intensity scaling factor for &#39;snap to maximum intensity mode&#39;.
Definition: PlotCanvas.h:906
void setCurrentLayerParameters(const Param &param)
Sets the parameters of the current layer.
Definition: PlotCanvas.h:507
bool gridLinesShown() const
Returns if the grid is currently shown.
Definition: PlotCanvas.h:284
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerDataBase.h:154
std::unique_ptr< LayerDataPeak > LayerDataPeakUPtr
Definition: PlotCanvas.h:73
Size getCurrentLayerIndex() const
void setLayerFlag(Size layer, LayerDataBase::Flags f, bool value)
sets a layer flag of the layer layer
Definition: PlotCanvas.h:336
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerDataBase.h:140
Base class for visualization canvas classes.
Definition: PlotCanvas.h:145
static DateTime now()
Returns the current date and time.
DataFilter array providing some convenience functions.
Definition: DataFilters.h:52
LayerDataBase::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: PlotCanvas.h:158
void removeLayers()
removes all layers by calling removeLayer() for all layer indices (from highest to lowest) ...
Definition: PlotCanvas.h:408
ExperimentType::SpectrumType SpectrumType
Spectrum type.
Definition: PlotCanvas.h:169
Definition: PlotCanvas.h:82
translate
Definition: PlotCanvas.h:196
void setPlotWidget(PlotWidget *widget)
Sets the spectrum widget.
Definition: PlotCanvas.h:225
int Int
Signed integer type.
Definition: Types.h:102
float getCurrentMaxIntensity() const
Returns the maximum intensity of the active layer.
Definition: PlotCanvas.h:483
void addLayer(LayerDataBaseUPtr new_layer)
zoom
Definition: PlotCanvas.h:197
AreaXYType canvasPixelArea() const
Get the Area in pixel coordinates of the current canvas for X and Y axis.
Definition: PlotCanvas.h:649
Class that stores the data for one layer.
Definition: LayerDataBase.h:194
Flags
Flags that determine which information is shown.
Definition: LayerDataBase.h:109
SpectrumType::ConstIterator SpectrumConstIteratorType
Spectrum iterator type (iterates over peaks)
Definition: PlotCanvas.h:171
Index of a peak or feature.
Definition: PeakIndex.h:50
VisibleArea visible_area_
Stores the currently visible area in data units (e.g. seconds, m/z, intensity etc) and axis (X...
Definition: PlotCanvas.h:846
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63
Size getLayerCount() const
LayerDataBase::ConsensusMapType ConsensusMapType
Main data type (consensus features)
Definition: PlotCanvas.h:164
void removeLayer(Size layer_index)