DGtal 1.4.0
|
Aim: A modifier class that quantifies any colormap into a given number of colors. It is particularly useful when rendering colored objects, since for instance blender is very slow to load many different materials. More...
#include <DGtal/io/colormaps/QuantifiedColorMap.h>
Public Types | |
using | ColorMap = TColorMap |
using | Self = QuantifiedColorMap< ColorMap > |
using | Value = typename ColorMap::Value |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CColorMap< TColorMap >)) | |
QuantifiedColorMap (Clone< ColorMap > colormap, int nb=50) | |
Color | operator() (const Value &value) const |
Data Fields | |
ColorMap | myColorMap |
the colormap that is quantified | |
int | myNbColors |
the maximum number of colors | |
Aim: A modifier class that quantifies any colormap into a given number of colors. It is particularly useful when rendering colored objects, since for instance blender is very slow to load many different materials.
Description of template class 'QuantifiedColorMap'
TColorMap | an arbitrary model of concepts::CColorMap. |
Definition at line 66 of file QuantifiedColorMap.h.
using DGtal::QuantifiedColorMap< TColorMap >::ColorMap = TColorMap |
Definition at line 69 of file QuantifiedColorMap.h.
using DGtal::QuantifiedColorMap< TColorMap >::Self = QuantifiedColorMap< ColorMap > |
Definition at line 70 of file QuantifiedColorMap.h.
using DGtal::QuantifiedColorMap< TColorMap >::Value = typename ColorMap::Value |
Definition at line 71 of file QuantifiedColorMap.h.
|
inline |
Constructor from colormap and nb colors
[in] | colormap | the colormap to quantify in nb colors. |
[in] | nb | the targeted maximum number of colors (default is 50). |
Definition at line 79 of file QuantifiedColorMap.h.
DGtal::QuantifiedColorMap< TColorMap >::BOOST_CONCEPT_ASSERT | ( | (concepts::CColorMap< TColorMap >) | ) |
|
inline |
Computes the color associated with a value in a given range.
value | A value within the value range. |
Definition at line 88 of file QuantifiedColorMap.h.
References DGtal::QuantifiedColorMap< TColorMap >::myColorMap, and DGtal::QuantifiedColorMap< TColorMap >::myNbColors.
ColorMap DGtal::QuantifiedColorMap< TColorMap >::myColorMap |
the colormap that is quantified
Definition at line 101 of file QuantifiedColorMap.h.
Referenced by DGtal::QuantifiedColorMap< TColorMap >::operator()().
int DGtal::QuantifiedColorMap< TColorMap >::myNbColors |
the maximum number of colors
Definition at line 103 of file QuantifiedColorMap.h.
Referenced by DGtal::QuantifiedColorMap< TColorMap >::operator()().