14 namespace visualization {
32 virtual Eigen::Vector3d
GetColor(
double value)
const = 0;
36 double value,
double y0,
double x0,
double y1,
double x1)
const {
37 if (value < x0)
return y0;
38 if (value > x1)
return y1;
39 return (value - x0) * (y1 - y0) / (x1 - x0) + y0;
42 const Eigen::Vector3d &y0,
44 const Eigen::Vector3d &y1,
46 if (value < x0)
return y0;
47 if (value > x1)
return y1;
48 return (value - x0) * (y1 - y0) / (x1 - x0) + y0;
54 Eigen::Vector3d
GetColor(
double value)
const final;
60 Eigen::Vector3d
GetColor(
double value)
const final;
66 }
else if (value <= -0.25) {
68 }
else if (value <= 0.25) {
70 }
else if (value <= 0.75) {
81 Eigen::Vector3d
GetColor(
double value)
const final;
87 Eigen::Vector3d
GetColor(
double value)
const final;
92 Eigen::Vector3d
GetColor(
double value)
const final;
Definition: ColorMap.h:52
Eigen::Vector3d GetColor(double value) const final
Function to get a color from a value in [0..1].
Definition: ColorMap.cpp:44
Definition: ColorMap.h:90
Eigen::Vector3d GetColor(double value) const final
Function to get a color from a value in [0..1].
Definition: ColorMap.cpp:64
Definition: ColorMap.h:16
ColorMapOption
Definition: ColorMap.h:18
virtual ~ColorMap()
Definition: ColorMap.h:28
virtual Eigen::Vector3d GetColor(double value) const =0
Function to get a color from a value in [0..1].
Eigen::Vector3d Interpolate(double value, const Eigen::Vector3d &y0, double x0, const Eigen::Vector3d &y1, double x1) const
Definition: ColorMap.h:41
double Interpolate(double value, double y0, double x0, double y1, double x1) const
Definition: ColorMap.h:35
ColorMap()
Definition: ColorMap.h:27
See Matlab's Jet colormap.
Definition: ColorMap.h:58
double JetBase(double value) const
Definition: ColorMap.h:63
Eigen::Vector3d GetColor(double value) const final
Function to get a color from a value in [0..1].
Definition: ColorMap.cpp:48
See Matlab's Summer colormap.
Definition: ColorMap.h:79
Eigen::Vector3d GetColor(double value) const final
Function to get a color from a value in [0..1].
Definition: ColorMap.cpp:54
See Matlab's Winter colormap.
Definition: ColorMap.h:85
Eigen::Vector3d GetColor(double value) const final
Function to get a color from a value in [0..1].
Definition: ColorMap.cpp:59
const std::shared_ptr< const ColorMap > GetGlobalColorMap()
Interface functions.
Definition: ColorMap.cpp:84
void SetGlobalColorMap(ColorMap::ColorMapOption option)
Definition: ColorMap.cpp:88
Definition: PinholeCameraIntrinsic.cpp:16