Mercurial > hg > svgui
comparison layer/Colour3DPlotExporter.h @ 1561:d6f9fac336b3 spectrogram-export
Handle scale factor, needed for all spectrogram export; handle thresholding (using gain/normalisation for threshold calculation) in peak frequency export
author | Chris Cannam |
---|---|
date | Thu, 09 Jan 2020 14:34:51 +0000 |
parents | ac8da42674ff |
children | 62b7699e5bfe |
comparison
equal
deleted
inserted
replaced
1560:27f3e64489e1 | 1561:d6f9fac336b3 |
---|---|
31 const LayerGeometryProvider *provider; // optionally | 31 const LayerGeometryProvider *provider; // optionally |
32 }; | 32 }; |
33 | 33 |
34 struct Parameters { | 34 struct Parameters { |
35 Parameters() : | 35 Parameters() : |
36 binDisplay(BinDisplay::AllBins) { } | 36 binDisplay(BinDisplay::AllBins), |
37 scaleFactor(1.0), | |
38 threshold(0.0), | |
39 gain(1.0), | |
40 normalization(ColumnNormalization::None) { } | |
37 | 41 |
38 /** Selection of bins to include in the export. */ | 42 /** Selection of bins to include in the export. */ |
39 BinDisplay binDisplay; | 43 BinDisplay binDisplay; |
44 | |
45 /** Initial scale factor (e.g. for FFT scaling). This factor | |
46 * is actually applied to exported values, in contrast to the | |
47 * gain value below based on the ColourScale parameter. */ | |
48 double scaleFactor; | |
49 | |
50 /** Threshold below which every value is mapped to background | |
51 * pixel 0 in the display, matching the ColourScale object | |
52 * parameters. This is used for thresholding in | |
53 * peak-frequency output only. */ | |
54 double threshold; | |
55 | |
56 /** Gain that is applied before thresholding, in the display, | |
57 * matching the ColourScale object parameters. This is used | |
58 * only to determined the thresholding level. The exported | |
59 * values have the scaleFactor applied, but not this gain. */ | |
60 double gain; | |
61 | |
62 /** Type of column normalization. Again, this is only used to | |
63 * calculate thresholding level. The exported values are | |
64 * un-normalized. */ | |
65 ColumnNormalization normalization; | |
40 }; | 66 }; |
41 | 67 |
42 Colour3DPlotExporter(Sources sources, Parameters parameters); | 68 Colour3DPlotExporter(Sources sources, Parameters parameters); |
43 ~Colour3DPlotExporter(); | 69 ~Colour3DPlotExporter(); |
44 | 70 |