DGtal  0.9.3beta
Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CColorMap< CMap > Struct Template Reference

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

Collaboration diagram for DGtal::concepts::CColorMap< CMap >:
[legend]

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

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

Definition at line 98 of file CColorMap.h.

Member Function Documentation

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

Definition at line 102 of file CColorMap.h.

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().

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 &t1, const T &t2)

Field Documentation

template<typename CMap >
Color DGtal::concepts::CColorMap< CMap >::myColor
private
template<typename CMap >
Value DGtal::concepts::CColorMap< CMap >::myMax
private
template<typename CMap >
Value DGtal::concepts::CColorMap< CMap >::myMin
private
template<typename CMap >
Value DGtal::concepts::CColorMap< CMap >::myValue
private

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