comparison layer/Colour3DPlotLayer.cpp @ 26:94381052a6c9

* Add natty segmentation display to time-value layer. Need to do the same for time-instants layer. * Make sure dense 3D model bin names are saved and restored properly. * Fix to chromagram normalization
author Chris Cannam
date Thu, 02 Feb 2006 17:31:08 +0000
parents dcdb21b62dbb
children 202d1dca67d2
comparison
equal deleted inserted replaced
25:dcdb21b62dbb 26:94381052a6c9
226 for (int value = 0; value < 256; ++value) { 226 for (int value = 0; value < 256; ++value) {
227 // int spread = ((value - min) * 256) / (max - min); 227 // int spread = ((value - min) * 256) / (max - min);
228 // int hue = 256 - spread; 228 // int hue = 256 - spread;
229 // QColor color = QColor::fromHsv(hue, spread/2 + 128, spread); 229 // QColor color = QColor::fromHsv(hue, spread/2 + 128, spread);
230 int hue = 256 - value; 230 int hue = 256 - value;
231 QColor color = QColor::fromHsv(hue, value/2 + 128, value); 231 QColor colour = QColor::fromHsv(hue, value/2 + 128, value);
232 m_cache->setColor(value, qRgba(color.red(), color.green(), color.blue(), 80)); 232 m_cache->setColor(value, qRgba(colour.red(), colour.green(), colour.blue(), 80));
233 // std::cerr << "Colour3DPlotLayer: Index " << value << ": hue " << hue << std::endl; 233 // std::cerr << "Colour3DPlotLayer: Index " << value << ": hue " << hue << std::endl;
234 } 234 }
235 235
236 m_cache->fill(min); 236 m_cache->fill(min);
237 237