Mercurial > hg > svgui
comparison layer/SpectrogramLayer.h @ 1063:a0f234acd6e7 spectrogram-minor-refactor
Pull out column ops into ColumnOp
author | Chris Cannam |
---|---|
date | Mon, 20 Jun 2016 11:30:15 +0100 |
parents | 5eb4d79334b9 |
children | cb4c9fb37ddc |
comparison
equal
deleted
inserted
replaced
1062:38ecdd5924ac | 1063:a0f234acd6e7 |
---|---|
174 * Specify the processing of frequency bins for the y axis. | 174 * Specify the processing of frequency bins for the y axis. |
175 */ | 175 */ |
176 void setBinDisplay(BinDisplay); | 176 void setBinDisplay(BinDisplay); |
177 BinDisplay getBinDisplay() const; | 177 BinDisplay getBinDisplay() const; |
178 | 178 |
179 enum Normalization { | |
180 NoNormalization, | |
181 NormalizeColumns, | |
182 NormalizeVisibleArea, | |
183 NormalizeHybrid | |
184 }; | |
185 | |
186 /** | 179 /** |
187 * Specify the normalization mode for bin values. | 180 * Specify the normalization mode for bin values. |
188 */ | 181 */ |
189 void setNormalization(Normalization); | 182 void setNormalization(ColumnOp::Normalization); |
190 Normalization getNormalization() const; | 183 ColumnOp::Normalization getNormalization() const; |
191 | 184 |
192 /** | 185 /** |
193 * Specify the colour map. See ColourMapper for the colour map | 186 * Specify the colour map. See ColourMapper for the colour map |
194 * values. | 187 * values. |
195 */ | 188 */ |
270 ColourScale m_colourScale; | 263 ColourScale m_colourScale; |
271 int m_colourMap; | 264 int m_colourMap; |
272 QColor m_crosshairColour; | 265 QColor m_crosshairColour; |
273 FrequencyScale m_frequencyScale; | 266 FrequencyScale m_frequencyScale; |
274 BinDisplay m_binDisplay; | 267 BinDisplay m_binDisplay; |
275 Normalization m_normalization; | 268 ColumnOp::Normalization m_normalization; |
276 int m_lastEmittedZoomStep; | 269 int m_lastEmittedZoomStep; |
277 bool m_synchronous; | 270 bool m_synchronous; |
278 | 271 |
279 mutable bool m_haveDetailedScale; | 272 mutable bool m_haveDetailedScale; |
280 | 273 |
395 std::vector<float> getColumnFromGenericModel(DenseThreeDimensionalModel *model, | 388 std::vector<float> getColumnFromGenericModel(DenseThreeDimensionalModel *model, |
396 int sx, | 389 int sx, |
397 int minbin, | 390 int minbin, |
398 int bincount) const; | 391 int bincount) const; |
399 | 392 |
400 std::vector<float> scaleColumn(const std::vector<float> &in) const; | |
401 | |
402 std::vector<float> distributeColumn(const std::vector<float> &in, | |
403 int h, | |
404 const std::vector<double> &binfory, | |
405 int minbin, | |
406 bool interpolate) const; | |
407 | |
408 void recordColumnExtents(const std::vector<float> &col, | 393 void recordColumnExtents(const std::vector<float> &col, |
409 int sx, | 394 int sx, |
410 MagnitudeRange &overallMag, | 395 MagnitudeRange &overallMag, |
411 bool &overallMagChanged) const; | 396 bool &overallMagChanged) const; |
412 | |
413 std::vector<float> normalizeColumn(const std::vector<float> &in) const; | |
414 | |
415 std::vector<float> peakPickColumn(const std::vector<float> &in) const; | |
416 | |
417 std::vector<float> applyDisplayGain(const std::vector<float> &in) const; | |
418 | 397 |
419 virtual void updateMeasureRectYCoords(LayerGeometryProvider *v, | 398 virtual void updateMeasureRectYCoords(LayerGeometryProvider *v, |
420 const MeasureRect &r) const; | 399 const MeasureRect &r) const; |
421 virtual void setMeasureRectYCoord(LayerGeometryProvider *v, | 400 virtual void setMeasureRectYCoord(LayerGeometryProvider *v, |
422 MeasureRect &r, bool start, int y) const; | 401 MeasureRect &r, bool start, int y) const; |