GlasbeyLUT.cpp
Go to the documentation of this file.
1 #include "GlasbeyLUT.h"
2 
3 #include <SimoxUtility/color/GlasbeyLUT.h>
4 
5 armarx::DrawColor
6 armarx::toDrawColor(Eigen::Vector4f c)
7 {
8  return {c(0), c(1), c(2), c(3)};
9 }
10 
11 armarx::DrawColor
13 {
14  return toDrawColor(c.to_vector4f());
15 }
16 
17 armarx::DrawColor24Bit
19 {
20  return {c.r, c.g, c.b};
21 }
22 
23 namespace 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  {
48  }
49 
50 } // namespace armarx
armarx::GlasbeyLUT::atByte
static DrawColor24Bit atByte(std::size_t id)
Definition: GlasbeyLUT.cpp:33
armarx::GlasbeyLUT::size
static std::size_t size()
Get the number of colors in the lookup table.;.
Definition: GlasbeyLUT.cpp:39
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:27
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
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:45
armarx::toDrawColor24Bit
DrawColor24Bit toDrawColor24Bit(simox::Color c)
Definition: GlasbeyLUT.cpp:18
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27