Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.h @ 1099:5c6271734790 spectrogram-minor-refactor
Switch in "standard" colour scale, bin scale, normalisation -- not quite handled elegantly or correctly yet
author | Chris Cannam |
---|---|
date | Wed, 13 Jul 2016 10:00:21 +0100 |
parents | 92ac1fce7102 |
children | 102f986ec032 |
comparison
equal
deleted
inserted
replaced
1098:d9f1d2756b59 | 1099:5c6271734790 |
---|---|
81 virtual QString getPropertyGroupName(const PropertyName &) const; | 81 virtual QString getPropertyGroupName(const PropertyName &) const; |
82 virtual int getPropertyRangeAndValue(const PropertyName &, | 82 virtual int getPropertyRangeAndValue(const PropertyName &, |
83 int *min, int *max, int *deflt) const; | 83 int *min, int *max, int *deflt) const; |
84 virtual QString getPropertyValueLabel(const PropertyName &, | 84 virtual QString getPropertyValueLabel(const PropertyName &, |
85 int value) const; | 85 int value) const; |
86 virtual QString getPropertyValueIconName(const PropertyName &, | |
87 int value) const; | |
86 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const; | 88 virtual RangeMapper *getNewPropertyRangeMapper(const PropertyName &) const; |
87 virtual void setProperty(const PropertyName &, int value); | 89 virtual void setProperty(const PropertyName &, int value); |
88 virtual void setProperties(const QXmlAttributes &); | 90 virtual void setProperties(const QXmlAttributes &); |
89 | 91 |
90 enum ColourScale { | 92 void setColourScale(ColourScale::Scale); |
91 LinearScale, | 93 ColourScale::Scale getColourScale() const { return m_colourScale; } |
92 LogScale, | |
93 PlusMinusOneScale, | |
94 AbsoluteScale | |
95 }; | |
96 | |
97 void setColourScale(ColourScale); | |
98 ColourScale getColourScale() const { return m_colourScale; } | |
99 | 94 |
100 void setColourMap(int map); | 95 void setColourMap(int map); |
101 int getColourMap() const; | 96 int getColourMap() const; |
102 | 97 |
103 /** | 98 /** |
104 * Set the gain multiplier for sample values in this view. | 99 * Set the gain multiplier for sample values in this view. |
105 * The default is 1.0. | 100 * The default is 1.0. |
106 */ | 101 */ |
107 void setGain(float gain); | 102 void setGain(float gain); |
108 float getGain() const; | 103 float getGain() const; |
109 | |
110 enum BinScale { | |
111 LinearBinScale, | |
112 LogBinScale | |
113 }; | |
114 | 104 |
115 /** | 105 /** |
116 * Specify the scale for the y axis. | 106 * Specify the scale for the y axis. |
117 */ | 107 */ |
118 void setBinScale(BinScale); | 108 void setBinScale(Colour3DPlotRenderer::BinScale); |
119 BinScale getBinScale() const; | 109 Colour3DPlotRenderer::BinScale getBinScale() const; |
120 | 110 |
121 /** | 111 /** |
122 * Normalize each column to its maximum value, independent of its | 112 * Specify the normalization mode for bin values. |
123 * neighbours. | 113 */ |
124 */ | 114 void setNormalization(ColumnOp::Normalization); |
125 void setNormalizeColumns(bool n); | 115 ColumnOp::Normalization getNormalization() const; |
126 bool getNormalizeColumns() const; | |
127 | |
128 /** | |
129 * Normalize each value against the maximum in the visible region. | |
130 */ | |
131 void setNormalizeVisibleArea(bool n); | |
132 bool getNormalizeVisibleArea() const; | |
133 | |
134 /** | |
135 * Normalize each column to its maximum value, and then scale by | |
136 * the log of the (absolute) maximum value. | |
137 */ | |
138 void setNormalizeHybrid(bool n); | |
139 bool getNormalizeHybrid() const; | |
140 | 116 |
141 void setInvertVertical(bool i); | 117 void setInvertVertical(bool i); |
142 bool getInvertVertical() const; | 118 bool getInvertVertical() const; |
143 | 119 |
144 void setOpaque(bool i); | 120 void setOpaque(bool i); |
178 mutable QImage *m_cache; | 154 mutable QImage *m_cache; |
179 mutable QImage *m_peaksCache; | 155 mutable QImage *m_peaksCache; |
180 mutable int m_cacheValidStart; | 156 mutable int m_cacheValidStart; |
181 mutable int m_cacheValidEnd; | 157 mutable int m_cacheValidEnd; |
182 | 158 |
183 ColourScale m_colourScale; | 159 ColourScale::Scale m_colourScale; |
184 bool m_colourScaleSet; | 160 bool m_colourScaleSet; |
185 int m_colourMap; | 161 int m_colourMap; |
186 float m_gain; | 162 float m_gain; |
187 BinScale m_binScale; | 163 Colour3DPlotRenderer::BinScale m_binScale; |
188 bool m_normalizeColumns; | 164 ColumnOp::Normalization m_normalization; |
189 bool m_normalizeVisibleArea; | |
190 bool m_normalizeHybrid; | |
191 bool m_invertVertical; | 165 bool m_invertVertical; |
192 bool m_opaque; | 166 bool m_opaque; |
193 bool m_smooth; | 167 bool m_smooth; |
194 int m_peakResolution; | 168 int m_peakResolution; |
195 | 169 |