#include "image.h" #include namespace image { template Image create_lut(int channels, int width, int points, std::vector data) { Image out(data.data(), points, 1, channels); out.resize_bilinear(width, 1, false); return out; } template Image scale_lut(int width, int x0, int x1, Image in) { in.resize(x1 - x0, 1); image::Image out(width, 1, 3); out.fill(0); out.draw_image(0, in, x0, 0); return out; } template Image LUT_jet() { return create_lut(3, 256, 4, {0, 0, std::numeric_limits::max(), std::numeric_limits::max(), 0, std::numeric_limits::max(), std::numeric_limits::max(), 0, std::numeric_limits::max(), std::numeric_limits::max(), 0, 0}); } template Image create_lut(int, int, int, std::vector); template Image create_lut(int, int, int, std::vector); template Image scale_lut(int, int, int, Image); template Image scale_lut(int, int, int, Image); template Image LUT_jet(); template Image LUT_jet(); } // namespace image