Mercurial > hg > svgui
diff layer/Colour3DPlotLayer.cpp @ 1011:7242fe160c19 3.0-integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 18 Nov 2015 12:08:33 +0000 |
parents | bc23c2cfff65 08f20a23fb81 |
children | 072f0db59081 |
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp Tue Oct 20 09:14:24 2015 +0100 +++ b/layer/Colour3DPlotLayer.cpp Wed Nov 18 12:08:33 2015 +0000 @@ -54,7 +54,6 @@ m_normalizeVisibleArea(false), m_normalizeHybrid(false), m_invertVertical(false), - m_rectified(false), m_opaque(false), m_smooth(false), m_peakResolution(256), @@ -163,7 +162,6 @@ list.push_back("Gain"); list.push_back("Bin Scale"); list.push_back("Invert Vertical Scale"); - list.push_back("Show Rectified"); list.push_back("Opaque"); list.push_back("Smooth"); return list; @@ -177,7 +175,6 @@ if (name == "Normalize Columns") return tr("Normalize Columns"); if (name == "Normalize Visible Area") return tr("Normalize Visible Area"); if (name == "Invert Vertical Scale") return tr("Invert Vertical Scale"); - if (name == "Show Rectified") return tr("Half-Wave Rectify"); if (name == "Gain") return tr("Gain"); if (name == "Opaque") return tr("Always Opaque"); if (name == "Smooth") return tr("Smooth"); @@ -191,7 +188,6 @@ if (name == "Normalize Columns") return "normalise-columns"; if (name == "Normalize Visible Area") return "normalise"; if (name == "Invert Vertical Scale") return "invert-vertical"; - if (name == "Show Rectified") return "derivative"; if (name == "Opaque") return "opaque"; if (name == "Smooth") return "smooth"; return ""; @@ -204,7 +200,6 @@ if (name == "Normalize Columns") return ToggleProperty; if (name == "Normalize Visible Area") return ToggleProperty; if (name == "Invert Vertical Scale") return ToggleProperty; - if (name == "Show Rectified") return ToggleProperty; if (name == "Opaque") return ToggleProperty; if (name == "Smooth") return ToggleProperty; return ValueProperty; @@ -216,7 +211,6 @@ if (name == "Normalize Columns" || name == "Normalize Visible Area" || name == "Colour Scale" || - name == "Show Rectified" || name == "Gain") return tr("Scale"); if (name == "Bin Scale" || name == "Invert Vertical Scale") return tr("Bins"); @@ -281,13 +275,6 @@ *deflt = 0; val = (m_invertVertical ? 1 : 0); - } else if (name == "Show Rectified") { - - if (min) *min = 0; - if (max) *max = 0; - if (deflt) *deflt = 0; - val = (m_rectified ? 1.0 : 0.0); - } else if (name == "Bin Scale") { *min = 0; @@ -368,8 +355,6 @@ setNormalizeVisibleArea(value ? true : false); } else if (name == "Invert Vertical Scale") { setInvertVertical(value ? true : false); - } else if (name == "Show Rectified") { - setShowRectified(value > 0.5); } else if (name == "Opaque") { setOpaque(value ? true : false); } else if (name == "Smooth") { @@ -487,15 +472,6 @@ } void -Colour3DPlotLayer::setShowRectified(bool show) -{ - if (m_rectified == show) return; - m_rectified = show; - cacheInvalid(); - emit layerParametersChanged(); -} - -void Colour3DPlotLayer::setOpaque(bool n) { if (m_opaque == n) return; @@ -957,20 +933,7 @@ { Profiler profiler("Colour3DPlotLayer::getColumn"); - DenseThreeDimensionalModel::Column prev; - if (m_rectified && (col > m_model->getStartFrame())) { - prev = m_model->getColumn(col - 1); - } - DenseThreeDimensionalModel::Column values = m_model->getColumn(col); - - if (m_rectified && !prev.empty()) { - for (int y = 0; y < values.size(); ++y) { - if (values[y] < prev[y]) values[y] = 0; - else values[y] -= prev[y]; - } - } - while (values.size() < m_model->getHeight()) values.push_back(0.f); if (!m_normalizeColumns && !m_normalizeHybrid) return values;