annotate layer/Colour3DPlotRenderer.h @ 1071:65b183494331 spectrogram-minor-refactor

Start stubbing Colour3DPlotRenderer
author Chris Cannam
date Thu, 23 Jun 2016 17:07:21 +0100
parents
children 76b50b48e1e4
rev   line source
Chris@1071 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@1071 2
Chris@1071 3 /*
Chris@1071 4 Sonic Visualiser
Chris@1071 5 An audio file viewer and annotation editor.
Chris@1071 6 Centre for Digital Music, Queen Mary, University of London.
Chris@1071 7 This file copyright 2006-2016 Chris Cannam and QMUL.
Chris@1071 8
Chris@1071 9 This program is free software; you can redistribute it and/or
Chris@1071 10 modify it under the terms of the GNU General Public License as
Chris@1071 11 published by the Free Software Foundation; either version 2 of the
Chris@1071 12 License, or (at your option) any later version. See the file
Chris@1071 13 COPYING included with this distribution for more information.
Chris@1071 14 */
Chris@1071 15
Chris@1071 16 #ifndef COLOUR_3D_PLOT_RENDERER_H
Chris@1071 17 #define COLOUR_3D_PLOT_RENDERER_H
Chris@1071 18
Chris@1071 19 #include "ColourScale.h"
Chris@1071 20
Chris@1071 21 #include "base/ColumnOp.h"
Chris@1071 22
Chris@1071 23 class DenseThreeDimensionalModel;
Chris@1071 24 class Dense3DModelPeakCache;
Chris@1071 25 class FFTModel;
Chris@1071 26
Chris@1071 27 class Colour3DPlotRenderer
Chris@1071 28 {
Chris@1071 29 public:
Chris@1071 30 enum BinDisplay {
Chris@1071 31 AllBins,
Chris@1071 32 PeakBins,
Chris@1071 33 PeakFrequencies
Chris@1071 34 };
Chris@1071 35
Chris@1071 36 enum BinScale {
Chris@1071 37 LinearBinScale,
Chris@1071 38 LogBinScale
Chris@1071 39 };
Chris@1071 40
Chris@1071 41 struct Parameters {
Chris@1071 42
Chris@1071 43 Parameters() :
Chris@1071 44 source(0), peaks(0), fft(0),
Chris@1071 45 colourScale(ColourScale::Parameters()),
Chris@1071 46 normalization(ColumnOp::NoNormalization),
Chris@1071 47 binDisplay(AllBins), binScale(LinearBinScale),
Chris@1071 48 alwaysOpaque(false), interpolate(false), invertVertical(false) { }
Chris@1071 49
Chris@1071 50 DenseThreeDimensionalModel *source; // always
Chris@1071 51 Dense3DModelPeakCache *peaks; // optionally
Chris@1071 52 FFTModel *fft; // optionally
Chris@1071 53
Chris@1071 54 ColourScale colourScale; // complete ColourScale object by value
Chris@1071 55 ColumnOp::Normalization normalization;
Chris@1071 56 BinDisplay binDisplay;
Chris@1071 57 BinScale binScale;
Chris@1071 58 bool alwaysOpaque;
Chris@1071 59 bool interpolate;
Chris@1071 60 bool invertVertical;
Chris@1071 61 };
Chris@1071 62
Chris@1071 63 Colour3DPlotRenderer(Parameters parameters) :
Chris@1071 64 m_params(parameters)
Chris@1071 65 { }
Chris@1071 66
Chris@1071 67 private:
Chris@1071 68 Parameters m_params;
Chris@1071 69 };
Chris@1071 70
Chris@1071 71 #endif
Chris@1071 72