CFEL - ASG Software Suite  2.5.0
CASS
logcolor_map.cpp
Go to the documentation of this file.
1 // Copyright (C) 2014 Lutz Foucar
2 
3 /**
4  * @file logcolor_map.cpp contains a logarithmic color map.
5  *
6  * @author Lutz Foucar
7  */
8 
9 #include <cmath>
10 
11 #include <QtCore/QDebug>
12 
13 #include <QtGui/QColor>
14 #include <QtGui/QRgb>
15 
16 #include "logcolor_map.h"
17 
18 using namespace jocassview;
19 
20 
21 LogColorMap::LogColorMap(const QColor &from, const QColor &to)
22  : QwtLinearColorMap(from, to)
23 {
24 
25 }
26 
27 QRgb LogColorMap::rgb(const QwtInterval &interval, double value) const
28 {
29  return QwtLinearColorMap::rgb(QwtInterval(std::log10(interval.minValue()),
30  std::log10(interval.maxValue())),
31  std::log10(value));
32 }
LogColorMap(const QColor &from, const QColor &to)
constructor
QRgb rgb(const QwtInterval &interval, double value) const
return the rgb value for a given value
contains a logarithmic color map.
check if there is some light in the chamber based upon the GMD value