CB-Paired.h
Go to the documentation of this file.
1
/**
2
* This file was automatically created with "create_c++_header.sh".
3
* Do not edit manually.
4
*/
5
#pragma once
6
#include "../../colormap.h"
7
8
namespace
colormap
9
{
10
namespace
IDL
11
{
12
13
class
CBPaired
:
public
Colormap
14
{
15
private
:
16
class
Wrapper :
public
WrapperBase
17
{
18
public
:
19
#ifdef float
20
#error "TODO"
21
#endif
22
#define float local_real_t
23
#include "../../../../shaders/glsl/IDL_CB-Paired.frag"
24
#undef float
25
};
26
27
public
:
28
Color
29
getColor
(
double
x)
const override
30
{
31
Wrapper w;
32
vec4
c
= w.colormap(x);
33
Color
result;
34
result.
r
=
std::max
(0.0,
std::min
(1.0,
c
.r));
35
result.
g
=
std::max
(0.0,
std::min
(1.0,
c
.g));
36
result.
b
=
std::max
(0.0,
std::min
(1.0,
c
.b));
37
result.
a
=
std::max
(0.0,
std::min
(1.0,
c
.a));
38
return
result;
39
}
40
41
std::string
42
getTitle
()
const override
43
{
44
return
std::string(
"CB-Paired"
);
45
}
46
47
std::string
48
getCategory
()
const override
49
{
50
return
std::string(
"IDL"
);
51
}
52
53
std::string
54
getSource
()
const override
55
{
56
return
std::string(
57
"float colormap_red(float x) {\n"
58
" if (x < 0.0906416957946237) {\n"
59
" return -1.48766695652174E+03 * x + 1.65896666666667E+02;\n"
60
" } else if (x < 0.181137969063194) {\n"
61
" return 1.62263833992095E+03 * x - 1.16026679841898E+02;\n"
62
" } else if (x < 0.2716806139960391) {\n"
63
" return -1.40227075098820E+03 * x + 4.31899209486178E+02;\n"
64
" } else if (x < 0.3621693275308975) {\n"
65
" return 2.21145652173927E+03 * x - 5.49880434782653E+02;\n"
66
" } else if (x < 0.4514347780510689) {\n"
67
" return -2.73075098814252E+02 * x + 3.49940711462467E+02;\n"
68
" } else if (x < 0.5478389816716595) {\n"
69
" return 2.75424347826088E+02 * x + 1.02328985507251E+02;\n"
70
" } else if (x < 0.6384253260915684) {\n"
71
" return 1.95770750987722E+01 * x + 2.42492094861655E+02;\n"
72
" } else if (x < 0.7280391465804739) {\n"
73
" return -5.92081027667844E+02 * x + 6.32990118576982E+02;\n"
74
" } else if (x < 0.8191050219893012) {\n"
75
" return -1.05189130434770E+03 * x + 9.67749999999916E+02;\n"
76
" } else if (x < 0.9092300295745469) {\n"
77
" return 1.64974505928811E+03 * x - 1.24517391304309E+03;\n"
78
" } else {\n"
79
" return -8.20731225296366E+02 * x + 1.00105731225287E+03;\n"
80
" }\n"
81
"}\n"
82
"\n"
83
"float colormap_green(float x) {\n"
84
" if (x < 0.09069203671589791) {\n"
85
" return -9.49076521739127E+02 * x + 2.05970000000000E+02;\n"
86
" } else if (x < 0.1811205395903491) {\n"
87
" return 1.14400395256917E+03 * x + 1.61442687747026E+01;\n"
88
" } else if (x < 0.271076794014141) {\n"
89
" return -7.04272727272755E+02 * x + 3.50905138339931E+02;\n"
90
" } else if (x < 0.3618506954718166) {\n"
91
" return -6.35000000000221E+01 * x + 1.77206521739141E+02;\n"
92
" } else if (x < 0.4527247821743651) {\n"
93
" return -1.40603557312254E+03 * x + 6.63003952569178E+02;\n"
94
" } else if (x < 0.5472660653935183) {\n"
95
" return 1.73713913043494E+03 * x - 7.59989130434857E+02;\n"
96
" } else if (x < 0.6379975539161487) {\n"
97
" return -7.00507905138483E+02 * x + 5.74052371541584E+02;\n"
98
" } else if (x < 0.7283304980067641) {\n"
99
" return 5.64723320158019E+02 * x - 2.33162055335916E+02; } else if "
100
"(x < 0.8189077039268755) {\n"
101
" return -1.29283992094844E+03 * x + 1.11975790513821E+03; } "
102
"else if (x < 0.9094178747563795) {\n"
103
" return 2.14293675889271E+03 * x - 1.69382608695601E+03;\n"
104
" } else {\n"
105
" return -1.75290118577070E+03 * x + 1.84911857707505E+03;\n"
106
" }\n"
107
"}\n"
108
"\n"
109
"float colormap_blue(float x) {\n"
110
" if (x < 0.1835817221386023) {\n"
111
" return -4.93278367346940E+02 * x + 2.25853877551021E+02;\n"
112
" } else if (x < 0.2718482976477959) {\n"
113
" return -1.04124223602495E+03 * x + 3.26450028232661E+02;\n"
114
" } else if (x < 0.3623519200472859) {\n"
115
" return 1.21151976284592E+03 * x - 2.85959486166031E+02;\n"
116
" } else if (x < 0.4526344257525674) {\n"
117
" return -1.38645849802374E+03 * x + 6.55422924901199E+02;\n"
118
" } else if (x < 0.5474992417588231) {\n"
119
" return 8.80275652173975E+02 * x - 3.70578985507278E+02;\n"
120
" } else if (x < 0.6375259518892261) {\n"
121
" return -1.24038339920972E+03 * x + 7.90480237154278E+02;\n"
122
" } else if (x < 0.7280438873117513) {\n"
123
" return 2.36255138339872E+03 * x - 1.50648418972297E+03;\n"
124
" } else if (x < 0.8192397843702398) {\n"
125
" return -6.51816205533491E+02 * x + 6.88107707509788E+02;\n"
126
" } else if (x < 0.9092328860678134) {\n"
127
" return -1.35533596837590E+01 * x + 1.65217391304318E+02;\n"
128
" } else {\n"
129
" return -1.19420158102770E+03 * x + 1.23870158102770E+03;\n"
130
" }\n"
131
"}\n"
132
"\n"
133
"vec4 colormap(float x) {\n"
134
" float r = clamp(colormap_red(x) / 255.0, 0.0, 1.0);\n"
135
" float g = clamp(colormap_green(x) / 255.0, 0.0, 1.0);\n"
136
" float b = clamp(colormap_blue(x) / 255.0, 0.0, 1.0);\n"
137
" return vec4(r, g, b, 1.0);\n"
138
"}\n"
);
139
}
140
};
141
142
}
// namespace IDL
143
}
// namespace colormap
colormap::Colormap
Definition:
colormap.h:17
colormap::IDL::CBPaired::getTitle
std::string getTitle() const override
Definition:
CB-Paired.h:42
colormap::Color::g
double g
Definition:
colormap.h:14
c
constexpr T c
Definition:
UnscentedKalmanFilterTest.cpp:46
colormap::Colormap::vec4
Definition:
colormap.h:33
Color
uint32_t Color
RGBA color.
Definition:
color.h:8
colormap::Color::a
double a
Definition:
colormap.h:14
colormap::Color::b
double b
Definition:
colormap.h:14
max
T max(T t1, T t2)
Definition:
gdiam.h:51
colormap::IDL::CBPaired::getSource
std::string getSource() const override
Definition:
CB-Paired.h:54
colormap::Color
Definition:
colormap.h:12
colormap::IDL::CBPaired
Definition:
CB-Paired.h:13
colormap
This file was automatically created with "create_c++_header.sh".
Definition:
colormap.h:9
colormap::Color::r
double r
Definition:
colormap.h:14
colormap::IDL::CBPaired::getColor
Color getColor(double x) const override
Definition:
CB-Paired.h:29
colormap::Colormap::WrapperBase
Definition:
colormap.h:146
min
T min(T t1, T t2)
Definition:
gdiam.h:44
colormap::IDL::CBPaired::getCategory
std::string getCategory() const override
Definition:
CB-Paired.h:48
VisionX
components
pointcloud_processor
DenseCRFSegmentationProcessor
include
colormap
private
IDL
CB-Paired.h
Generated on Sat Mar 29 2025 09:17:36 for armarx_documentation by
1.8.17