OpenMS  2.6.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>
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 
65 
71  class LayerStack
72  {
73  public:
75  void addLayer(LayerData&& new_layer);
76 
77  const LayerData& getLayer(const Size index) const;
78 
79  LayerData& getLayer(const Size index);
80 
81  const LayerData& getCurrentLayer() const;
82 
84 
86  void setCurrentLayer(Size index);
87 
88  Size getCurrentLayerIndex() const;
89 
90  bool empty() const;
91 
92  Size getLayerCount() const;
93 
94  void removeLayer(Size layer_index);
95 
96  void removeCurrentLayer();
97 
98  protected:
99  std::vector<LayerData> layers_;
100  private:
102  };
103 
133  class OPENMS_GUI_DLLAPI SpectrumCanvas :
134  public QWidget,
135  public DefaultParamHandler
136  {
137  Q_OBJECT
138 
139 public:
142 
157 
166 
171 
172 
175  {
178  AM_MEASURE
179  };
180 
183  {
187  IM_LOG
188  };
189 
191 
193  SpectrumCanvas(const Param & preferences, QWidget * parent = nullptr);
194 
196  ~SpectrumCanvas() override;
197 
205  inline void setSpectrumWidget(SpectrumWidget * widget)
206  {
207  spectrum_widget_ = widget;
208  }
209 
217  {
218  return spectrum_widget_;
219  }
220 
227  inline Int getActionMode() const
228  {
229  return action_mode_;
230  }
231 
240  {
241  return intensity_mode_;
242  }
243 
254  {
255  intensity_mode_ = mod;
256  intensityModeChange_();
257  }
258 
264  inline bool gridLinesShown() const
265  {
266  return show_grid_;
267  }
268 
270  inline const LayerData& getLayer(Size index) const
271  {
272  return layers_.getLayer(index);
273  }
275  inline LayerData& getLayer(Size index)
276  {
277  return layers_.getLayer(index);
278  }
279 
281  inline const LayerData& getCurrentLayer() const
282  {
283  return layers_.getCurrentLayer();
284  }
287  {
288  return layers_.getCurrentLayer();
289  }
290 
292  inline Size getCurrentLayerIndex() const
293  {
294  return layers_.getCurrentLayerIndex();
295  }
296 
299  {
300  return getLayerFlag(layers_.getCurrentLayerIndex(), f);
301  }
302 
304  void setLayerFlag(LayerData::Flags f, bool value)
305  {
306  setLayerFlag(layers_.getCurrentLayerIndex(), f, value);
307  }
308 
310  bool getLayerFlag(Size layer, LayerData::Flags f) const
311  {
312  return layers_.getLayer(layer).flags.test(f);
313  }
314 
316  void setLayerFlag(Size layer, LayerData::Flags f, bool value)
317  {
318  //abort if there are no layers
319  if (layers_.empty()) return;
320 
321  layers_.getLayer(layer).flags.set(f, value);
322  update_buffer_ = true;
323  update();
324  }
325 
326  inline void setLabel(LayerData::LabelType label)
327  {
328  //abort if there are no layers
329  if (layers_.empty()) return;
330  layers_.getCurrentLayer().label = label;
331  update_buffer_ = true;
332  update();
333  }
334 
340  inline const AreaType & getVisibleArea() const
341  {
342  return visible_area_;
343  }
344 
348  virtual void setFilters(const DataFilters & filters);
349 
351  inline bool isMzToXAxis()
352  {
353  return mz_to_x_axis_;
354  }
355 
357  void mzToXAxis(bool mz_to_x_axis);
358 
365  inline Size getLayerCount() const
367  {
368  return layers_.getLayerCount();
369  }
370 
372  virtual void activateLayer(Size layer_index) = 0;
374  virtual void removeLayer(Size layer_index) = 0;
375 
378  {
379  for (Size i = getLayerCount(); i > 0; --i)
380  {
381  removeLayer(i-1);
382  }
383  }
384 
398  bool addLayer(ExperimentSharedPtrType map, ODExperimentSharedPtrType od_map, const String & filename = "");
399 
408  bool addLayer(FeatureMapSharedPtrType map, const String & filename = "");
409 
418  bool addLayer(ConsensusMapSharedPtrType map, const String & filename = "");
420 
429  bool addLayer(std::vector<PeptideIdentification> & peptides,
430  const String & filename = "");
431 
433  inline float getCurrentMinIntensity() const
434  {
435  return layers_.getCurrentLayer().getMinIntensity();
436  }
437 
439  inline float getCurrentMaxIntensity() const
440  {
441  return layers_.getCurrentLayer().getMaxIntensity();
442  }
443 
445  inline float getMinIntensity(Size index) const
446  {
447  return getLayer(index).getMinIntensity();
448  }
449 
451  inline float getMaxIntensity(Size index) const
452  {
453  return getLayer(index).getMaxIntensity();
454  }
455 
457  void setLayerName(Size i, const String & name);
458 
460  String getLayerName(Size i);
461 
463  inline void setCurrentLayerParameters(const Param& param)
464  {
465  getCurrentLayer().param = param;
466  emit preferencesChange();
467  }
468 
474  const DRange<3> & getDataRange();
475 
481  double getSnapFactor();
482 
484  double getPercentageFactor();
485 
487  virtual void showCurrentLayerPreferences() = 0;
488 
495  virtual void showMetaData(bool modifiable = false, Int index = -1);
496 
502  virtual void saveCurrentLayer(bool visible) = 0;
503 
504 public slots:
505 
512  void changeVisibility(Size i, bool b);
513 
520  void changeLayerFilterState(Size i, bool b);
521 
528  void showGridLines(bool show);
529 
537  void resetZoom(bool repaint = true);
538 
545  void setVisibleArea(AreaType area);
546 
552  virtual void horizontalScrollBarChange(int value);
553 
559  virtual void verticalScrollBarChange(int value);
560 
562  void setAdditionalContextMenu(QMenu * menu);
563 
571  void getVisiblePeakData(ExperimentType & map) const;
572 
573 
581  void getVisibleFeatureData(FeatureMapType & map) const;
582 
590  void getVisibleConsensusData(ConsensusMapType & map) const;
591 
599  void getVisibleIdentifications(std::vector<PeptideIdentification> & peptides) const;
600 
602  virtual void updateLayer(Size i) = 0;
603 
604 signals:
605 
607  void layerModficationChange(Size layer, bool modified);
608 
610  void layerActivated(QWidget * w);
611 
613  void layerZoomChanged(QWidget * w);
614 
621  void visibleAreaChanged(DRange<2> area); //Do not change this to AreaType! QT needs the exact type...
622 
624  void sendCursorStatus(double mz = -1.0, double rt = -1.0);
625 
627  void sendStatusMessage(std::string message, OpenMS::UInt time);
628 
630  void recalculateAxes();
631 
633  void updateVScrollbar(float, float, float, float);
634 
636  void updateHScrollbar(float, float, float, float);
637 
639  void changeLegendVisibility();
640 
642  void actionModeChange();
643 
645  void preferencesChange();
646 
647 protected slots:
648 
650  void updateCursor_();
651 
652 protected:
653 
655  void drawText_(QPainter & painter, QStringList text);
656 
658  double getIdentificationMZ_(const Size layer_index,
659  const PeptideIdentification & peptide) const;
660 
662  virtual bool finishAdding_() = 0;
663 
666  void popIncompleteLayer_(const QString& error_message = "");
667 
669 
670  void resizeEvent(QResizeEvent * e) override;
671  void wheelEvent(QWheelEvent * e) override;
672  void keyPressEvent(QKeyEvent * e) override;
673  void keyReleaseEvent(QKeyEvent * e) override;
674  void focusOutEvent(QFocusEvent * e) override;
675  void leaveEvent(QEvent * e) override;
676  void enterEvent(QEvent * e) override;
678 
680  virtual void intensityModeChange_();
681 
692  virtual void changeVisibleArea_(const AreaType & new_area, bool repaint = true, bool add_to_stack = false);
693 
699  virtual void recalculateSnapFactor_();
700 
702 
703  virtual void zoom_(int x, int y, bool zoom_in);
706  void zoomBack_();
708  virtual void zoomForward_();
710  void zoomAdd_(const AreaType & area);
712  void zoomClear_();
714 
716 
717  virtual void translateLeft_(Qt::KeyboardModifiers m);
720  virtual void translateRight_(Qt::KeyboardModifiers m);
722  virtual void translateForward_();
724  virtual void translateBackward_();
726 
732  virtual void updateScrollbars_();
733 
743  inline PointType widgetToData_(double x, double y)
744  {
745  if (!isMzToXAxis())
746  {
747  return PointType(
748  visible_area_.minX() + (height() - y) / height() * visible_area_.width(),
749  visible_area_.minY() + x / width() * visible_area_.height()
750  );
751  }
752  else
753  {
754  return PointType(
755  visible_area_.minX() + x / width() * visible_area_.width(),
756  visible_area_.minY() + (height() - y) / height() * visible_area_.height()
757  );
758  }
759  }
760 
762  inline PointType widgetToData_(const QPoint & pos)
763  {
764  return widgetToData_(pos.x(), pos.y());
765  }
766 
775  inline void dataToWidget_(double x, double y, QPoint & point)
776  {
777  if (!isMzToXAxis())
778  {
779 
780 
781  if (intensity_mode_ != SpectrumCanvas::IM_LOG)
782  {
783  point.setX(int((y - visible_area_.minY()) / visible_area_.height() * width()));
784  }
785  else // IM_LOG
786  {
787  point.setX(int(
788  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * width())
789  );
790  }
791 
792  point.setY(height() - int((x - visible_area_.minX()) / visible_area_.width() * height()));
793  }
794  else
795  {
796  point.setX(int((x - visible_area_.minX()) / visible_area_.width() * width()));
797 
798  if (intensity_mode_ != SpectrumCanvas::IM_LOG)
799  {
800  point.setY(height() - int((y - visible_area_.minY()) / visible_area_.height() * height()));
801  }
802  else // IM_LOG
803  {
804  point.setY(height() - int(
805  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * height()
806  ));
807  }
808  }
809  }
810 
812  virtual void paintGridLines_(QPainter & painter);
813 
815  QImage buffer_;
816 
819 
822 
825 
828 
836 
846  void recalculateRanges_(UInt mz_dim, UInt rt_dim, UInt it_dim);
847 
856 
859 
861  std::vector<AreaType> zoom_stack_;
863  std::vector<AreaType>::iterator zoom_pos_;
864 
874  virtual void update_(const char * caller_name);
875 
877  void modificationStatus_(Size layer_index, bool modified);
878 
881 
883  void adjustBuffer_();
884 
887 
890 
897 
903  std::vector<double> snap_factors_;
904 
906  QRubberBand rubber_band_;
907 
909  QMenu* context_add_;
910 
913 
918 
921  {
922  std::set<DataProcessing::ProcessingAction> actions;
923  actions.insert(action);
924 
925  DataProcessingPtr p = boost::shared_ptr<DataProcessing>(new DataProcessing);
926  //actions
927  p->setProcessingActions(actions);
928  //software
929  p->getSoftware().setName("SpectrumCanvas");
930  //version
931  p->getSoftware().setVersion(VersionInfo::getVersion());
932  //time
933  p->setCompletionTime(DateTime::now());
934 
935  for (Size i = 0; i < map.size(); ++i)
936  {
937  map[i].getDataProcessing().push_back(p);
938  }
939  }
940 
941  };
942 }
943 
DefaultParamHandler.h
OpenMS::SpectrumCanvas::ConstExperimentSharedPtrType
LayerData::ConstExperimentSharedPtrType ConstExperimentSharedPtrType
Definition: SpectrumCanvas.h:147
OpenMS::SpectrumCanvas::visible_area_
AreaType visible_area_
Stores the currently visible area.
Definition: SpectrumCanvas.h:835
OpenMS::SpectrumCanvas::IM_PERCENTAGE
Shows intensities normalized by layer maximum: f(x)=x/max(x)*100.
Definition: SpectrumCanvas.h:185
OpenMS::LayerData::ExperimentSharedPtrType
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:153
DRange.h
OpenMS::SpectrumCanvas::ActionModes
ActionModes
Mouse action modes.
Definition: SpectrumCanvas.h:174
OpenMS::SpectrumCanvas::widgetToData_
PointType widgetToData_(const QPoint &pos)
Calls widgetToData_ with x and y position of pos.
Definition: SpectrumCanvas.h:762
VersionInfo.h
OpenMS::SpectrumCanvas::SpectrumType
ExperimentType::SpectrumType SpectrumType
Spectrum type.
Definition: SpectrumCanvas.h:159
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(Size layer, LayerData::Flags f) const
returns a layer flag of the layer layer
Definition: SpectrumCanvas.h:310
OpenMS::LayerData::FeatureMapSharedPtrType
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:141
OpenMS::SpectrumCanvas::dataToWidget_
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates.
Definition: SpectrumCanvas.h:775
OpenMS::LayerStack::getCurrentLayer
const LayerData & getCurrentLayer() const
Types.h
OpenMS::LayerData::ConsensusMapSharedPtrType
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:147
OpenMS::SpectrumCanvas::addDataProcessing_
void addDataProcessing_(PeakMap &map, DataProcessing::ProcessingAction action) const
Data processing setter for peak maps.
Definition: SpectrumCanvas.h:920
OpenMS::SpectrumCanvas::setLabel
void setLabel(LayerData::LabelType label)
Definition: SpectrumCanvas.h:326
OpenMS::SpectrumCanvas::AreaType
DRange< 2 > AreaType
Types of Ranges/Areas.
Definition: SpectrumCanvas.h:170
OpenMS::SpectrumCanvas::getCurrentLayer
LayerData & getCurrentLayer()
returns the layer data of the active layer
Definition: SpectrumCanvas.h:286
OpenMS::SpectrumCanvas::PointType
DPosition< 2 > PointType
Type of the Points.
Definition: SpectrumCanvas.h:168
OpenMS::SpectrumCanvas::IM_LOG
Logarithmic mode.
Definition: SpectrumCanvas.h:187
OpenMS::LayerData::ConstExperimentSharedPtrType
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerData.h:155
OpenMS::LayerStack::current_layer_
Size current_layer_
Definition: SpectrumCanvas.h:101
OpenMS::String
A more convenient string class.
Definition: String.h:59
OpenMS::DRange< 2 >
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
OpenMS::SpectrumCanvas::getVisibleArea
const AreaType & getVisibleArea() const
Returns the currently visible area.
Definition: SpectrumCanvas.h:340
OpenMS::SpectrumCanvas::ConsensusMapSharedPtrType
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: SpectrumCanvas.h:156
OpenMS::LayerStack::removeCurrentLayer
void removeCurrentLayer()
OpenMS::SpectrumCanvas::selected_peak_
PeakIndex selected_peak_
selected peak
Definition: SpectrumCanvas.h:915
OpenMS::LayerData::Flags
Flags
Flags that determine which information is shown.
Definition: LayerData.h:107
OpenMS::SpectrumCanvas::mz_to_x_axis_
bool mz_to_x_axis_
Stores the mapping of m/z.
Definition: SpectrumCanvas.h:827
OpenMS::SpectrumCanvas::IntensityModes
IntensityModes
Display modes of intensity.
Definition: SpectrumCanvas.h:182
OpenMS::SpectrumWidget
Base class for spectrum widgets.
Definition: SpectrumWidget.h:80
QWidget
OpenMS::SpectrumCanvas::zoom_stack_
std::vector< AreaType > zoom_stack_
The zoom stack.
Definition: SpectrumCanvas.h:861
OpenMS::MSExperiment::size
Size size() const
Definition: MSExperiment.h:127
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
OpenMS::SpectrumCanvas::getCurrentLayer
const LayerData & getCurrentLayer() const
returns the layer data of the active layer
Definition: SpectrumCanvas.h:281
OpenMS::DateTime::now
static DateTime now()
Returns the current date and time.
OpenMS::DataProcessingPtr
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: DataProcessing.h:135
OpenMS::SpectrumCanvas::widgetToData_
PointType widgetToData_(double x, double y)
Convert widget to chart coordinates.
Definition: SpectrumCanvas.h:743
OpenMS::SpectrumCanvas::ExperimentType
LayerData::ExperimentType ExperimentType
Main data type (experiment)
Definition: SpectrumCanvas.h:144
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::DataProcessing::ProcessingAction
ProcessingAction
Definition: DataProcessing.h:58
OpenMS::SpectrumCanvas::intensity_mode_
IntensityModes intensity_mode_
Stores the used intensity mode function.
Definition: SpectrumCanvas.h:821
OpenMS::SpectrumCanvas::getLayer
const LayerData & getLayer(Size index) const
returns the layer data with index index
Definition: SpectrumCanvas.h:270
OpenMS::LayerStack::getCurrentLayerIndex
Size getCurrentLayerIndex() const
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::LayerStack
Definition: SpectrumCanvas.h:71
OpenMS::SpectrumCanvas::setLayerFlag
void setLayerFlag(LayerData::Flags f, bool value)
sets a layer flag of the current layer
Definition: SpectrumCanvas.h:304
int
OpenMS::LayerData
Class that stores the data for one layer.
Definition: LayerData.h:89
OpenMS::SpectrumCanvas::IM_SNAP
Shows the maximum displayed intensity as if it was the overall maximum intensity.
Definition: SpectrumCanvas.h:186
OpenMS::SpectrumCanvas::last_mouse_pos_
QPoint last_mouse_pos_
start position of mouse actions
Definition: SpectrumCanvas.h:889
OpenMS::SpectrumCanvas::update_buffer_
bool update_buffer_
Whether to recalculate the data in the buffer when repainting.
Definition: SpectrumCanvas.h:880
OpenMS::SpectrumCanvas::getCurrentMaxIntensity
float getCurrentMaxIntensity() const
Returns the maximum intensity of the active layer.
Definition: SpectrumCanvas.h:439
OpenMS::SpectrumCanvas::measurement_start_
PeakIndex measurement_start_
start peak of measuring mode
Definition: SpectrumCanvas.h:917
OpenMS::SpectrumCanvas::show_timing_
bool show_timing_
Flag that determines if timing data is printed to the command line.
Definition: SpectrumCanvas.h:912
OpenMS::SpectrumCanvas::zoom_pos_
std::vector< AreaType >::iterator zoom_pos_
The current position in the zoom stack.
Definition: SpectrumCanvas.h:863
OpenMS::SpectrumCanvas::ConsensusMapType
LayerData::ConsensusMapType ConsensusMapType
Main data type (consensus features)
Definition: SpectrumCanvas.h:154
OpenMS::LayerStack::getLayerCount
Size getLayerCount() const
OpenMS::SpectrumCanvas::getMinIntensity
float getMinIntensity(Size index) const
Returns the minimum intensity of the layer with index index.
Definition: SpectrumCanvas.h:445
OpenMS::VersionInfo::getVersion
static String getVersion()
Return the version number of OpenMS.
OpenMS::SpectrumCanvas::buffer_
QImage buffer_
Buffer that stores the actual peak information.
Definition: SpectrumCanvas.h:815
OpenMS::SpectrumCanvas::setCurrentLayerParameters
void setCurrentLayerParameters(const Param &param)
Sets the parameters of the current layer.
Definition: SpectrumCanvas.h:463
OpenMS::SpectrumCanvas::setLayerFlag
void setLayerFlag(Size layer, LayerData::Flags f, bool value)
sets a layer flag of the layer layer
Definition: SpectrumCanvas.h:316
OpenMS::SpectrumCanvas::IM_NONE
Normal mode: f(x)=x.
Definition: SpectrumCanvas.h:184
OpenMS::SpectrumCanvas::FeatureMapSharedPtrType
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: SpectrumCanvas.h:152
OpenMS::LayerStack::empty
bool empty() const
OpenMS::SpectrumCanvas::getIntensityMode
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: SpectrumCanvas.h:239
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:80
OpenMS::SpectrumCanvas::getSpectrumWidget
SpectrumWidget * getSpectrumWidget() const
Returns the spectrum widget.
Definition: SpectrumCanvas.h:216
OpenMS::DPosition< 2 >
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::SpectrumCanvas::isMzToXAxis
bool isMzToXAxis()
Returns the mapping of m/z to axes.
Definition: SpectrumCanvas.h:351
OpenMS::SpectrumCanvas::snap_factors_
std::vector< double > snap_factors_
Intensity scaling factor for 'snap to maximum intensity mode'.
Definition: SpectrumCanvas.h:903
OpenMS::SpectrumCanvas::spectrum_widget_
SpectrumWidget * spectrum_widget_
Back-pointer to the enclosing spectrum widget.
Definition: SpectrumCanvas.h:886
OpenMS::SpectrumCanvas::getActionMode
Int getActionMode() const
Returns the action mode.
Definition: SpectrumCanvas.h:227
OpenMS::SpectrumCanvas::layers_
LayerStack layers_
Layer data.
Definition: SpectrumCanvas.h:824
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:855
OpenMS::SpectrumCanvas::FeatureType
FeatureMapType::FeatureType FeatureType
Feature type.
Definition: SpectrumCanvas.h:165
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(LayerData::Flags f) const
returns a layer flag of the current layer
Definition: SpectrumCanvas.h:298
OpenMS::SpectrumCanvas::AM_TRANSLATE
translate
Definition: SpectrumCanvas.h:176
OpenMS::FeatureMap
A container for features.
Definition: FeatureMap.h:97
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
OpenMS::DataFilters
DataFilter array providing some convenience functions.
Definition: DataFilters.h:50
OpenMS::SpectrumCanvas::removeLayers
void removeLayers()
removes all layers by calling removeLayer() for all layer indices (from highest to lowest)
Definition: SpectrumCanvas.h:377
OpenMS::Feature
An LC-MS feature.
Definition: Feature.h:70
OpenMS::SpectrumCanvas::PeakType
SpectrumType::PeakType PeakType
Peak type.
Definition: SpectrumCanvas.h:163
OpenMS::SpectrumCanvas::getCurrentMinIntensity
float getCurrentMinIntensity() const
Returns the minimum intensity of the active layer.
Definition: SpectrumCanvas.h:433
OpenMS::LayerStack::addLayer
void addLayer(LayerData &&new_layer)
adds a new layer and makes it the current layer
OpenMS::SpectrumCanvas::rubber_band_
QRubberBand rubber_band_
Rubber band for selected area.
Definition: SpectrumCanvas.h:906
OpenMS::DataProcessing
Description of the applied preprocessing steps.
Definition: DataProcessing.h:51
OpenMS::SpectrumCanvas::getCurrentLayerIndex
Size getCurrentLayerIndex() const
returns the index of the active layer
Definition: SpectrumCanvas.h:292
OpenMS::SpectrumCanvas::setSpectrumWidget
void setSpectrumWidget(SpectrumWidget *widget)
Sets the spectrum widget.
Definition: SpectrumCanvas.h:205
OpenMS::SpectrumCanvas::gridLinesShown
bool gridLinesShown() const
Returns if the grid is currently shown.
Definition: SpectrumCanvas.h:264
OpenMS::SpectrumCanvas::context_add_
QMenu * context_add_
External context menu extension.
Definition: SpectrumCanvas.h:909
OpenMS::SpectrumCanvas::percentage_factor_
double percentage_factor_
Intensity scaling factor for relative scale with multiple layers.
Definition: SpectrumCanvas.h:896
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::SpectrumCanvas::action_mode_
ActionModes action_mode_
Stores the current action mode (Pick, Zoom, Translate)
Definition: SpectrumCanvas.h:818
OpenMS::SpectrumCanvas
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:133
OpenMS::LayerStack::layers_
std::vector< LayerData > layers_
Definition: SpectrumCanvas.h:99
LayerData.h
OpenMS::SpectrumCanvas::getLayer
LayerData & getLayer(Size index)
returns the layer data with index index
Definition: SpectrumCanvas.h:275
OpenMS::SpectrumCanvas::ODExperimentSharedPtrType
LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: SpectrumCanvas.h:148
OpenMS::LayerStack::getLayer
const LayerData & getLayer(const Size index) const
OpenMS::MSSpectrum::ConstIterator
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:128
OpenMS::LayerData::LabelType
LabelType
Label used in visualization.
Definition: LayerData.h:124
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
OpenMS::SpectrumCanvas::FeatureMapType
LayerData::FeatureMapType FeatureMapType
Main data type (features)
Definition: SpectrumCanvas.h:150
OpenMS::LayerData::ODExperimentSharedPtrType
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerData.h:158
OpenMS::SpectrumCanvas::setIntensityMode
void setIntensityMode(IntensityModes mod)
Sets the intensity mode.
Definition: SpectrumCanvas.h:253
OpenMS::SpectrumCanvas::show_grid_
bool show_grid_
Stores whether or not to show a grid.
Definition: SpectrumCanvas.h:858
OpenMS::LayerStack::removeLayer
void removeLayer(Size layer_index)
OpenMS::SpectrumCanvas::ExperimentSharedPtrType
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: SpectrumCanvas.h:146
OpenMS::SpectrumCanvas::getMaxIntensity
float getMaxIntensity(Size index) const
Returns the maximum intensity of the layer with index index.
Definition: SpectrumCanvas.h:451
OpenMS::SpectrumCanvas::AM_ZOOM
zoom
Definition: SpectrumCanvas.h:177
OpenMS::SpectrumCanvas::SpectrumConstIteratorType
SpectrumType::ConstIterator SpectrumConstIteratorType
Spectrum iterator type (iterates over peaks)
Definition: SpectrumCanvas.h:161