Chris@147: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@147: Chris@147: /* Chris@147: Sonic Visualiser Chris@147: An audio file viewer and annotation editor. Chris@147: Centre for Digital Music, Queen Mary, University of London. Chris@147: This file copyright 2006 Chris Cannam. Chris@147: Chris@147: This program is free software; you can redistribute it and/or Chris@147: modify it under the terms of the GNU General Public License as Chris@147: published by the Free Software Foundation; either version 2 of the Chris@147: License, or (at your option) any later version. See the file Chris@147: COPYING included with this distribution for more information. Chris@147: */ Chris@147: Chris@147: #ifndef _DENSE_THREE_DIMENSIONAL_MODEL_H_ Chris@147: #define _DENSE_THREE_DIMENSIONAL_MODEL_H_ Chris@147: Chris@150: #include "Model.h" Chris@147: #include "base/ZoomConstraint.h" Chris@147: Chris@147: #include Chris@147: #include Chris@147: Chris@179: class DenseThreeDimensionalModel : public Model Chris@147: { Chris@147: Q_OBJECT Chris@147: Chris@147: public: Chris@147: /** Chris@147: * Return the number of sample frames covered by each set of bins. Chris@147: */ Chris@152: virtual size_t getResolution() const = 0; Chris@147: Chris@147: /** Chris@147: * Return the number of bins in each set of bins. Chris@147: */ Chris@152: virtual size_t getYBinCount() const = 0; Chris@147: Chris@147: /** Chris@147: * Return the minimum value of the value in each bin. Chris@147: */ Chris@152: virtual float getMinimumLevel() const = 0; Chris@147: Chris@147: /** Chris@147: * Return the maximum value of the value in each bin. Chris@147: */ Chris@152: virtual float getMaximumLevel() const = 0; Chris@147: Chris@147: typedef std::vector BinValueSet; Chris@147: Chris@147: /** Chris@147: * Get the set of bin values at the given sample frame (i.e. the Chris@147: * windowStartFrame/getWindowSize()'th set of bins). Chris@147: */ Chris@152: virtual void getBinValues(long windowStartFrame, BinValueSet &result) const = 0; Chris@147: Chris@147: /** Chris@147: * Get a single value, the one at the n'th bin of the set of bins Chris@147: * starting at the given sample frame. Chris@147: */ Chris@152: virtual float getBinValue(long windowStartFrame, size_t n) const = 0; Chris@147: Chris@152: virtual QString getBinName(size_t n) const = 0; Chris@147: Chris@152: virtual int getCompletion() const = 0; Chris@147: Chris@147: protected: Chris@152: DenseThreeDimensionalModel() { } Chris@147: }; Chris@147: Chris@147: #endif