comparison layer/Colour3DPlotRenderer.cpp @ 1115:ee8e73dc5c8b spectrogram-minor-refactor

Re-enable a couple more features
author Chris Cannam
date Tue, 19 Jul 2016 15:02:44 +0100
parents 261a00010918
children e7a07cd63d21
comparison
equal deleted inserted replaced
1114:a42e5a3c63ef 1115:ee8e73dc5c8b
263 void 263 void
264 Colour3DPlotRenderer::renderDirectTranslucent(const LayerGeometryProvider *v, 264 Colour3DPlotRenderer::renderDirectTranslucent(const LayerGeometryProvider *v,
265 QPainter &paint, 265 QPainter &paint,
266 QRect rect) 266 QRect rect)
267 { 267 {
268 //!!! QPoint illuminatePos; 268 QPoint illuminatePos;
269 // bool illuminate = v->shouldIlluminateLocalFeatures 269 bool illuminate = v->shouldIlluminateLocalFeatures
270 // (m_sources.verticalBinLayer, illuminatePos); 270 (m_sources.verticalBinLayer, illuminatePos);
271 271
272 const DenseThreeDimensionalModel *model = m_sources.source; 272 const DenseThreeDimensionalModel *model = m_sources.source;
273 273
274 int x0 = rect.left(); 274 int x0 = rect.left();
275 int x1 = rect.right() + 1; 275 int x1 = rect.right() + 1;
292 int sh = model->getHeight(); 292 int sh = model->getHeight();
293 293
294 const int buflen = 40; 294 const int buflen = 40;
295 char labelbuf[buflen]; 295 char labelbuf[buflen];
296 296
297 int minbin = 0; 297 int minbin = 0; //!!!
298 int maxbin = sh - 1; //!!! 298 int maxbin = sh - 1; //!!!
299 299
300 int psx = -1; 300 int psx = -1;
301 301
302 vector<float> preparedColumn; 302 vector<float> preparedColumn;
335 // sx, 335 // sx,
336 // overallMag, 336 // overallMag,
337 // overallMagChanged); 337 // overallMagChanged);
338 338
339 // if (m_colourScale != ColourScaleType::Phase) { 339 // if (m_colourScale != ColourScaleType::Phase) {
340 column = ColumnOp::normalize(column, m_params.normalization); 340 preparedColumn = ColumnOp::normalize(column, m_params.normalization);
341 // } 341 // }
342 342
343 if (m_params.binDisplay == BinDisplay::PeakBins) { 343 if (m_params.binDisplay == BinDisplay::PeakBins) {
344 column = ColumnOp::peakPick(column); 344 preparedColumn = ColumnOp::peakPick(preparedColumn);
345 } 345 }
346 346
347 preparedColumn = column; //!!! unnecessary dup
348
349 psx = sx; 347 psx = sx;
350 } 348 }
351 349
352 sv_frame_t fx = sx * modelResolution + modelStart; 350 sv_frame_t fx = sx * modelResolution + modelStart;
353 351
388 } 386 }
389 387
390 paint.setPen(Qt::NoPen); 388 paint.setPen(Qt::NoPen);
391 paint.setBrush(brush); 389 paint.setBrush(brush);
392 390
393 //!!! if (illuminate) { 391 if (illuminate) {
394 // if (r.contains(illuminatePos)) { 392 if (r.contains(illuminatePos)) {
395 // paint.setPen(v->getForeground()); 393 paint.setPen(v->getForeground());
396 // } 394 }
397 // } 395 }
398 396
399 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 397 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
400 // cerr << "rect " << r.x() << "," << r.y() << " " 398 // cerr << "rect " << r.x() << "," << r.y() << " "
401 // << r.width() << "x" << r.height() << endl; 399 // << r.width() << "x" << r.height() << endl;
402 #endif 400 #endif