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 
98  class OPENMS_GUI_DLLAPI SpectrumCanvas :
99  public QWidget,
100  public DefaultParamHandler
101  {
102  Q_OBJECT
103 
104 public:
107 
122 
131 
136 
137 
140  {
143  AM_MEASURE
144  };
145 
148  {
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 
182  {
183  return spectrum_widget_;
184  }
185 
192  inline Int getActionMode() const
193  {
194  return action_mode_;
195  }
196 
205  {
206  return intensity_mode_;
207  }
208 
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 
256  {
257  OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::getCurrentLayer() index overflow");
258  return layers_[current_layer_];
259  }
260 
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 
673  void popIncompleteLayer_(const QString& error_message = "");
674 
676  inline LayerData& getLayer_(Size index)
677  {
678  OPENMS_PRECONDITION(index < layers_.size(), "SpectrumCanvas::getLayer_(index) index overflow");
679  return layers_[index];
680  }
681 
684  {
685  return getLayer_(current_layer_);
686  }
687 
689 
690  void resizeEvent(QResizeEvent * e) override;
691  void wheelEvent(QWheelEvent * e) override;
692  void keyPressEvent(QKeyEvent * e) override;
693  void keyReleaseEvent(QKeyEvent * e) override;
694  void focusOutEvent(QFocusEvent * e) override;
695  void leaveEvent(QEvent * e) override;
696  void enterEvent(QEvent * e) override;
698 
700  virtual void intensityModeChange_();
701 
712  virtual void changeVisibleArea_(const AreaType & new_area, bool repaint = true, bool add_to_stack = false);
713 
719  virtual void recalculateSnapFactor_();
720 
722 
723  virtual void zoom_(int x, int y, bool zoom_in);
726  void zoomBack_();
728  virtual void zoomForward_();
730  void zoomAdd_(const AreaType & area);
732  void zoomClear_();
734 
736 
737  virtual void translateLeft_(Qt::KeyboardModifiers m);
740  virtual void translateRight_(Qt::KeyboardModifiers m);
742  virtual void translateForward_();
744  virtual void translateBackward_();
746 
752  virtual void updateScrollbars_();
753 
763  inline PointType widgetToData_(double x, double y)
764  {
765  if (!isMzToXAxis())
766  {
767  return PointType(
768  visible_area_.minX() + (height() - y) / height() * visible_area_.width(),
769  visible_area_.minY() + x / width() * visible_area_.height()
770  );
771  }
772  else
773  {
774  return PointType(
775  visible_area_.minX() + x / width() * visible_area_.width(),
776  visible_area_.minY() + (height() - y) / height() * visible_area_.height()
777  );
778  }
779  }
780 
782  inline PointType widgetToData_(const QPoint & pos)
783  {
784  return widgetToData_(pos.x(), pos.y());
785  }
786 
795  inline void dataToWidget_(double x, double y, QPoint & point)
796  {
797  if (!isMzToXAxis())
798  {
799 
800 
801  if (intensity_mode_ != SpectrumCanvas::IM_LOG)
802  {
803  point.setX(int((y - visible_area_.minY()) / visible_area_.height() * width()));
804  }
805  else // IM_LOG
806  {
807  point.setX(int(
808  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * width())
809  );
810  }
811 
812  point.setY(height() - int((x - visible_area_.minX()) / visible_area_.width() * height()));
813  }
814  else
815  {
816  point.setX(int((x - visible_area_.minX()) / visible_area_.width() * width()));
817 
818  if (intensity_mode_ != SpectrumCanvas::IM_LOG)
819  {
820  point.setY(height() - int((y - visible_area_.minY()) / visible_area_.height() * height()));
821  }
822  else // IM_LOG
823  {
824  point.setY(height() - int(
825  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * height()
826  ));
827  }
828  }
829  }
830 
832  virtual void paintGridLines_(QPainter & painter);
833 
835  QImage buffer_;
836 
839 
842 
844  std::vector<LayerData> layers_;
845 
848 
856 
866  void recalculateRanges_(UInt mz_dim, UInt rt_dim, UInt it_dim);
867 
876 
879 
881  std::vector<AreaType> zoom_stack_;
883  std::vector<AreaType>::iterator zoom_pos_;
884 
894  virtual void update_(const char * caller_name);
895 
897  void modificationStatus_(Size layer_index, bool modified);
898 
901 
904 
906  void adjustBuffer_();
907 
910 
913 
920 
926  std::vector<double> snap_factors_;
927 
929  QRubberBand rubber_band_;
930 
932  QMenu * context_add_;
933 
936 
941 
944  {
945  std::set<DataProcessing::ProcessingAction> actions;
946  actions.insert(action);
947 
948  DataProcessingPtr p = boost::shared_ptr<DataProcessing>(new DataProcessing);
949  //actions
950  p->setProcessingActions(actions);
951  //software
952  p->getSoftware().setName("SpectrumCanvas");
953  //version
954  p->getSoftware().setVersion(VersionInfo::getVersion());
955  //time
956  p->setCompletionTime(DateTime::now());
957 
958  for (Size i = 0; i < map.size(); ++i)
959  {
960  map[i].getDataProcessing().push_back(p);
961  }
962  }
963 
964  };
965 }
966 
DefaultParamHandler.h
OpenMS::SpectrumCanvas::ConstExperimentSharedPtrType
LayerData::ConstExperimentSharedPtrType ConstExperimentSharedPtrType
Definition: SpectrumCanvas.h:112
OpenMS::SpectrumCanvas::visible_area_
AreaType visible_area_
Stores the currently visible area.
Definition: SpectrumCanvas.h:855
OpenMS::SpectrumCanvas::IM_PERCENTAGE
Shows intensities normalized by layer maximum: f(x)=x/max(x)*100.
Definition: SpectrumCanvas.h:150
OpenMS::SpectrumCanvas::getLayer_
LayerData & getLayer_(Size index)
Returns the layer with index index.
Definition: SpectrumCanvas.h:676
OpenMS::LayerData::ExperimentSharedPtrType
boost::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition: LayerData.h:149
DRange.h
OpenMS::SpectrumCanvas::ActionModes
ActionModes
Mouse action modes.
Definition: SpectrumCanvas.h:139
OpenMS::SpectrumCanvas::widgetToData_
PointType widgetToData_(const QPoint &pos)
Calls widgetToData_ with x and y position of pos.
Definition: SpectrumCanvas.h:782
VersionInfo.h
OpenMS::SpectrumCanvas::SpectrumType
ExperimentType::SpectrumType SpectrumType
Spectrum type.
Definition: SpectrumCanvas.h:124
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(Size layer, LayerData::Flags f) const
returns a layer flag of the layer layer
Definition: SpectrumCanvas.h:274
OpenMS::LayerData::FeatureMapSharedPtrType
boost::shared_ptr< FeatureMap > FeatureMapSharedPtrType
SharedPtr on feature map.
Definition: LayerData.h:137
OpenMS::SpectrumCanvas::dataToWidget_
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates.
Definition: SpectrumCanvas.h:795
Types.h
OpenMS::LayerData::ConsensusMapSharedPtrType
boost::shared_ptr< ConsensusMap > ConsensusMapSharedPtrType
SharedPtr on consensus features.
Definition: LayerData.h:143
OpenMS::SpectrumCanvas::addDataProcessing_
void addDataProcessing_(PeakMap &map, DataProcessing::ProcessingAction action) const
Data processing setter for peak maps.
Definition: SpectrumCanvas.h:943
OpenMS::SpectrumCanvas::setLabel
void setLabel(LayerData::LabelType label)
Definition: SpectrumCanvas.h:293
OpenMS::SpectrumCanvas::AreaType
DRange< 2 > AreaType
Types of Ranges/Areas.
Definition: SpectrumCanvas.h:135
OpenMS::SpectrumCanvas::getCurrentLayer
LayerData & getCurrentLayer()
returns the layer data of the active layer
Definition: SpectrumCanvas.h:255
OpenMS::SpectrumCanvas::PointType
DPosition< 2 > PointType
Type of the Points.
Definition: SpectrumCanvas.h:133
OpenMS::SpectrumCanvas::IM_LOG
Logarithmic mode.
Definition: SpectrumCanvas.h:152
OpenMS::LayerData::ConstExperimentSharedPtrType
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerData.h:151
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:310
OpenMS::SpectrumCanvas::layers_
std::vector< LayerData > layers_
Layer data.
Definition: SpectrumCanvas.h:844
OpenMS::SpectrumCanvas::ConsensusMapSharedPtrType
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: SpectrumCanvas.h:121
OpenMS::SpectrumCanvas::selected_peak_
PeakIndex selected_peak_
selected peak
Definition: SpectrumCanvas.h:938
OpenMS::LayerData::Flags
Flags
Flags that determine which information is shown.
Definition: LayerData.h:103
OPENMS_PRECONDITION
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:136
OpenMS::SpectrumCanvas::mz_to_x_axis_
bool mz_to_x_axis_
Stores the mapping of m/z.
Definition: SpectrumCanvas.h:847
OpenMS::SpectrumCanvas::IntensityModes
IntensityModes
Display modes of intensity.
Definition: SpectrumCanvas.h:147
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:881
OpenMS::MSExperiment::size
Size size() const
Definition: MSExperiment.h:127
OpenMS::LayerData::DT_FEATURE
Feature data.
Definition: LayerData.h:96
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:242
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:763
OpenMS::SpectrumCanvas::ExperimentType
LayerData::ExperimentType ExperimentType
Main data type (experiment)
Definition: SpectrumCanvas.h:109
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:841
OpenMS::LayerData::DT_PEAK
Spectrum profile or centroided data.
Definition: LayerData.h:94
OpenMS::SpectrumCanvas::getLayer
const LayerData & getLayer(Size index) const
returns the layer data with index index
Definition: SpectrumCanvas.h:235
OpenMS::PeakIndex
Index of a peak or feature.
Definition: PeakIndex.h:50
OpenMS::SpectrumCanvas::setLayerFlag
void setLayerFlag(LayerData::Flags f, bool value)
sets a layer flag of the current layer
Definition: SpectrumCanvas.h:268
int
OpenMS::LayerData
Class that stores the data for one layer.
Definition: LayerData.h:85
OpenMS::SpectrumCanvas::IM_SNAP
Shows the maximum displayed intensity as if it was the overall maximum intensity.
Definition: SpectrumCanvas.h:151
OpenMS::SpectrumCanvas::last_mouse_pos_
QPoint last_mouse_pos_
start position of mouse actions
Definition: SpectrumCanvas.h:912
OpenMS::SpectrumCanvas::update_buffer_
bool update_buffer_
Whether to recalculate the data in the buffer when repainting.
Definition: SpectrumCanvas.h:900
OpenMS::SpectrumCanvas::getCurrentMaxIntensity
float getCurrentMaxIntensity() const
Returns the maximum intensity of the active layer.
Definition: SpectrumCanvas.h:413
OpenMS::SpectrumCanvas::measurement_start_
PeakIndex measurement_start_
start peak of measuring mode
Definition: SpectrumCanvas.h:940
OpenMS::SpectrumCanvas::show_timing_
bool show_timing_
Flag that determines if timing data is printed to the command line.
Definition: SpectrumCanvas.h:935
OpenMS::SpectrumCanvas::zoom_pos_
std::vector< AreaType >::iterator zoom_pos_
The current position in the zoom stack.
Definition: SpectrumCanvas.h:883
OpenMS::SpectrumCanvas::ConsensusMapType
LayerData::ConsensusMapType ConsensusMapType
Main data type (consensus features)
Definition: SpectrumCanvas.h:119
OpenMS::SpectrumCanvas::getMinIntensity
float getMinIntensity(Size index) const
Returns the minimum intensity of the layer with index index.
Definition: SpectrumCanvas.h:430
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:835
OpenMS::SpectrumCanvas::setCurrentLayerParameters
void setCurrentLayerParameters(const Param &param)
Sets the parameters of the current layer.
Definition: SpectrumCanvas.h:470
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::IM_NONE
Normal mode: f(x)=x.
Definition: SpectrumCanvas.h:149
OpenMS::SpectrumCanvas::FeatureMapSharedPtrType
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: SpectrumCanvas.h:117
OpenMS::SpectrumCanvas::getIntensityMode
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: SpectrumCanvas.h:204
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:181
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:321
OpenMS::SpectrumCanvas::snap_factors_
std::vector< double > snap_factors_
Intensity scaling factor for 'snap to maximum intensity mode'.
Definition: SpectrumCanvas.h:926
OpenMS::SpectrumCanvas::spectrum_widget_
SpectrumWidget * spectrum_widget_
Back-pointer to the enclosing spectrum widget.
Definition: SpectrumCanvas.h:909
OpenMS::SpectrumCanvas::getActionMode
Int getActionMode() const
Returns the action mode.
Definition: SpectrumCanvas.h:192
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:875
OpenMS::SpectrumCanvas::FeatureType
FeatureMapType::FeatureType FeatureType
Feature type.
Definition: SpectrumCanvas.h:130
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(LayerData::Flags f) const
returns a layer flag of the current layer
Definition: SpectrumCanvas.h:262
OpenMS::SpectrumCanvas::AM_TRANSLATE
translate
Definition: SpectrumCanvas.h:141
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::Feature
An LC-MS feature.
Definition: Feature.h:70
OpenMS::SpectrumCanvas::PeakType
SpectrumType::PeakType PeakType
Peak type.
Definition: SpectrumCanvas.h:128
OpenMS::SpectrumCanvas::getCurrentMinIntensity
float getCurrentMinIntensity() const
Returns the minimum intensity of the active layer.
Definition: SpectrumCanvas.h:396
OpenMS::SpectrumCanvas::rubber_band_
QRubberBand rubber_band_
Rubber band for selected area.
Definition: SpectrumCanvas.h:929
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:249
OpenMS::SpectrumCanvas::setSpectrumWidget
void setSpectrumWidget(SpectrumWidget *widget)
Sets the spectrum widget.
Definition: SpectrumCanvas.h:170
OpenMS::SpectrumCanvas::gridLinesShown
bool gridLinesShown() const
Returns if the grid is currently shown.
Definition: SpectrumCanvas.h:229
OpenMS::SpectrumCanvas::context_add_
QMenu * context_add_
External context menu extension.
Definition: SpectrumCanvas.h:932
OpenMS::SpectrumCanvas::percentage_factor_
double percentage_factor_
Intensity scaling factor for relative scale with multiple layers.
Definition: SpectrumCanvas.h:919
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:838
OpenMS::SpectrumCanvas
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:98
LayerData.h
OpenMS::SpectrumCanvas::ODExperimentSharedPtrType
LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: SpectrumCanvas.h:113
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:120
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:115
OpenMS::LayerData::ODExperimentSharedPtrType
boost::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition: LayerData.h:154
OpenMS::SpectrumCanvas::getCurrentLayer_
LayerData & getCurrentLayer_()
Returns the currently active layer.
Definition: SpectrumCanvas.h:683
OpenMS::SpectrumCanvas::current_layer_
Size current_layer_
Stores the index of the currently active layer.
Definition: SpectrumCanvas.h:903
OpenMS::SpectrumCanvas::setIntensityMode
void setIntensityMode(IntensityModes mod)
Sets the intensity mode.
Definition: SpectrumCanvas.h:218
OpenMS::SpectrumCanvas::show_grid_
bool show_grid_
Stores whether or not to show a grid.
Definition: SpectrumCanvas.h:878
OpenMS::SpectrumCanvas::ExperimentSharedPtrType
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: SpectrumCanvas.h:111
OpenMS::SpectrumCanvas::getMaxIntensity
float getMaxIntensity(Size index) const
Returns the maximum intensity of the layer with index index.
Definition: SpectrumCanvas.h:447
OpenMS::SpectrumCanvas::AM_ZOOM
zoom
Definition: SpectrumCanvas.h:142
OpenMS::LayerData::DT_CHROMATOGRAM
Chromatogram data.
Definition: LayerData.h:95
OpenMS::SpectrumCanvas::SpectrumConstIteratorType
SpectrumType::ConstIterator SpectrumConstIteratorType
Spectrum iterator type (iterates over peaks)
Definition: SpectrumCanvas.h:126