35 #ifndef OPENMS_VISUAL_SPECTRUM2DCANVAS_H 36 #define OPENMS_VISUAL_SPECTRUM2DCANVAS_H 39 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 82 virtual void showCurrentLayerPreferences();
85 virtual void saveCurrentLayer(
bool visible);
94 void mergeIntoLayer(
Size i, std::vector<PeptideIdentification>& peptides);
97 void recalculateCurrentLayerDotGradient();
105 void showProjectionInfo(
int,
double,
double);
107 void toggleProjections();
109 void showSpectrumAs1D(
int index);
110 void showSpectrumAs1D(std::vector<
int, std::allocator<int> > indices);
112 void showCurrentPeaksAs3D();
116 void activateLayer(
Size layer_index);
118 void removeLayer(
Size layer_index);
120 virtual void updateLayer(
Size i);
122 virtual void horizontalScrollBarChange(
int value);
124 virtual void verticalScrollBarChange(
int value);
135 void updateProjections();
140 void currentLayerParametersChanged_();
144 bool finishAdding_();
147 void drawCoordinates_(QPainter& painter,
const PeakIndex& peak);
153 void mousePressEvent(QMouseEvent* e);
154 void mouseReleaseEvent(QMouseEvent* e);
155 void mouseMoveEvent(QMouseEvent* e);
156 void paintEvent(QPaintEvent* e);
157 void contextMenuEvent(QContextMenuEvent* e);
158 void keyPressEvent(QKeyEvent* e);
159 void keyReleaseEvent(QKeyEvent* e);
160 void mouseDoubleClickEvent(QMouseEvent* e);
164 virtual void updateScrollbars_();
174 void paintDots_(
Size layer_index, QPainter& p);
176 void paintAllIntensities_(
Size layer_index,
double pen_width, QPainter& painter);
189 void paintMaximumIntensities_(
Size layer_index,
Size rt_pixel_count,
Size mz_pixel_count, QPainter& p);
197 void paintPrecursorPeaks_(
Size layer_index, QPainter& painter);
205 void paintFeatureData_(
Size layer_index, QPainter& p);
213 void paintTraceConvexHulls_(
Size layer_index, QPainter& p);
221 void paintFeatureConvexHulls_(
Size layer_index, QPainter& p);
229 void paintIdentifications_(
Size layer_index, QPainter& p);
237 void paintConsensusElements_(
Size layer_index, QPainter& p);
247 void paintConsensusElement_(
Size layer_index,
const ConsensusFeature& cf, QPainter& p,
bool use_buffer);
263 void paintConvexHulls_(
const std::vector<ConvexHull2D>& hulls,
bool hasIdentifications, QPainter& p);
266 virtual void intensityModeChange_();
268 virtual void recalculateSnapFactor_();
278 switch (intensity_mode_)
285 gradientPos = val * percentage_factor_;
289 gradientPos = val * snap_factor;
293 gradientPos = std::log(val + 1);
324 point.setX(
int((y - visible_area_.minY()) / visible_area_.height() * width()));
325 point.setY(height() -
int((x - visible_area_.minX()) / visible_area_.width() * height()));
329 point.setX(
int((x - visible_area_.minX()) / visible_area_.width() * width()));
330 point.setY(height() -
int((y - visible_area_.minY()) / visible_area_.height() * height()));
345 double adaptPenScaling_(
double ratio_data2pixel,
double& pen_size)
const;
348 void recalculateDotGradient_(
Size layer);
351 void highlightPeak_(QPainter& p,
const PeakIndex& peak);
354 PeakIndex findNearestPeak_(
const QPoint& pos);
357 void paintIcon_(
const QPoint& pos,
const QRgb& color,
const String& icon,
Size s, QPainter& p)
const;
360 virtual void translateVisibleArea_(
double mzShiftRel,
double rtShiftRel);
363 virtual void translateLeft_();
365 virtual void translateRight_();
367 virtual void translateForward_();
369 virtual void translateBackward_();
372 void finishContextMenu_(QMenu* context_menu, QMenu* settings_menu);
LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
Main managed data type (experiment)
Definition: SpectrumCanvas.h:109
A more convenient string class.
Definition: String.h:57
PeakIndex measurement_start_
start peak/feature of measuring mode
Definition: Spectrum2DCanvas.h:382
LayerData::ConsensusMapSharedPtrType ConsensusMapSharedPtrType
Main managed data type (consensus features)
Definition: SpectrumCanvas.h:117
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:96
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Canvas for 2D-visualization of peak map, feature map and consensus map data.
Definition: Spectrum2DCanvas.h:69
QColor heightColor_(float val, const MultiGradient &gradient, double snap_factor)
Returns the color associated with val for the gradient gradient.
Definition: Spectrum2DCanvas.h:307
void dataToWidget_(double x, double y, QPoint &point)
Convert chart to widget coordinates.
Definition: Spectrum2DCanvas.h:320
double pen_size_min_
Definition: Spectrum2DCanvas.h:384
Int precalculatedColorIndex_(float val, const MultiGradient &gradient, double snap_factor)
Returns the position on color gradient associated with given intensity.
Definition: Spectrum2DCanvas.h:275
double canvas_coverage_min_
Definition: Spectrum2DCanvas.h:386
Management and storage of parameters / INI files.
Definition: Param.h:75
ExperimentType projection_rt_
RT projection data.
Definition: Spectrum2DCanvas.h:377
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:69
LayerData::FeatureMapSharedPtrType FeatureMapSharedPtrType
Main managed data type (features)
Definition: SpectrumCanvas.h:113
ExperimentType projection_mz_
m/z projection data
Definition: Spectrum2DCanvas.h:375
QColor precalculatedColorByIndex(Int index) const
precalculated color by its index in the table
Definition: MultiGradient.h:148
PeakIndex selected_peak_
the nearest peak/feature to the mouse cursor
Definition: Spectrum2DCanvas.h:380
A gradient of multiple colors and arbitrary distances between colors.
Definition: MultiGradient.h:68
int Int
Signed integer type.
Definition: Types.h:96
Int precalculatedColorIndex(double position) const
index of color in precalculated table by position in gradient
Definition: MultiGradient.h:137
Not implemented exception.
Definition: Exception.h:437
A 2-dimensional consensus feature.
Definition: ConsensusFeature.h:65
Index of a peak or feature.
Definition: PeakIndex.h:51
double pen_size_max_
Definition: Spectrum2DCanvas.h:385