BALL
1.5.0
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
BALL::VIEW::ColorMap::max_
float max_
Definition:
colorMap.h:144
BALL::VIEW::ColorMap::has_min_max_colors_
bool has_min_max_colors_
Definition:
colorMap.h:142
BALL::VIEW::ColorMap::max_color_
ColorRGBA max_color_
Definition:
colorMap.h:141
BALL
Definition:
constants.h:12
BALL::VIEW::ColorMap::min_color_
ColorRGBA min_color_
Definition:
colorMap.h:140
BALL::VIEW::ColorRGBA
Definition:
colorRGBA.h:31
BALL::VIEW::ColorMap::alpha_blending_
bool alpha_blending_
Definition:
colorMap.h:139
vector4.h
BALL_INDEX_TYPE
BALL_SIZE_TYPE
BALL::VIEW::ColorMap::interpolation_boundaries_
vector< Vector4 > interpolation_boundaries_
Definition:
colorMap.h:146
BALL::Maths::min
T min(const T &a, const T &b)
Definition:
MATHS/common.h:102
BALL::VIEW::ColorMap::min_
float min_
Definition:
colorMap.h:143
colorRGBA.h
BALL::VIEW::ColorMap
Definition:
colorMap.h:28
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition:
COMMON/global.h:52
BALL::Maths::max
T max(const T &a, const T &b)
Definition:
MATHS/common.h:75
BALL_CREATE
#define BALL_CREATE(name)
Definition:
create.h:62
BALL::VIEW::ColorMap::color_number_
Size color_number_
Definition:
colorMap.h:138
Generated by
1.8.17