32 namespace visualization {
50 virtual Eigen::Vector3d
GetColor(
double value)
const = 0;
54 double value,
double y0,
double x0,
double y1,
double x1)
const {
55 if (value < x0)
return y0;
56 if (value > x1)
return y1;
57 return (value - x0) * (y1 - y0) / (x1 - x0) + y0;
60 const Eigen::Vector3d &y0,
62 const Eigen::Vector3d &y1,
64 if (value < x0)
return y0;
65 if (value > x1)
return y1;
66 return (value - x0) * (y1 - y0) / (x1 - x0) + y0;
72 Eigen::Vector3d
GetColor(
double value)
const final;
78 Eigen::Vector3d
GetColor(
double value)
const final;
84 }
else if (value <= -0.25) {
86 }
else if (value <= 0.25) {
88 }
else if (value <= 0.75) {
99 Eigen::Vector3d
GetColor(
double value)
const final;
105 Eigen::Vector3d
GetColor(
double value)
const final;
110 Eigen::Vector3d
GetColor(
double value)
const final;
void SetGlobalColorMap(ColorMap::ColorMapOption option)
Definition: ColorMap.cpp:107
ColorMapOption
Definition: ColorMap.h:36
Definition: ColorMap.h:108
double Interpolate(double value, double y0, double x0, double y1, double x1) const
Definition: ColorMap.h:53
virtual ~ColorMap()
Definition: ColorMap.h:46
See Matlab's Winter colormap.
Definition: ColorMap.h:103
See Matlab's Summer colormap.
Definition: ColorMap.h:97
See Matlab's Jet colormap.
Definition: ColorMap.h:76
Definition: PinholeCameraIntrinsic.cpp:33
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:45
Definition: ColorMap.h:70
Eigen::Vector3d Interpolate(double value, const Eigen::Vector3d &y0, double x0, const Eigen::Vector3d &y1, double x1) const
Definition: ColorMap.h:59
double JetBase(double value) const
Definition: ColorMap.h:81
Definition: ColorMap.h:34