Main MRPT website > C++ reference for MRPT 1.5.9
color_maps.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #ifndef color_maps_H
11 #define color_maps_H
12 
13 #include <mrpt/base/link_pragmas.h>
14 
15 namespace mrpt
16 {
17  namespace utils
18  {
19  /** \addtogroup color_maps Color map functions (in #include <mrpt/utils/color_maps.h>)
20  * \ingroup mrpt_base_grp
21  * @{ */
22 
23  /** Transform HSV color components to RGB, all of them in the range [0,1] \sa rgb2hsv */
24  void BASE_IMPEXP hsv2rgb(float h,float s,float v, float &r, float &g,float &b);
25 
26  /** Transform RGB color components to HSV, all of them in the range [0,1] \sa hsv2rgb */
27  void BASE_IMPEXP rgb2hsv(float r,float g,float b, float &h, float &s, float &v );
28 
29  /** Different colormaps for use in mrpt::utils::colormap() */
30  enum TColormap
31  {
34  cmHOT //!< [New in MRPT 1.5.0]
35  };
36 
37  /** Transform a float number in the range [0,1] into RGB components. Different colormaps are available. */
38  void BASE_IMPEXP colormap(
39  const TColormap &color_map,
40  const float color_index,
41  float &r,
42  float &g,
43  float &b);
44 
45  /** Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap. \sa colormap */
46  void BASE_IMPEXP jet2rgb(const float color_index, float &r, float &g, float &b);
47 
48  /** Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap. \sa colormap */
49  void BASE_IMPEXP hot2rgb(const float color_index, float &r, float &g, float &b);
50 
51 
52  /** @} */
53  }
54 }
55 
56 
57 #endif
TColormap
Different colormaps for use in mrpt::utils::colormap()
Definition: color_maps.h:30
[New in MRPT 1.5.0]
Definition: color_maps.h:34
void BASE_IMPEXP 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.
Definition: color_maps.cpp:101
GLdouble s
Definition: glext.h:3602
GLubyte g
Definition: glext.h:5575
GLubyte GLubyte b
Definition: glext.h:5575
const GLdouble * v
Definition: glext.h:3603
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLdouble GLdouble GLdouble r
Definition: glext.h:3618
void BASE_IMPEXP 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...
Definition: color_maps.cpp:163
void BASE_IMPEXP 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...
Definition: color_maps.cpp:129
void BASE_IMPEXP 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: color_maps.cpp:23
void BASE_IMPEXP 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: color_maps.cpp:56



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020