Mercurial > hg > svcore
diff data/model/EditableDenseThreeDimensionalModel.h @ 1252:2ff5e411151d 3.0-integration
Ensure columns all have correct height when retrieved (to avoid e.g. empty columns because a feature extractor's start time was >0)
author | Chris Cannam |
---|---|
date | Fri, 04 Nov 2016 16:01:37 +0000 |
parents | 546d4e417346 |
children | 48e9f538e6e9 |
line wrap: on
line diff
--- a/data/model/EditableDenseThreeDimensionalModel.h Fri Nov 04 14:57:03 2016 +0000 +++ b/data/model/EditableDenseThreeDimensionalModel.h Fri Nov 04 16:01:37 2016 +0000 @@ -44,7 +44,7 @@ EditableDenseThreeDimensionalModel(sv_samplerate_t sampleRate, int resolution, - int yBinCount, + int height, CompressionType compression, bool notifyOnAdd = true); @@ -75,12 +75,19 @@ virtual int getWidth() const; /** - * Return the number of bins in each set of bins. + * Return the number of bins in each column. */ virtual int getHeight() const; /** - * Set the number of bins in each set of bins. + * Set the number of bins in each column. + * + * You can set (via setColumn) a vector of any length as a column, + * but any column being retrieved will be resized to this height + * (or the height that was supplied to the constructor, if this is + * never called) on retrieval. That is, the model owner determines + * the height of the model at a single stroke; the columns + * themselves don't have any effect on the height of the model. */ virtual void setHeight(int sz); @@ -203,6 +210,7 @@ std::vector<signed char> m_trunc; void truncateAndStore(int index, const Column & values); Column expandAndRetrieve(int index) const; + Column rightHeight(const Column &c) const; std::vector<QString> m_binNames; std::vector<float> m_binValues;