diff layer/Colour3DPlotLayer.cpp @ 468:762e96217900

* make compression optional in editable dense 3d model, and some tweaks
author Chris Cannam
date Fri, 23 Jan 2009 14:00:29 +0000
parents 76a47146f1f6
children 9863f9a36cc2
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Thu Jan 22 17:58:33 2009 +0000
+++ b/layer/Colour3DPlotLayer.cpp	Fri Jan 23 14:00:29 2009 +0000
@@ -676,6 +676,7 @@
 Colour3DPlotLayer::getColumn(size_t col) const
 {
     DenseThreeDimensionalModel::Column values = m_model->getColumn(col);
+    while (values.size() < m_model->getHeight()) values.push_back(0.f);
     if (!m_normalizeColumns) return values;
 
     float colMax = 0.f, colMin = 0.f;
@@ -697,7 +698,9 @@
         float newvalue = min + (max - min) * norm;
 
         if (value != newvalue) values[y] = newvalue;
-    }    
+    }
+
+    return values;
 }
     
 void