OpenMS  2.5.0
SpectrumCanvas.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 // OpenMS_GUI config
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
39 
40 //OpenMS
41 #include <OpenMS/CONCEPT/Types.h>
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 
100  class OPENMS_GUI_DLLAPI SpectrumCanvas :
101  public QWidget,
102  public DefaultParamHandler
103  {
104  Q_OBJECT
105 
106 public:
109 
124 
133 
138 
139 
142  {
145  AM_MEASURE
146  };
147 
150  {
154  IM_LOG
155  };
156 
158 
160  SpectrumCanvas(const Param & preferences, QWidget * parent = nullptr);
161 
163  ~SpectrumCanvas() override;
164 
172  inline void setSpectrumWidget(SpectrumWidget * widget)
173  {
174  spectrum_widget_ = widget;
175  }
176 
184  {
185  return spectrum_widget_;
186  }
187 
194  inline Int getActionMode() const
195  {
196  return action_mode_;
197  }
198 
207  {
208  return intensity_mode_;
209  }
210 
221  {
222  intensity_mode_ = mod;
223  intensityModeChange_();
224  }
225 
231  inline bool gridLinesShown() const
232  {
233  return show_grid_;
234  }
235 
237  inline const LayerData & getLayer(Size index) const
238  {
239  OPENMS_PRECONDITION(index < layers_.size(), "SpectrumCanvas::getLayer(index) index overflow");
240  return layers_[index];
241  }
242 
244  inline const LayerData & getCurrentLayer() const
245  {
246  OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::getCurrentLayer() index overflow");
247  return layers_[current_layer_];
248  }
249 
251  inline Size getCurrentLayerIndex() const
252  {
253  return current_layer_;
254  }
255 
258  {
259  OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::getCurrentLayer() index overflow");
260  return layers_[current_layer_];
261  }
262 
265  {
266  return getLayerFlag(current_layer_, f);
267  }
268 
270  void setLayerFlag(LayerData::Flags f, bool value)
271  {
272  setLayerFlag(current_layer_, f, value);
273  }
274 
276  bool getLayerFlag(Size layer, LayerData::Flags f) const
277  {
278  OPENMS_PRECONDITION(layer < layers_.size(), "SpectrumCanvas::getLayerFlag() index overflow");
279  return layers_[layer].flags.test(f);
280  }
281 
283  void setLayerFlag(Size layer, LayerData::Flags f, bool value)
284  {
285  //abort if there are no layers
286  if (layers_.empty()) return;
287 
288  OPENMS_PRECONDITION(layer < layers_.size(), "SpectrumCanvas::setLayerFlag() index overflow");
289 
290  layers_[layer].flags.set(f, value);
291  update_buffer_ = true;
292  update();
293  }
294 
295  inline void setLabel(LayerData::LabelType label)
296  {
297  //abort if there are no layers
298  if (layers_.empty()) return;
299 
300  OPENMS_PRECONDITION(current_layer_ < layers_.size(), "SpectrumCanvas::setLabel() index overflow");
301  layers_[current_layer_].label = label;
302 
303  update_buffer_ = true;
304  update();
305  }
306 
312  inline const AreaType & getVisibleArea() const
313  {
314  return visible_area_;
315  }
316 
320  virtual void setFilters(const DataFilters & filters);
321 
323  inline bool isMzToXAxis()
324  {
325  return mz_to_x_axis_;
326  }
327 
329  void mzToXAxis(bool mz_to_x_axis);
330 
337  inline Size getLayerCount() const
339  {
340  return layers_.size();
341  }
342 
344  Size activeLayerIndex() const;
346  virtual void activateLayer(Size layer_index) = 0;
348  virtual void removeLayer(Size layer_index) = 0;
349 
363  bool addLayer(ExperimentSharedPtrType map, ODExperimentSharedPtrType od_map, const String & filename = "");
364 
373  bool addLayer(FeatureMapSharedPtrType map, const String & filename = "");
374 
383  bool addLayer(ConsensusMapSharedPtrType map, const String & filename = "");
385 
394  bool addLayer(std::vector<PeptideIdentification> & peptides,
395  const String & filename = "");
396 
398  inline float getCurrentMinIntensity() const
399  {
400  if (getCurrentLayer().type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
401  {
402  return getCurrentLayer().getPeakData()->getMinInt();
403  }
404  else if (getCurrentLayer().type == LayerData::DT_FEATURE)
405  {
406  return getCurrentLayer().getFeatureMap()->getMinInt();
407  }
408  else
409  {
410  return getCurrentLayer().getConsensusMap()->getMinInt();
411  }
412  }
413 
415  inline float getCurrentMaxIntensity() const
416  {
417  if (getCurrentLayer().type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
418  {
419  return getCurrentLayer().getPeakData()->getMaxInt();
420  }
421  else if (getCurrentLayer().type == LayerData::DT_FEATURE)
422  {
423  return getCurrentLayer().getFeatureMap()->getMaxInt();
424  }
425  else
426  {
427  return getCurrentLayer().getConsensusMap()->getMaxInt();
428  }
429  }
430 
432  inline float getMinIntensity(Size index) const
433  {
434  if (getLayer(index).type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
435  {
436  return getLayer(index).getPeakData()->getMinInt();
437  }
438  else if (getLayer(index).type == LayerData::DT_FEATURE)
439  {
440  return getLayer(index).getFeatureMap()->getMinInt();
441  }
442  else
443  {
444  return getLayer(index).getConsensusMap()->getMinInt();
445  }
446  }
447 
449  inline float getMaxIntensity(Size index) const
450  {
451  if (getLayer(index).type == LayerData::DT_PEAK || getCurrentLayer().type == LayerData::DT_CHROMATOGRAM)
452  {
453  return getLayer(index).getPeakData()->getMaxInt();
454  }
455  else if (getLayer(index).type == LayerData::DT_FEATURE)
456  {
457  return getLayer(index).getFeatureMap()->getMaxInt();
458  }
459  else
460  {
461  return getLayer(index).getConsensusMap()->getMaxInt();
462  }
463  }
464 
466  void setLayerName(Size i, const String & name);
467 
469  String getLayerName(Size i);
470 
472  inline void setCurrentLayerParameters(const Param & param)
473  {
474  getCurrentLayer_().param = param;
475  emit preferencesChange();
476  }
477 
483  const DRange<3> & getDataRange();
484 
490  double getSnapFactor();
491 
493  double getPercentageFactor();
494 
496  virtual void showCurrentLayerPreferences() = 0;
497 
504  virtual void showMetaData(bool modifiable = false, Int index = -1);
505 
511  virtual void saveCurrentLayer(bool visible) = 0;
512 
513 public slots:
514 
521  void changeVisibility(Size i, bool b);
522 
529  void changeLayerFilterState(Size i, bool b);
530 
537  void showGridLines(bool show);
538 
546  void resetZoom(bool repaint = true);
547 
554  void setVisibleArea(AreaType area);
555 
561  virtual void horizontalScrollBarChange(int value);
562 
568  virtual void verticalScrollBarChange(int value);
569 
571  void setAdditionalContextMenu(QMenu * menu);
572 
580  void getVisiblePeakData(ExperimentType & map) const;
581 
582 
590  void getVisibleFeatureData(FeatureMapType & map) const;
591 
599  void getVisibleConsensusData(ConsensusMapType & map) const;
600 
608  void getVisibleIdentifications(std::vector<PeptideIdentification> & peptides) const;
609 
611  virtual void updateLayer(Size i) = 0;
612 
613 signals:
614 
616  void layerModficationChange(Size layer, bool modified);
617 
619  void layerActivated(QWidget * w);
620 
622  void layerZoomChanged(QWidget * w);
623 
630  void visibleAreaChanged(DRange<2> area); //Do not change this to AreaType! QT needs the exact type...
631 
633  void sendCursorStatus(double mz = -1.0, double rt = -1.0);
634 
636  void sendStatusMessage(std::string message, OpenMS::UInt time);
637 
639  void recalculateAxes();
640 
642  void updateVScrollbar(float, float, float, float);
643 
645  void updateHScrollbar(float, float, float, float);
646 
648  void changeLegendVisibility();
649 
651  void actionModeChange();
652 
654  void preferencesChange();
655 
656 protected slots:
657 
659  void updateCursor_();
660 
661 protected:
662 
664  void drawText_(QPainter & painter, QStringList text);
665 
667  double getIdentificationMZ_(const Size layer_index,
668  const PeptideIdentification & peptide) const;
669 
671  virtual bool finishAdding_() = 0;
672 
674  inline LayerData & getLayer_(Size index)
675  {
676  OPENMS_PRECONDITION(index < layers_.size(), "SpectrumCanvas::getLayer_(index) index overflow");
677  return layers_[index];
678  }
679 
682  {
683  return getLayer_(current_layer_);
684  }
685 
687 
688  void resizeEvent(QResizeEvent * e) override;
689  void wheelEvent(QWheelEvent * e) override;
690  void keyPressEvent(QKeyEvent * e) override;
691  void keyReleaseEvent(QKeyEvent * e) override;
692  void focusOutEvent(QFocusEvent * e) override;
693  void leaveEvent(QEvent * e) override;
694  void enterEvent(QEvent * e) override;
696 
698  virtual void intensityModeChange_();
699 
710  virtual void changeVisibleArea_(const AreaType & new_area, bool repaint = true, bool add_to_stack = false);
711 
717  virtual void recalculateSnapFactor_();
718 
720 
721  virtual void zoom_(int x, int y, bool zoom_in);
724  void zoomBack_();
726  virtual void zoomForward_();
728  void zoomAdd_(const AreaType & area);
730  void zoomClear_();
732 
734 
735  virtual void translateLeft_(Qt::KeyboardModifiers m);
738  virtual void translateRight_(Qt::KeyboardModifiers m);
740  virtual void translateForward_();
742  virtual void translateBackward_();
744 
750  virtual void updateScrollbars_();
751 
761  inline PointType widgetToData_(double x, double y)
762  {
763  if (!isMzToXAxis())
764  {
765  return PointType(
766  visible_area_.minX() + (height() - y) / height() * visible_area_.width(),
767  visible_area_.minY() + x / width() * visible_area_.height()
768  );
769  }
770  else
771  {
772  return PointType(
773  visible_area_.minX() + x / width() * visible_area_.width(),
774  visible_area_.minY() + (height() - y) / height() * visible_area_.height()
775  );
776  }
777  }
778 
780  inline PointType widgetToData_(const QPoint & pos)
781  {
782  return widgetToData_(pos.x(), pos.y());
783  }
784 
793  inline void dataToWidget_(double x, double y, QPoint & point)
794  {
795  if (!isMzToXAxis())
796  {
797 
798 
799  if (intensity_mode_ != SpectrumCanvas::IM_LOG)
800  {
801  point.setX(int((y - visible_area_.minY()) / visible_area_.height() * width()));
802  }
803  else // IM_LOG
804  {
805  point.setX(int(
806  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * width())
807  );
808  }
809 
810  point.setY(height() - int((x - visible_area_.minX()) / visible_area_.width() * height()));
811  }
812  else
813  {
814  point.setX(int((x - visible_area_.minX()) / visible_area_.width() * width()));
815 
816  if (intensity_mode_ != SpectrumCanvas::IM_LOG)
817  {
818  point.setY(height() - int((y - visible_area_.minY()) / visible_area_.height() * height()));
819  }
820  else // IM_LOG
821  {
822  point.setY(height() - int(
823  std::log10((y - visible_area_.minY()) + 1) / std::log10(visible_area_.height() + 1) * height()
824  ));
825  }
826  }
827  }
828 
830  virtual void paintGridLines_(QPainter & painter);
831 
833  QImage buffer_;
834 
837 
840 
842  std::vector<LayerData> layers_;
843 
846 
854 
864  void recalculateRanges_(UInt mz_dim, UInt rt_dim, UInt it_dim);
865 
874 
877 
879  std::vector<AreaType> zoom_stack_;
881  std::vector<AreaType>::iterator zoom_pos_;
882 
892  virtual void update_(const char * caller_name);
893 
895  void modificationStatus_(Size layer_index, bool modified);
896 
899 
902 
904  void adjustBuffer_();
905 
908 
911 
918 
924  std::vector<double> snap_factors_;
925 
927  QRubberBand rubber_band_;
928 
930  QMenu * context_add_;
931 
934 
939 
942  {
943  std::set<DataProcessing::ProcessingAction> actions;
944  actions.insert(action);
945 
946  DataProcessingPtr p = boost::shared_ptr<DataProcessing>(new DataProcessing);
947  //actions
948  p->setProcessingActions(actions);
949  //software
950  p->getSoftware().setName("SpectrumCanvas");
951  //version
952  p->getSoftware().setVersion(VersionInfo::getVersion());
953  //time
954  p->setCompletionTime(DateTime::now());
955 
956  for (Size i = 0; i < map.size(); ++i)
957  {
958  map[i].getDataProcessing().push_back(p);
959  }
960  }
961 
962  };
963 }
964 
DefaultParamHandler.h
OpenMS::SpectrumCanvas::ConstExperimentSharedPtrType
LayerData::ConstExperimentSharedPtrType ConstExperimentSharedPtrType
Definition: SpectrumCanvas.h:114
OpenMS::SpectrumCanvas::visible_area_
AreaType visible_area_
Stores the currently visible area.
Definition: SpectrumCanvas.h:853
OpenMS::SpectrumCanvas::IM_PERCENTAGE
Shows intensities normalized by layer maximum: f(x)=x/max(x)*100.
Definition: SpectrumCanvas.h:152
OpenMS::SpectrumCanvas::getLayer_
LayerData & getLayer_(Size index)
Returns the layer with index index.
Definition: SpectrumCanvas.h:674
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:141
OpenMS::SpectrumCanvas::widgetToData_
PointType widgetToData_(const QPoint &pos)
Calls widgetToData_ with x and y position of pos.
Definition: SpectrumCanvas.h:780
VersionInfo.h
OpenMS::SpectrumCanvas::SpectrumType
ExperimentType::SpectrumType SpectrumType
Spectrum type.
Definition: SpectrumCanvas.h:126
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(Size layer, LayerData::Flags f) const
returns a layer flag of the layer layer
Definition: SpectrumCanvas.h:276
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:793
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:941
OpenMS::SpectrumCanvas::setLabel
void setLabel(LayerData::LabelType label)
Definition: SpectrumCanvas.h:295
OpenMS::SpectrumCanvas::AreaType
DRange< 2 > AreaType
Types of Ranges/Areas.
Definition: SpectrumCanvas.h:137
OpenMS::SpectrumCanvas::getCurrentLayer
LayerData & getCurrentLayer()
returns the layer data of the active layer
Definition: SpectrumCanvas.h:257
OpenMS::SpectrumCanvas::PointType
DPosition< 2 > PointType
Type of the Points.
Definition: SpectrumCanvas.h:135
OpenMS::SpectrumCanvas::IM_LOG
Logarithmic mode.
Definition: SpectrumCanvas.h:154
OpenMS::LayerData::ConstExperimentSharedPtrType
boost::shared_ptr< const ExperimentType > ConstExperimentSharedPtrType
Definition: LayerData.h:151
OpenMS::String
A more convenient string class.
Definition: String.h:58
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:312
OpenMS::SpectrumCanvas::layers_
std::vector< LayerData > layers_
Layer data.
Definition: SpectrumCanvas.h:842
OpenMS::SpectrumCanvas::ConsensusMapSharedPtrType
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: SpectrumCanvas.h:123
OpenMS::SpectrumCanvas::selected_peak_
PeakIndex selected_peak_
selected peak
Definition: SpectrumCanvas.h:936
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:845
OpenMS::SpectrumCanvas::IntensityModes
IntensityModes
Display modes of intensity.
Definition: SpectrumCanvas.h:149
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:879
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:91
OpenMS::SpectrumCanvas::getCurrentLayer
const LayerData & getCurrentLayer() const
returns the layer data of the active layer
Definition: SpectrumCanvas.h:244
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:761
OpenMS::SpectrumCanvas::ExperimentType
LayerData::ExperimentType ExperimentType
Main data type (experiment)
Definition: SpectrumCanvas.h:111
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:839
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:237
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:270
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:153
OpenMS::SpectrumCanvas::last_mouse_pos_
QPoint last_mouse_pos_
start position of mouse actions
Definition: SpectrumCanvas.h:910
OpenMS::SpectrumCanvas::update_buffer_
bool update_buffer_
Whether to recalculate the data in the buffer when repainting.
Definition: SpectrumCanvas.h:898
OpenMS::SpectrumCanvas::getCurrentMaxIntensity
float getCurrentMaxIntensity() const
Returns the maximum intensity of the active layer.
Definition: SpectrumCanvas.h:415
OpenMS::SpectrumCanvas::measurement_start_
PeakIndex measurement_start_
start peak of measuring mode
Definition: SpectrumCanvas.h:938
OpenMS::SpectrumCanvas::show_timing_
bool show_timing_
Flag that determines if timing data is printed to the command line.
Definition: SpectrumCanvas.h:933
OpenMS::SpectrumCanvas::zoom_pos_
std::vector< AreaType >::iterator zoom_pos_
The current position in the zoom stack.
Definition: SpectrumCanvas.h:881
OpenMS::SpectrumCanvas::ConsensusMapType
LayerData::ConsensusMapType ConsensusMapType
Main data type (consensus features)
Definition: SpectrumCanvas.h:121
OpenMS::SpectrumCanvas::getMinIntensity
float getMinIntensity(Size index) const
Returns the minimum intensity of the layer with index index.
Definition: SpectrumCanvas.h:432
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:833
OpenMS::SpectrumCanvas::setCurrentLayerParameters
void setCurrentLayerParameters(const Param &param)
Sets the parameters of the current layer.
Definition: SpectrumCanvas.h:472
OpenMS::SpectrumCanvas::setLayerFlag
void setLayerFlag(Size layer, LayerData::Flags f, bool value)
sets a layer flag of the layer layer
Definition: SpectrumCanvas.h:283
OpenMS::SpectrumCanvas::IM_NONE
Normal mode: f(x)=x.
Definition: SpectrumCanvas.h:151
OpenMS::SpectrumCanvas::FeatureMapSharedPtrType
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: SpectrumCanvas.h:119
OpenMS::SpectrumCanvas::getIntensityMode
IntensityModes getIntensityMode() const
Returns the intensity mode.
Definition: SpectrumCanvas.h:206
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
OpenMS::ConsensusMap
A container for consensus elements.
Definition: ConsensusMap.h:79
OpenMS::SpectrumCanvas::getSpectrumWidget
SpectrumWidget * getSpectrumWidget() const
Returns the spectrum widget.
Definition: SpectrumCanvas.h:183
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:323
OpenMS::SpectrumCanvas::snap_factors_
std::vector< double > snap_factors_
Intensity scaling factor for 'snap to maximum intensity mode'.
Definition: SpectrumCanvas.h:924
OpenMS::SpectrumCanvas::spectrum_widget_
SpectrumWidget * spectrum_widget_
Back-pointer to the enclosing spectrum widget.
Definition: SpectrumCanvas.h:907
OpenMS::SpectrumCanvas::getActionMode
Int getActionMode() const
Returns the action mode.
Definition: SpectrumCanvas.h:194
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:873
OpenMS::SpectrumCanvas::FeatureType
FeatureMapType::FeatureType FeatureType
Feature type.
Definition: SpectrumCanvas.h:132
OpenMS::SpectrumCanvas::getLayerFlag
bool getLayerFlag(LayerData::Flags f) const
returns a layer flag of the current layer
Definition: SpectrumCanvas.h:264
OpenMS::SpectrumCanvas::AM_TRANSLATE
translate
Definition: SpectrumCanvas.h:143
OpenMS::FeatureMap
A container for features.
Definition: FeatureMap.h:95
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:130
OpenMS::SpectrumCanvas::getCurrentMinIntensity
float getCurrentMinIntensity() const
Returns the minimum intensity of the active layer.
Definition: SpectrumCanvas.h:398
OpenMS::SpectrumCanvas::rubber_band_
QRubberBand rubber_band_
Rubber band for selected area.
Definition: SpectrumCanvas.h:927
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:251
OpenMS::SpectrumCanvas::setSpectrumWidget
void setSpectrumWidget(SpectrumWidget *widget)
Sets the spectrum widget.
Definition: SpectrumCanvas.h:172
OpenMS::SpectrumCanvas::gridLinesShown
bool gridLinesShown() const
Returns if the grid is currently shown.
Definition: SpectrumCanvas.h:231
OpenMS::SpectrumCanvas::context_add_
QMenu * context_add_
External context menu extension.
Definition: SpectrumCanvas.h:930
OpenMS::SpectrumCanvas::percentage_factor_
double percentage_factor_
Intensity scaling factor for relative scale with multiple layers.
Definition: SpectrumCanvas.h:917
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:836
OpenMS::SpectrumCanvas
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:100
LayerData.h
OpenMS::SpectrumCanvas::ODExperimentSharedPtrType
LayerData::ODExperimentSharedPtrType ODExperimentSharedPtrType
Definition: SpectrumCanvas.h:115
OpenMS::MSSpectrum::ConstIterator
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:104
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:117
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:681
OpenMS::SpectrumCanvas::current_layer_
Size current_layer_
Stores the index of the currently active layer.
Definition: SpectrumCanvas.h:901
OpenMS::SpectrumCanvas::setIntensityMode
void setIntensityMode(IntensityModes mod)
Sets the intensity mode.
Definition: SpectrumCanvas.h:220
OpenMS::SpectrumCanvas::show_grid_
bool show_grid_
Stores whether or not to show a grid.
Definition: SpectrumCanvas.h:876
OpenMS::SpectrumCanvas::ExperimentSharedPtrType
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: SpectrumCanvas.h:113
OpenMS::SpectrumCanvas::getMaxIntensity
float getMaxIntensity(Size index) const
Returns the maximum intensity of the layer with index index.
Definition: SpectrumCanvas.h:449
OpenMS::SpectrumCanvas::AM_ZOOM
zoom
Definition: SpectrumCanvas.h:144
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:128