BALL
1.4.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
DATATYPE
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
11
# include <
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
20
namespace
BALL
21
{
22
namespace
VIEW
23
{
28
class
BALL_VIEW_EXPORT
ColorMap
29
:
public
vector<ColorRGBA>
30
{
31
public
:
32
33
BALL_CREATE
(
ColorMap
)
34
35
38
42
ColorMap
();
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
Generated by
1.8.1.2