# HG changeset patch # User Chris Cannam # Date 1447848513 0 # Node ID 7242fe160c19015cf79440223b2f998236ea205f # Parent 2937929ea6dcb27d8c5ad6e3d1636f12f30c002f# Parent 08f20a23fb81a96c17675e13bcad8de4a33f88d3 Merge from default branch diff -r 2937929ea6dc -r 7242fe160c19 layer/Colour3DPlotLayer.cpp --- 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; diff -r 2937929ea6dc -r 7242fe160c19 layer/Colour3DPlotLayer.h --- a/layer/Colour3DPlotLayer.h Tue Oct 20 09:14:24 2015 +0100 +++ b/layer/Colour3DPlotLayer.h Wed Nov 18 12:08:33 2015 +0000 @@ -139,9 +139,6 @@ void setInvertVertical(bool i); bool getInvertVertical() const; - void setShowRectified(bool); - bool getShowRectified() const { return m_rectified; } - void setOpaque(bool i); bool getOpaque() const; @@ -190,7 +187,6 @@ bool m_normalizeVisibleArea; bool m_normalizeHybrid; bool m_invertVertical; - bool m_rectified; bool m_opaque; bool m_smooth; int m_peakResolution;