comparison layer/SliceLayer.h @ 1400:decb7741d036

Different approach to x-coord calculation in slice layer - let's acknowledge that we really do have two different types of model, those whose "bins" are actually at a single value (frequency in the case of the spectrum) and those whose bins are just labels.
author Chris Cannam
date Thu, 15 Nov 2018 13:06:38 +0000
parents 3c99083a4d83
children a18e78b9c78b
comparison
equal deleted inserted replaced
1399:ba1f0234efa7 1400:decb7741d036
153 153
154 virtual float getThresholdDb() const; 154 virtual float getThresholdDb() const;
155 155
156 virtual int getDefaultColourHint(bool dark, bool &impose); 156 virtual int getDefaultColourHint(bool dark, bool &impose);
157 157
158 // Determine how the bins are lined up
159 // horizontally. BinsCentredOnScalePoint means we operate like a
160 // spectrum, where a bin maps to a specific frequency, and so the
161 // bin should be visually centred on the scale point that
162 // corresponds to that frequency. BinsSpanScalePoints means we
163 // have numbered or labelled bins that are not mapped to a
164 // continuous scale, like a typical chromagram output, and so bin
165 // N spans from scale point N to N+1. This is a fundamental
166 // quality of the class or input data, not a user-configurable
167 // property.
168 //
169 enum BinAlignment {
170 BinsCentredOnScalePoints,
171 BinsSpanScalePoints
172 };
173
158 const DenseThreeDimensionalModel *m_sliceableModel; 174 const DenseThreeDimensionalModel *m_sliceableModel;
175 BinAlignment m_binAlignment;
159 int m_colourMap; 176 int m_colourMap;
160 bool m_colourInverted; 177 bool m_colourInverted;
161 EnergyScale m_energyScale; 178 EnergyScale m_energyScale;
162 SamplingMode m_samplingMode; 179 SamplingMode m_samplingMode;
163 PlotStyle m_plotStyle; 180 PlotStyle m_plotStyle;