Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ImageValueBar.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5 Multimediale Systeme der Informationsverarbeitung
6 Institut fuer Informatik
7 Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #ifndef IMAGEVALUEBAR_HH_
26 #define IMAGEVALUEBAR_HH_
27 
28 #include <Base/Image/Image.hh>
29 
30 namespace BIAS
31 {
32  /**
33  * \brief this class represents an image value bar.
34  * This means it dispays the values in an image with description
35  * Usefull for example to illustrate the depth of a scene in a depth map
36  * This class is derived from Image, so you can display it as a normal image
37  * and insert it in other images for example.
38  * When you set the size, part of it will be used to display the ticks and units
39  * Use ImageLegendFrame to display it!
40  * \author ischiller
41  * \ingroup g_utils
42  * \date 03/11/2010
43  */
44 
45  template<class StorageType>
46  class BIASUtils_EXPORT ImageValueBar : public Image<StorageType>
47  {
48  public:
49  ImageValueBar();
50  virtual ~ImageValueBar();
51 
52  void SetDisplayRange(double min, double max){minDisplay_ = min; maxDisplay_ = max;};
53  void SetValueRange(double min, double max){minValue_ = min; maxValue_ = max;};
54  void SetTicks(int num_ticks){ticks_ = num_ticks;};
55  void SetUnit(std::string unit){unit_ = unit;};
56  void SetColorModel(ImageBase::EColorModel model){model_ = model;};
57  void Update();
58 
59  protected:
60  double minValue_, maxValue_;
61  double minDisplay_, maxDisplay_;
62  int ticks_;
63  std::string unit_;
65  };
66 
67 }//end namespace
68 #endif /* IMAGEVALUEBAR_HH_ */
EColorModel
These are the most often used color models.
Definition: ImageBase.hh:127
void SetValueRange(double min, double max)
void SetDisplayRange(double min, double max)
ImageBase::EColorModel model_
void SetUnit(std::string unit)
The image template class for specific storage types.
Definition: Image.hh:78
this class represents an image value bar.
void SetTicks(int num_ticks)
void SetColorModel(ImageBase::EColorModel model)