Mercurial > hg > aimc
annotate src/Modules/Output/Graphics/Scale/ScaleLinear.h @ 185:550d0d6bffe5
- AWS
author | tomwalters |
---|---|
date | Wed, 11 Aug 2010 13:06:30 +0000 |
parents | 9d880fb93c39 |
children | 73c6d61440ad |
rev | line source |
---|---|
tomwalters@116 | 1 /*! |
tomwalters@116 | 2 * \file |
tomwalters@116 | 3 * \brief Linear frequency scale for generating filter banks and their frequencies |
tomwalters@116 | 4 * |
tomwalters@116 | 5 * \author Willem van Engen <cnbh@willem.engen.nl> |
tomwalters@116 | 6 * \date created 2006/09/26 |
tomwalters@116 | 7 * \version \$Id: ScaleLinear.h 459 2007-11-08 11:50:04Z tom $ |
tomwalters@116 | 8 */ |
tomwalters@116 | 9 /* (c) 2006, University of Cambridge, Medical Research Council |
tomwalters@116 | 10 * http://www.pdn.cam.ac.uk/groups/cnbh/aimmanual |
tomwalters@116 | 11 */ |
tomwalters@116 | 12 #ifndef __MODULE_SCALE_LINEAR_H__ |
tomwalters@116 | 13 #define __MODULE_SCALE_LINEAR_H__ |
tomwalters@116 | 14 |
tom@119 | 15 #include "Modules/Output/Graphics/Scale/Scale.h" |
tom@119 | 16 |
tom@119 | 17 namespace aimc { |
tomwalters@116 | 18 |
tomwalters@116 | 19 /*! |
tomwalters@116 | 20 * \class ScaleLinear "Modules/Scale/ScaleLinear.h" |
tomwalters@116 | 21 * \brief Linear frequency scale for generating filter banks and their frequencies |
tomwalters@116 | 22 * |
tomwalters@116 | 23 * It is very advisable to use Scale::Create() to an instance of this scale. |
tomwalters@116 | 24 * |
tomwalters@116 | 25 * In terms of scaling, this is of course an identity transformation. |
tomwalters@116 | 26 */ |
tomwalters@116 | 27 class ScaleLinear : public Scale { |
tomwalters@116 | 28 public: |
tomwalters@117 | 29 ScaleLinear(unsigned int min, unsigned int max, float density) |
tomwalters@117 | 30 : Scale(min, max, density) { m_iType = SCALE_LINEAR; m_sName = "linear"; }; |
tomwalters@116 | 31 |
tomwalters@117 | 32 float FromLinear(float fFreq) { |
tomwalters@117 | 33 return fFreq; |
tomwalters@117 | 34 }; |
tomwalters@116 | 35 |
tomwalters@117 | 36 float ToLinear(float fFreq) { |
tomwalters@117 | 37 return fFreq; |
tomwalters@117 | 38 }; |
tomwalters@116 | 39 }; |
tom@119 | 40 } // namepspace aimc |
tomwalters@116 | 41 #endif /* __MODULE_SCALE_LINEAR_H__ */ |