OpenMS
Loading...
Searching...
No Matches
LayerDataChrom.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
13namespace OpenMS
14{
16 typedef std::shared_ptr<OSWData> OSWDataSharedPtrType;
17
23 class OPENMS_GUI_DLLAPI LayerDataChrom : public virtual LayerDataBase
24 {
25 public:
29 LayerDataChrom(const LayerDataChrom& ld) = default;
32
33 std::unique_ptr<Painter2DBase> getPainter2D() const override;
34
35 std::unique_ptr<LayerData1DBase> to1DLayer() const override;
36
37 std::unique_ptr<LayerStoreData> storeVisibleData(const RangeAllType& visible_range, const DataFilters& layer_filters) const override;
38
39 std::unique_ptr<LayerStoreData> storeFullData() const override;
40
41 ProjectionData getProjection(const DIM_UNIT unit_x, const DIM_UNIT unit_y, const RangeAllType& area) const override;
42
43 PeakIndex findHighestDataPoint(const RangeAllType& area) const override;
44
45 void updateRanges() override
46 {
47 chromatogram_map_->getMSExperiment().updateRanges();
48 }
49
50 RangeAllType getRange() const override
51 {
53 r.assign(chromatogram_map_->getMSExperiment().chromatogramRanges());
54 return r;
55 }
56
57 std::unique_ptr<LayerStatistics> getStats() const override;
58
59 PointXYType peakIndexToXY(const PeakIndex& peak, const DimMapper<2>& mapper) const override;
60
61 String getDataArrayDescription(const PeakIndex& peak_index) override;
62
64 {
65 return chromatogram_map_->getMSExperiment().getChromatogram(idx);
66 }
67
68
73 {
74 chromatogram_map_ = p;
75 }
76
79 {
80 return chromatogram_map_;
81 }
82
85 {
86 return chromatogram_map_;
87 }
88
91 {
92 on_disc_peaks_ = p;
93 }
94
97 {
98 return on_disc_peaks_;
99 }
100
102 {
103 return chrom_annotation_;
104 }
105
107 {
108 return chrom_annotation_;
109 }
110
113
114 protected:
117
120
123 };
124
125} //namespace
126
Class for storing MS run data with peptide and protein identifications.
Definition AnnotatedMSRun.h:38
DataFilter array providing some convenience functions.
Definition DataFilters.h:27
Allows dynamical switching (at runtime) between a dimension (RT, m/z, int, IM, etc) and X,...
Definition DimMapper.h:662
Class that stores the data for one layer.
Definition LayerDataBase.h:170
Class that stores the data for one layer of type Chromatogram.
Definition LayerDataChrom.h:24
std::unique_ptr< LayerStoreData > storeFullData() const override
Returns a visitor which contains the the full data of the layer and can write the data to disk in the...
const OSWDataSharedPtrType & getChromatogramAnnotation() const
Definition LayerDataChrom.h:106
const ExperimentType::ChromatogramType & getChromatogram(Size idx) const
Definition LayerDataChrom.h:63
void setOnDiscPeakData(ODExperimentSharedPtrType p)
Set the current on-disc data.
Definition LayerDataChrom.h:90
OSWDataSharedPtrType & getChromatogramAnnotation()
Definition LayerDataChrom.h:101
const ExperimentSharedPtrType & getChromatogramData() const
Returns a mutable reference to the current chromatogram data.
Definition LayerDataChrom.h:78
PeakIndex findHighestDataPoint(const RangeAllType &area) const override
Find the datapoint with the highest intensity within the given range and return a proxy to that datap...
void setChromatogramAnnotation(OSWData &&data)
add annotation from an OSW sqlite file.
LayerDataChrom(const LayerDataChrom &ld)=default
Copy-ctor.
ExperimentSharedPtrType & getChromatogramData()
Returns a mutable reference to the current chromatogram data.
Definition LayerDataChrom.h:84
PointXYType peakIndexToXY(const PeakIndex &peak, const DimMapper< 2 > &mapper) const override
Convert a PeakIndex to a XY coordinate (via mapper).
std::unique_ptr< LayerStatistics > getStats() const override
Compute layer statistics (via visitor)
ProjectionData getProjection(const DIM_UNIT unit_x, const DIM_UNIT unit_y, const RangeAllType &area) const override
RangeAllType getRange() const override
Definition LayerDataChrom.h:50
std::unique_ptr< LayerStoreData > storeVisibleData(const RangeAllType &visible_range, const DataFilters &layer_filters) const override
Returns a visitor which contains the current visible data and can write the data to disk.
const ODExperimentSharedPtrType & getOnDiscPeakData() const
Returns a mutable reference to the on-disc data.
Definition LayerDataChrom.h:96
std::unique_ptr< LayerData1DBase > to1DLayer() const override
Create a shallow copy (i.e. shared experimental data using shared_ptr) of the current layer,...
OSWDataSharedPtrType chrom_annotation_
Chromatogram annotation data.
Definition LayerDataChrom.h:122
LayerDataChrom & operator=(const LayerDataChrom &ld)=delete
no assignment operator (should not be needed)
void updateRanges() override
Update ranges of the underlying data.
Definition LayerDataChrom.h:45
std::unique_ptr< Painter2DBase > getPainter2D() const override
Obtain a painter which can draw the layer on a 2D canvas.
LayerDataChrom()
Default constructor.
String getDataArrayDescription(const PeakIndex &peak_index) override
Get name and value of all data-arrays corresponding to the given datapoint.
void setChromData(ExperimentSharedPtrType p)
Set the current in-memory chrom data.
Definition LayerDataChrom.h:72
The representation of a chromatogram.
Definition MSChromatogram.h:30
Holds all or partial information from an OSW file.
Definition OSWData.h:279
Representation of a mass spectrometry experiment on disk.
Definition OnDiscMSExperiment.h:71
auto & assign(const RangeManager< RangeBasesOther... > &rhs)
Definition RangeManager.h:615
A more convenient string class.
Definition String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::shared_ptr< OSWData > OSWDataSharedPtrType
SharedPtr on OSWData.
Definition LayerDataChrom.h:16
DIM_UNIT
Definition CommonEnums.h:20
Result of computing a projection on X and Y axis in a 2D Canvas; see LayerDataBase::getProjection()
Definition LayerDataBase.h:52
std::shared_ptr< ExperimentType > ExperimentSharedPtrType
SharedPtr on MSExperiment.
Definition LayerDataBase.h:127
std::shared_ptr< OSWData > OSWDataSharedPtrType
SharedPtr on OSWData.
Definition LayerDataBase.h:135
std::shared_ptr< OnDiscMSExperiment > ODExperimentSharedPtrType
SharedPtr on On-Disc MSExperiment.
Definition LayerDataBase.h:132
Index of a peak or feature.
Definition PeakIndex.h:25