CFEL - ASG Software Suite  2.5.0
CASS
logcolor_map.h
Go to the documentation of this file.
1 // Copyright (C) 2014 Lutz Foucar
2 
3 /**
4  * @file logcolor_map.h contains a logarithmic color map.
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _LOGCOLORMAP_
10 #define _LOGCOLORMAP_
11 
12 #include <qwt_color_map.h>
13 
14 namespace jocassview
15 {
16 /** a logarithmic color map
17  *
18  * based upon code found here
19  * https://stackoverflow.com/questions/7745506/qwtplotspectrogram-using-a-logarithmic-color-scale
20  *
21  */
22 class LogColorMap : public QwtLinearColorMap
23 {
24 public:
25  /** constructor
26  *
27  * @param from the first color stop
28  * @param to the last color stop
29  */
30  LogColorMap(const QColor &from, const QColor &to);
31 
32  /** return the rgb value for a given value
33  *
34  * @return the rgb value
35  * @param interval
36  * @param value
37  */
38  QRgb rgb(const QwtInterval &interval, double value) const;
39 };
40 
41 }//end namespace jocassview
42 #endif
LogColorMap(const QColor &from, const QColor &to)
constructor
QRgb rgb(const QwtInterval &interval, double value) const
return the rgb value for a given value
a logarithmic color map
Definition: logcolor_map.h:22
check if there is some light in the chamber based upon the GMD value