Mercurial > hg > svgui
comparison layer/ColourScale.cpp @ 1374:631897ba9fca zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 06 Nov 2018 08:59:03 +0000 |
parents | d79e21855aef |
children |
comparison
equal
deleted
inserted
replaced
1360:e848ea0850fe | 1374:631897ba9fca |
---|---|
25 | 25 |
26 int ColourScale::m_maxPixel = 255; | 26 int ColourScale::m_maxPixel = 255; |
27 | 27 |
28 ColourScale::ColourScale(Parameters parameters) : | 28 ColourScale::ColourScale(Parameters parameters) : |
29 m_params(parameters), | 29 m_params(parameters), |
30 m_mapper(m_params.colourMap, 1.f, double(m_maxPixel)) | 30 m_mapper(m_params.colourMap, m_params.inverted, 1.f, double(m_maxPixel)) |
31 { | 31 { |
32 if (m_params.minValue >= m_params.maxValue) { | 32 if (m_params.minValue >= m_params.maxValue) { |
33 SVCERR << "ERROR: ColourScale::ColourScale: minValue = " | 33 SVCERR << "ERROR: ColourScale::ColourScale: minValue = " |
34 << m_params.minValue << ", maxValue = " << m_params.maxValue << endl; | 34 << m_params.minValue << ", maxValue = " << m_params.maxValue << endl; |
35 throw std::logic_error("maxValue must be greater than minValue"); | 35 throw std::logic_error("maxValue must be greater than minValue"); |