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