ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
PclCloudLUT.cpp
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - CloudViewer: www.cloudViewer.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2024 www.cloudViewer.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#include "
PclCloudLUT.h
"
9
10
#include <pcl/point_types.h>
11
// #include <pcl/common/colors.h>
12
#include <
ecvColorTypes.h
>
13
15
static
const
unsigned
char
CloudLUT
[] = {
16
255, 255, 255,
// default
17
255, 0, 0,
// highted
18
};
19
21
static
const
unsigned
int
CloudLUT_SIZE
=
22
sizeof
(
CloudLUT
) / (
sizeof
(
CloudLUT
[0]) * 3);
23
24
pcl::RGB
PclCloudLUT::at
(
int
color_id) {
25
// assert (color_id < CloudLUT_SIZE);
26
pcl::RGB
color
;
27
if
(color_id == -1) {
28
color_id = -color_id;
29
color
.r =
CloudLUT
[color_id * 3 + 0];
30
color
.g =
CloudLUT
[color_id * 3 + 1];
31
color
.b =
CloudLUT
[color_id * 3 + 2];
32
}
else
if
(color_id == 0) {
33
color
.r =
CloudLUT
[color_id * 3 + 0];
34
color
.g =
CloudLUT
[color_id * 3 + 1];
35
color
.b =
CloudLUT
[color_id * 3 + 2];
36
}
else
if
(color_id > 0) {
37
// color = pcl::GlasbeyLUT::at(color_id + 20);
38
ecvColor::Rgb
col =
ecvColor::LookUpTable::at
(color_id);
39
color
.r = col.
r
;
40
color
.g = col.
g
;
41
color
.b = col.
b
;
42
}
43
44
return
(
color
);
45
}
46
47
size_t
PclCloudLUT::size
() {
return
CloudLUT_SIZE
; }
48
49
const
unsigned
char
*
PclCloudLUT::data
() {
return
CloudLUT
; }
color
math::float4 color
Definition:
LineSetBuffers.cpp:46
CloudLUT_SIZE
static const unsigned int CloudLUT_SIZE
Number of colors in Glasbey lookup table.
Definition:
PclCloudLUT.cpp:21
CloudLUT
static const unsigned char CloudLUT[]
Lookup table.
Definition:
PclCloudLUT.cpp:15
PclCloudLUT.h
PclCloudLUT::data
static const unsigned char * data()
Definition:
PclCloudLUT.cpp:49
PclCloudLUT::at
static pcl::RGB at(int color_id)
Definition:
PclCloudLUT.cpp:24
PclCloudLUT::size
static size_t size()
Definition:
PclCloudLUT.cpp:47
ecvColor::RgbTpl
RGB color structure.
Definition:
ecvColorTypes.h:49
ecvColor::RgbTpl::g
Type g
Definition:
ecvColorTypes.h:54
ecvColor::RgbTpl::b
Type b
Definition:
ecvColorTypes.h:54
ecvColor::RgbTpl::r
Type r
Definition:
ecvColorTypes.h:54
ecvColorTypes.h
ecvColor::LookUpTable::at
Rgb at(size_t color_id)
Definition:
ecvColorTypes.cpp:77
libs
PCLEngine
Tools
ColorTools
PclCloudLUT.cpp
Generated on Tue Feb 3 2026 07:12:25 for ACloudViewer by
1.9.1