comparison layer/Colour3DPlotRenderer.cpp @ 1595:8b78b3c330fb

Use our base column type
author Chris Cannam
date Thu, 09 Apr 2020 11:23:40 +0100
parents e95cefd4aa81
children
comparison
equal deleted inserted replaced
1594:5aef3f53a425 1595:8b78b3c330fb
456 456
457 if (fullColumn.empty()) { 457 if (fullColumn.empty()) {
458 fullColumn = source->getColumn(sx); 458 fullColumn = source->getColumn(sx);
459 } 459 }
460 460
461 column = vector<float>(fullColumn.data() + minbin, 461 column = ColumnOp::Column(fullColumn.data() + minbin,
462 fullColumn.data() + minbin + nbins); 462 fullColumn.data() + minbin + nbins);
463 return column; 463 return column;
464 } 464 }
465 465
466 MagnitudeRange 466 MagnitudeRange
467 Colour3DPlotRenderer::renderDirectTranslucent(const LayerGeometryProvider *v, 467 Colour3DPlotRenderer::renderDirectTranslucent(const LayerGeometryProvider *v,
509 int nbins = m_sources.verticalBinLayer->getIBinForY(v, 0) - minbin + 1; 509 int nbins = m_sources.verticalBinLayer->getIBinForY(v, 0) - minbin + 1;
510 if (minbin + nbins > sh) nbins = sh - minbin; 510 if (minbin + nbins > sh) nbins = sh - minbin;
511 511
512 int psx = -1; 512 int psx = -1;
513 513
514 vector<float> preparedColumn; 514 ColumnOp::Column preparedColumn;
515 515
516 int modelWidth = model->getWidth(); 516 int modelWidth = model->getWidth();
517 517
518 for (int sx = sx0; sx <= sx1; ++sx) { 518 for (int sx = sx0; sx <= sx1; ++sx) {
519 519
1083 step = -1; 1083 step = -1;
1084 } 1084 }
1085 1085
1086 int xPixelCount = 0; 1086 int xPixelCount = 0;
1087 1087
1088 vector<float> preparedColumn; 1088 ColumnOp::Column preparedColumn;
1089 1089
1090 int modelWidth = sourceModel->getWidth(); 1090 int modelWidth = sourceModel->getWidth();
1091 1091
1092 #ifdef DEBUG_COLOUR_PLOT_REPAINT 1092 #ifdef DEBUG_COLOUR_PLOT_REPAINT
1093 SVDEBUG << "render " << m_sources.source 1093 SVDEBUG << "render " << m_sources.source
1114 1114
1115 #ifdef DEBUG_COLOUR_PLOT_REPAINT 1115 #ifdef DEBUG_COLOUR_PLOT_REPAINT
1116 // SVDEBUG << "x = " << x << ", binforx[x] = " << binforx[x] << ", sx range " << sx0 << " -> " << sx1 << endl; 1116 // SVDEBUG << "x = " << x << ", binforx[x] = " << binforx[x] << ", sx range " << sx0 << " -> " << sx1 << endl;
1117 #endif 1117 #endif
1118 1118
1119 vector<float> pixelPeakColumn; 1119 ColumnOp::Column pixelPeakColumn;
1120 MagnitudeRange magRange; 1120 MagnitudeRange magRange;
1121 1121
1122 for (int sx = sx0; sx < sx1; ++sx) { 1122 for (int sx = sx0; sx < sx1; ++sx) {
1123 1123
1124 if (sx < 0 || sx >= modelWidth) { 1124 if (sx < 0 || sx >= modelWidth) {
1249 step = -1; 1249 step = -1;
1250 } 1250 }
1251 1251
1252 int xPixelCount = 0; 1252 int xPixelCount = 0;
1253 1253
1254 vector<float> preparedColumn; 1254 ColumnOp::Column preparedColumn;
1255 1255
1256 int modelWidth = fft->getWidth(); 1256 int modelWidth = fft->getWidth();
1257 #ifdef DEBUG_COLOUR_PLOT_REPAINT 1257 #ifdef DEBUG_COLOUR_PLOT_REPAINT
1258 SVDEBUG << "render " << m_sources.source 1258 SVDEBUG << "render " << m_sources.source
1259 << ": modelWidth " << modelWidth << endl; 1259 << ": modelWidth " << modelWidth << endl;
1286 if (x+1 < w) sx1 = binforx[x+1]; 1286 if (x+1 < w) sx1 = binforx[x+1];
1287 if (sx0 < 0) sx0 = sx1 - 1; 1287 if (sx0 < 0) sx0 = sx1 - 1;
1288 if (sx0 < 0) continue; 1288 if (sx0 < 0) continue;
1289 if (sx1 <= sx0) sx1 = sx0 + 1; 1289 if (sx1 <= sx0) sx1 = sx0 + 1;
1290 1290
1291 vector<float> pixelPeakColumn; 1291 ColumnOp::Column pixelPeakColumn;
1292 MagnitudeRange magRange; 1292 MagnitudeRange magRange;
1293 1293
1294 for (int sx = sx0; sx < sx1; ++sx) { 1294 for (int sx = sx0; sx < sx1; ++sx) {
1295 1295
1296 if (sx < 0 || sx >= modelWidth) { 1296 if (sx < 0 || sx >= modelWidth) {