Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
1251:67aee57e32c8 | 1252:2ff5e411151d |
---|---|
42 BasicMultirateCompression | 42 BasicMultirateCompression |
43 }; | 43 }; |
44 | 44 |
45 EditableDenseThreeDimensionalModel(sv_samplerate_t sampleRate, | 45 EditableDenseThreeDimensionalModel(sv_samplerate_t sampleRate, |
46 int resolution, | 46 int resolution, |
47 int yBinCount, | 47 int height, |
48 CompressionType compression, | 48 CompressionType compression, |
49 bool notifyOnAdd = true); | 49 bool notifyOnAdd = true); |
50 | 50 |
51 virtual bool isOK() const; | 51 virtual bool isOK() const; |
52 | 52 |
73 * Return the number of columns. | 73 * Return the number of columns. |
74 */ | 74 */ |
75 virtual int getWidth() const; | 75 virtual int getWidth() const; |
76 | 76 |
77 /** | 77 /** |
78 * Return the number of bins in each set of bins. | 78 * Return the number of bins in each column. |
79 */ | 79 */ |
80 virtual int getHeight() const; | 80 virtual int getHeight() const; |
81 | 81 |
82 /** | 82 /** |
83 * Set the number of bins in each set of bins. | 83 * Set the number of bins in each column. |
84 * | |
85 * You can set (via setColumn) a vector of any length as a column, | |
86 * but any column being retrieved will be resized to this height | |
87 * (or the height that was supplied to the constructor, if this is | |
88 * never called) on retrieval. That is, the model owner determines | |
89 * the height of the model at a single stroke; the columns | |
90 * themselves don't have any effect on the height of the model. | |
84 */ | 91 */ |
85 virtual void setHeight(int sz); | 92 virtual void setHeight(int sz); |
86 | 93 |
87 /** | 94 /** |
88 * Return the minimum value of the value in each bin. | 95 * Return the minimum value of the value in each bin. |
201 // value). If m_trunc[x] is 0 then the whole of column x is | 208 // value). If m_trunc[x] is 0 then the whole of column x is |
202 // stored. | 209 // stored. |
203 std::vector<signed char> m_trunc; | 210 std::vector<signed char> m_trunc; |
204 void truncateAndStore(int index, const Column & values); | 211 void truncateAndStore(int index, const Column & values); |
205 Column expandAndRetrieve(int index) const; | 212 Column expandAndRetrieve(int index) const; |
213 Column rightHeight(const Column &c) const; | |
206 | 214 |
207 std::vector<QString> m_binNames; | 215 std::vector<QString> m_binNames; |
208 std::vector<float> m_binValues; | 216 std::vector<float> m_binValues; |
209 QString m_binValueUnit; | 217 QString m_binValueUnit; |
210 | 218 |