Mercurial > hg > svgui
diff 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 |
line wrap: on
line diff
--- a/layer/SliceLayer.h Wed Nov 14 15:47:21 2018 +0000 +++ b/layer/SliceLayer.h Thu Nov 15 13:06:38 2018 +0000 @@ -155,7 +155,24 @@ virtual int getDefaultColourHint(bool dark, bool &impose); + // Determine how the bins are lined up + // horizontally. BinsCentredOnScalePoint means we operate like a + // spectrum, where a bin maps to a specific frequency, and so the + // bin should be visually centred on the scale point that + // corresponds to that frequency. BinsSpanScalePoints means we + // have numbered or labelled bins that are not mapped to a + // continuous scale, like a typical chromagram output, and so bin + // N spans from scale point N to N+1. This is a fundamental + // quality of the class or input data, not a user-configurable + // property. + // + enum BinAlignment { + BinsCentredOnScalePoints, + BinsSpanScalePoints + }; + const DenseThreeDimensionalModel *m_sliceableModel; + BinAlignment m_binAlignment; int m_colourMap; bool m_colourInverted; EnergyScale m_energyScale;