DGtal  1.5.beta
DGtal::concepts::CColorMap< CMap > Struct Template Reference

Aim: Defines the concept describing a color map. A color map converts a value within a given range into an RGB triple. More...

#include <DGtal/io/colormaps/CColorMap.h>

Public Types

typedef CMap::Value Value
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CLabel< Value >))
 
 BOOST_CONCEPT_USAGE (CColorMap)
 

Private Attributes

Color myColor
 
Value myMin
 
Value myMax
 
Value myValue
 

Detailed Description

template<typename CMap>
struct DGtal::concepts::CColorMap< CMap >

Aim: Defines the concept describing a color map. A color map converts a value within a given range into an RGB triple.

Description of concept 'CColorMap'

Refinement of

Associated types

Notation

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
Construction CMap<Value> cmap(min, max); min and max are of the same Value
Obtain a color color = cmap(value) value is a Value DGtal::Color min ≤ value ≤ max Returns a color computed after the position of value within the range [min,max]

Invariants

Models

GradientColorMap HueShadeColorMap ColorBrightnessColorMap GrayScaleColorMap RandomColorMap

Notes

Definition at line 93 of file CColorMap.h.

Member Typedef Documentation

◆ Value

template<typename CMap >
typedef CMap::Value DGtal::concepts::CColorMap< CMap >::Value

Definition at line 98 of file CColorMap.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename CMap >
DGtal::concepts::CColorMap< CMap >::BOOST_CONCEPT_ASSERT ( (CLabel< Value >)  )

◆ BOOST_CONCEPT_USAGE()

template<typename CMap >
DGtal::concepts::CColorMap< CMap >::BOOST_CONCEPT_USAGE ( CColorMap< CMap >  )
inline

Definition at line 102 of file CColorMap.h.

103  {
104  CMap myCMap( myMin, myMax );
105  // operator() exists, takes a Value, and returns a LibBoard::Color.
106  ConceptUtils::sameType( myColor, myCMap.operator()( myValue ) );
107  }
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117

References DGtal::concepts::CColorMap< CMap >::myColor, DGtal::concepts::CColorMap< CMap >::myMax, DGtal::concepts::CColorMap< CMap >::myMin, DGtal::concepts::CColorMap< CMap >::myValue, and DGtal::concepts::ConceptUtils::sameType().

Field Documentation

◆ myColor

template<typename CMap >
Color DGtal::concepts::CColorMap< CMap >::myColor
private

◆ myMax

template<typename CMap >
Value DGtal::concepts::CColorMap< CMap >::myMax
private

◆ myMin

template<typename CMap >
Value DGtal::concepts::CColorMap< CMap >::myMin
private

◆ myValue

template<typename CMap >
Value DGtal::concepts::CColorMap< CMap >::myValue
private

The documentation for this struct was generated from the following file: