GlasbeyLUT.cpp
Go to the documentation of this file.
1#include "GlasbeyLUT.h"
2
3#include <SimoxUtility/color/GlasbeyLUT.h>
4
5armarx::DrawColor
6armarx::toDrawColor(Eigen::Vector4f c)
7{
8 return {c(0), c(1), c(2), c(3)};
9}
10
11armarx::DrawColor
13{
14 return toDrawColor(c.to_vector4f());
15}
16
17armarx::DrawColor24Bit
19{
20 return {c.r, c.g, c.b};
21}
22
23namespace armarx
24{
25
26 DrawColor
27 GlasbeyLUT::at(std::size_t id, float alpha)
28 {
29 return toDrawColor(simox::color::GlasbeyLUT::atf(id, alpha));
30 }
31
32 DrawColor24Bit
33 GlasbeyLUT::atByte(std::size_t id)
34 {
35 return toDrawColor24Bit(simox::color::GlasbeyLUT::at(id));
36 }
37
38 std::size_t
40 {
41 return simox::color::GlasbeyLUT::size();
42 }
43
44 const std::vector<unsigned char>&
46 {
47 return simox::color::GlasbeyLUT::data();
48 }
49
50} // namespace armarx
constexpr T c
static DrawColor at(std::size_t id, float alpha=1.f)
static DrawColor24Bit atByte(std::size_t id)
static const std::vector< unsigned char > & data()
Get the raw lookup table (flat).
static std::size_t size()
Get the number of colors in the lookup table.;.
This file offers overloads of toIce() and fromIce() functions for STL container types.
DrawColor toDrawColor(Eigen::Vector4f c)
Definition GlasbeyLUT.cpp:6
DrawColor24Bit toDrawColor24Bit(simox::Color c)