33 namespace visualization {
51 virtual Eigen::Vector3d
GetColor(
double value)
const = 0;
55 double value,
double y0,
double x0,
double y1,
double x1)
const {
56 if (value < x0)
return y0;
57 if (value > x1)
return y1;
58 return (value - x0) * (y1 - y0) / (x1 - x0) + y0;
61 const Eigen::Vector3d &y0,
63 const Eigen::Vector3d &y1,
65 if (value < x0)
return y0;
66 if (value > x1)
return y1;
67 return (value - x0) * (y1 - y0) / (x1 - x0) + y0;
73 Eigen::Vector3d
GetColor(
double value)
const final;
79 Eigen::Vector3d
GetColor(
double value)
const final;
85 }
else if (value <= -0.25) {
87 }
else if (value <= 0.25) {
89 }
else if (value <= 0.75) {
100 Eigen::Vector3d
GetColor(
double value)
const final;
106 Eigen::Vector3d
GetColor(
double value)
const final;
111 Eigen::Vector3d
GetColor(
double value)
const final;
void SetGlobalColorMap(ColorMap::ColorMapOption option)
Definition: ColorMap.cpp:107
ColorMapOption
Definition: ColorMap.h:37
Definition: ColorMap.h:109
double Interpolate(double value, double y0, double x0, double y1, double x1) const
Definition: ColorMap.h:54
virtual ~ColorMap()
Definition: ColorMap.h:47
See Matlab's Winter colormap.
Definition: ColorMap.h:104
See Matlab's Summer colormap.
Definition: ColorMap.h:98
See Matlab's Jet colormap.
Definition: ColorMap.h:77
Definition: PinholeCameraIntrinsic.cpp:34
virtual Eigen::Vector3d GetColor(double value) const =0
Function to get a color from a value in [0..1].
const std::shared_ptr< const ColorMap > GetGlobalColorMap()
Interface functions.
Definition: ColorMap.cpp:103
ColorMap()
Definition: ColorMap.h:46
Definition: ColorMap.h:71
Eigen::Vector3d Interpolate(double value, const Eigen::Vector3d &y0, double x0, const Eigen::Vector3d &y1, double x1) const
Definition: ColorMap.h:60
double JetBase(double value) const
Definition: ColorMap.h:82
Definition: ColorMap.h:35