Enumerations | |
enum | mrpt::utils::TColormap { mrpt::utils::cmGRAYSCALE = 0, mrpt::utils::cmJET, mrpt::utils::cmHOT } |
Different colormaps for use in mrpt::utils::colormap() More... | |
Functions | |
void | mrpt::utils::hsv2rgb (float h, float s, float v, float &r, float &g, float &b) |
Transform HSV color components to RGB, all of them in the range [0,1]. More... | |
void | mrpt::utils::rgb2hsv (float r, float g, float b, float &h, float &s, float &v) |
Transform RGB color components to HSV, all of them in the range [0,1]. More... | |
void | mrpt::utils::colormap (const TColormap &color_map, const float color_index, float &r, float &g, float &b) |
Transform a float number in the range [0,1] into RGB components. More... | |
void | mrpt::utils::jet2rgb (const float color_index, float &r, float &g, float &b) |
Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap. More... | |
void | mrpt::utils::hot2rgb (const float color_index, float &r, float &g, float &b) |
Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap. More... | |
Different colormaps for use in mrpt::utils::colormap()
Enumerator | |
---|---|
cmGRAYSCALE | |
cmJET | |
cmHOT | [New in MRPT 1.5.0] |
Definition at line 31 of file color_maps.h.
void mrpt::mrpt::utils::colormap | ( | const TColormap & | color_map, |
const float | color_index, | ||
float & | r, | ||
float & | g, | ||
float & | b | ||
) |
Transform a float number in the range [0,1] into RGB components.
Different colormaps are available.
Definition at line 115 of file color_maps.cpp.
References mrpt::utils::cmGRAYSCALE, mrpt::utils::cmHOT, mrpt::utils::cmJET, mrpt::utils::hot2rgb(), mrpt::utils::jet2rgb(), MRPT_END, MRPT_START, and THROW_EXCEPTION.
Referenced by mrpt::opengl::CColorBar::Create(), create_colormap(), mrpt::maps::CHeightGridMap2D::getAs3DObject(), mrpt::opengl::CPointCloudColoured::recolorizeByCoordinate(), mrpt::opengl::CColorBar::render_dl(), mrpt::opengl::CMeshFast::render_dl(), mrpt::opengl::CColorBar::setColormap(), and mrpt::opengl::CMesh::updateTriangles().
void mrpt::mrpt::utils::hot2rgb | ( | const float | color_index, |
float & | r, | ||
float & | g, | ||
float & | b | ||
) |
Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap.
Definition at line 206 of file color_maps.cpp.
References mrpt::math::interpolate().
Referenced by mrpt::utils::colormap().
void mrpt::mrpt::utils::hsv2rgb | ( | float | h, |
float | s, | ||
float | v, | ||
float & | r, | ||
float & | g, | ||
float & | b | ||
) |
Transform HSV color components to RGB, all of them in the range [0,1].
Definition at line 22 of file color_maps.cpp.
References min.
void mrpt::mrpt::utils::jet2rgb | ( | const float | color_index, |
float & | r, | ||
float & | g, | ||
float & | b | ||
) |
Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap.
Definition at line 140 of file color_maps.cpp.
References mrpt::math::interpolate().
Referenced by mrpt::utils::colormap(), mrpt::maps::CRandomFieldGridMap2D::getAs3DObject(), mrpt::maps::CGasConcentrationGridMap2D::getWindAs3DObject(), mrpt::maps::detail::pointmap_traits< CColouredPointsMap >::internal_loadFromRangeScan2D_prepareOneRange(), and mrpt::maps::detail::pointmap_traits< CColouredPointsMap >::internal_loadFromRangeScan3D_prepareOneRange().
void mrpt::mrpt::utils::rgb2hsv | ( | float | r, |
float | g, | ||
float | b, | ||
float & | h, | ||
float & | s, | ||
float & | v | ||
) |
Transform RGB color components to HSV, all of them in the range [0,1].
Definition at line 74 of file color_maps.cpp.
References mrpt::utils::max3(), min, and mrpt::utils::min3().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |