22 #ifndef KJB_I_CPP_I_COLORMAP_H
23 #define KJB_I_CPP_I_COLORMAP_H
30 #include <i/i_float.h>
46 Colormap(
const std::string& name =
"jet",
int n = 64)
56 void preset(
const std::string& name,
int n = 64)
80 typedef std::vector<PixelRGBA> (*Preset_map_func)(int);
82 static std::vector<PixelRGBA>
jet(
int n);
83 static std::vector<PixelRGBA>
hot(
int n);
84 static std::vector<PixelRGBA>
hsv(
int n);
85 static std::vector<PixelRGBA>
gray(
int n);
86 static std::vector<PixelRGBA>
cool(
int n);
87 static std::vector<PixelRGBA>
lines(
int n);
88 static std::map<std::string, Preset_map_func>
presets_;
static std::vector< PixelRGBA > lines(int n)
Definition: i_colormap.cpp:196
static std::vector< PixelRGBA > cool(int n)
Definition: i_colormap.cpp:222
static std::vector< PixelRGBA > jet(int n)
Definition: i_colormap.cpp:40
Colormap(const std::string &name="jet", int n=64)
Definition: i_colormap.h:46
std::iterator_traits< Iterator >::value_type lerp(Iterator begin, Iterator end, Real x)
Definition: l_algorithm.h:69
static std::vector< PixelRGBA > gray(int n)
Definition: i_colormap.cpp:174
std::vector< PixelRGBA > colors_
Definition: i_colormap.h:90
x
Definition: APPgetLargeConnectedEdges.m:100
static std::vector< PixelRGBA > hsv(int n)
Definition: i_colormap.cpp:147
Code for a wrapper class around the C struct Pixel.
void preset(const std::string &name, int n=64)
Definition: i_colormap.h:56
Wrapped version of the C struct Pixel, with Alpha (opacity).
Definition: i_pixel.h:57
PixelRGBA operator()(double x) const
Definition: i_colormap.h:70
#define KJB_THROW_3(ex, fmt, params)
Definition: l_exception.h:56
Definition: i_colormap.h:42
static std::map< std::string, Preset_map_func > presets_
Definition: i_colormap.h:88
size_t size() const
Definition: i_colormap.h:75
Object thrown when an argument to a function is not acceptable.
Definition: l_exception.h:377
static std::vector< PixelRGBA > hot(int n)
Definition: i_colormap.cpp:96
Colormap(const char *name, int n=64)
Definition: i_colormap.h:51
Support for error handling exception classes in libKJB.