21 size_t nbValueRow(std::min(nbRow, (
size_t)
p_image.height));
22 size_t nbValueCol(std::min(nbCol, (
size_t)
p_image.width));
24 for(
size_t i(0lu); i < nbValueRow; ++i){
25 for(
size_t j(0lu); j < nbValueCol; ++j){
26 float value(matValue[i*nbCol + j]);
27 color_t red(0), green(0), blue(0), alpha(0);
28 colorMap.
interpolate(red, green, blue, alpha, value);
29 setColor(j, i, red, green, blue, alpha);
void interpolate(color_t &red, color_t &green, color_t &blue, float value) const
Interpolate color by respect to the given value.
void setColor(size_t idxWidth, size_t idxHeight, color_t red, color_t green, color_t blue)
Set the color of the pixel at (idxWidth, idxHeight)