CB-YIGn.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
CBYIGn
:
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-YIGn.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-YIGn"
);
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.6289940178394318) {\n"
59
" return ((5.11696133375750E+02 * x - 8.41303218634799E+02) * x + "
60
"2.59644604131609E+01) * x + 2.53419788769069E+02;\n"
61
" } else {\n"
62
" return (-1.59266359984140E+02 * x - 2.05336652594121E+01) * x + "
63
"1.40166356828632E+02;\n"
64
" }\n"
65
"}\n"
66
"\n"
67
"float colormap_green(float x) {\n"
68
" if (x < 0.7657577693462372) {\n"
69
" return ((1.07839212106774E+00 * x - 1.91222692546201E+02) * x - "
70
"1.99072424271726E+01) * x + 2.55781815734834E+02;\n"
71
" } else {\n"
72
" return (-2.23913463560442E+02 * x + 1.41364491447333E+02) * x + "
73
"1.51940340657207E+02;\n"
74
" }\n"
75
"}\n"
76
"\n"
77
"float colormap_blue(float x) {\n"
78
" if (x < 0.1102530658245087) {\n"
79
" return (-1.06015269490890E+01 * x - 3.53323657599336E+02) * x + "
80
"2.28818914956011E+02;\n"
81
" } else if (x < 0.7528357207775116) {\n"
82
" return (((6.02578715483658E+02 * x - 1.15715802822919E+03) * x + "
83
"7.15916939803876E+02) * x - 3.43088208134950E+02) * x + "
84
"2.19476164232866E+02;\n"
85
" } else {\n"
86
" return (-6.54502605847083E+01 * x + 1.22002989630042E+01) * x + "
87
"9.46764726107154E+01;\n"
88
" }\n"
89
"}\n"
90
"\n"
91
"vec4 colormap(float x) {\n"
92
" float r = clamp(colormap_red(x) / 255.0, 0.0, 1.0);\n"
93
" float g = clamp(colormap_green(x) / 255.0, 0.0, 1.0);\n"
94
" float b = clamp(colormap_blue(x) / 255.0, 0.0, 1.0);\n"
95
" return vec4(r, g, b, 1.0);\n"
96
"}\n"
);
97
}
98
};
99
100
}
// namespace IDL
101
}
// namespace colormap
colormap::IDL::CBYIGn::getSource
std::string getSource() const override
Definition:
CB-YIGn.h:54
colormap::Colormap
Definition:
colormap.h:17
colormap::Color::g
double g
Definition:
colormap.h:14
c
constexpr T c
Definition:
UnscentedKalmanFilterTest.cpp:46
colormap::Colormap::vec4
Definition:
colormap.h:33
colormap::IDL::CBYIGn::getColor
Color getColor(double x) const override
Definition:
CB-YIGn.h:29
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::CBYIGn
Definition:
CB-YIGn.h:13
colormap::Color
Definition:
colormap.h:12
colormap::IDL::CBYIGn::getCategory
std::string getCategory() const override
Definition:
CB-YIGn.h:48
colormap::IDL::CBYIGn::getTitle
std::string getTitle() const override
Definition:
CB-YIGn.h:42
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::Colormap::WrapperBase
Definition:
colormap.h:146
min
T min(T t1, T t2)
Definition:
gdiam.h:44
VisionX
components
pointcloud_processor
DenseCRFSegmentationProcessor
include
colormap
private
IDL
CB-YIGn.h
Generated on Sat Mar 29 2025 09:17:36 for armarx_documentation by
1.8.17