Mercurial > hg > svgui
comparison layer/Colour3DPlotRenderer.cpp @ 1105:ea5ae9dd10ba spectrogram-minor-refactor
Convert ColourScaleType into an enum class
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2016 16:52:16 +0100 |
parents | d84a0033b305 |
children | 477521f95a84 |
comparison
equal
deleted
inserted
replaced
1104:46cc4644206d | 1105:ea5ae9dd10ba |
---|---|
261 | 261 |
262 binsPerPeak = m_sources.peaks->getColumnsPerPeak(); | 262 binsPerPeak = m_sources.peaks->getColumnsPerPeak(); |
263 usePeaksCache = (binResolution * binsPerPeak) < zoomLevel; | 263 usePeaksCache = (binResolution * binsPerPeak) < zoomLevel; |
264 | 264 |
265 if (m_params.colourScale.getScale() == | 265 if (m_params.colourScale.getScale() == |
266 ColourScale::PhaseColourScale) { | 266 ColourScaleType::Phase) { |
267 usePeaksCache = false; | 267 usePeaksCache = false; |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 cerr << "[PIX] zoomLevel = " << zoomLevel | 271 cerr << "[PIX] zoomLevel = " << zoomLevel |
532 | 532 |
533 ColumnOp::Column column = | 533 ColumnOp::Column column = |
534 vector<float>(fullColumn.data() + minbin, | 534 vector<float>(fullColumn.data() + minbin, |
535 fullColumn.data() + maxbin + 1); | 535 fullColumn.data() + maxbin + 1); |
536 | 536 |
537 //!!! fft scale if (m_colourScale != PhaseColourScale) { | 537 //!!! fft scale if (m_colourScale != ColourScaleType::Phase) { |
538 // column = ColumnOp::fftScale(column, m_fftSize); | 538 // column = ColumnOp::fftScale(column, m_fftSize); |
539 // } | 539 // } |
540 | 540 |
541 //!!! extents recordColumnExtents(column, | 541 //!!! extents recordColumnExtents(column, |
542 // sx, | 542 // sx, |
543 // overallMag, | 543 // overallMag, |
544 // overallMagChanged); | 544 // overallMagChanged); |
545 | 545 |
546 // if (m_colourScale != PhaseColourScale) { | 546 // if (m_colourScale != ColourScaleType::Phase) { |
547 column = ColumnOp::normalize(column, m_params.normalization); | 547 column = ColumnOp::normalize(column, m_params.normalization); |
548 // } | 548 // } |
549 | 549 |
550 if (m_params.binDisplay == BinDisplay::PeakBins) { | 550 if (m_params.binDisplay == BinDisplay::PeakBins) { |
551 column = ColumnOp::peakPick(column); | 551 column = ColumnOp::peakPick(column); |
668 | 668 |
669 ColumnOp::Column column = | 669 ColumnOp::Column column = |
670 vector<float>(fullColumn.data() + minbin, | 670 vector<float>(fullColumn.data() + minbin, |
671 fullColumn.data() + maxbin + 1); | 671 fullColumn.data() + maxbin + 1); |
672 | 672 |
673 //!!! fft scale if (m_colourScale != ColourScale::PhaseColourScale) { | 673 //!!! fft scale if (m_colourScale != ColourScaleType::Phase) { |
674 // column = ColumnOp::fftScale(column, getFFTSize()); | 674 // column = ColumnOp::fftScale(column, getFFTSize()); |
675 // } | 675 // } |
676 | 676 |
677 //!!! extents recordColumnExtents(column, | 677 //!!! extents recordColumnExtents(column, |
678 // sx, | 678 // sx, |
679 // overallMag, | 679 // overallMag, |
680 // overallMagChanged); | 680 // overallMagChanged); |
681 | 681 |
682 //!!! if (m_colourScale != ColourScale::PhaseColourScale) { | 682 //!!! if (m_colourScale != ColourScaleType::Phase) { |
683 column = ColumnOp::normalize(column, m_params.normalization); | 683 column = ColumnOp::normalize(column, m_params.normalization); |
684 //!!! } | 684 //!!! } |
685 | 685 |
686 preparedColumn = column; | 686 preparedColumn = column; |
687 //!!! gain? preparedColumn = ColumnOp::applyGain(column, m_params.gain); | 687 //!!! gain? preparedColumn = ColumnOp::applyGain(column, m_params.gain); |