BALL 1.5.0
Loading...
Searching...
No Matches
colorMap.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: colorMap.h,v 1.2.18.1 2007/03/25 21:25:40 oliver Exp $
5//
6
7#ifndef BALL_VIEW_DATATYPE_COLORMAP_H
8#define BALL_VIEW_DATATYPE_COLORMAP_H
9
10#ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
12#endif
13
14#ifndef BALL_MATHS_VECTOR4_H
15# include <BALL/MATHS/vector4.h>
16#endif
17
18#include <vector>
19
20namespace BALL
21{
22 namespace VIEW
23 {
29 : public vector<ColorRGBA>
30 {
31 public:
32
34
35
38
39
43
48 ColorMap(Size color_number);
49
54 ColorMap(const ColorMap& color_Map);
55
61 ColorMap(Size size, const ColorRGBA& color, bool alpha_blending=false);
62
65 ColorMap(const ColorMap& color_Map, Index from, Index to, bool alpha_blending=false);
66
69 ColorMap(const ColorRGBA* color_array, Size array_size, bool alpha_blending=false);
70
73 virtual ~ColorMap();
75
79
81 void createMapJet(const Size color_number);
82
84 void setBaseColors(const ColorRGBA* color_array, Size array_size);
85
87 void setNumberOfColors(const Size color_number);
88
90 Size getNumberOfColors() const;
91
93 void setAlphaBlending(bool blending);
94
96 bool getAlphaBlending() const;
97
101 Size createMap();
102
105 void setMinMaxColors(ColorRGBA min, ColorRGBA max);
106
109 void setRange(float min, float max);
110
113 ColorRGBA& map(float value);
114
117 const ColorRGBA& map(float value) const;
118
124 bool setInterpolationBoundaries(const vector<Vector4>& boundaries);
125
127
130
133 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
135
136 protected:
137
138 Size color_number_;
139 bool alpha_blending_;
140 ColorRGBA min_color_;
141 ColorRGBA max_color_;
142 bool has_min_max_colors_;
143 float min_;
144 float max_;
145
146 vector<Vector4> interpolation_boundaries_;
147 };
148
149 } // namespace VIEW
150} // namespace BALL
151
152#endif // BALL_VIEW_DATATYPE_COLORMAP_H
#define BALL_CREATE(name)
Definition create.h:62
STL namespace.
TVector4< float > Vector4
Definition vector4.h:815
#define BALL_VIEW_EXPORT