DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CColorMap.h
1
16
17
#pragma once
18
30
31
#if defined(CColorMap_RECURSES)
32
#error Recursive header files inclusion detected in CColorMap.h
33
#else
// defined(CColorMap_RECURSES)
35
#define CColorMap_RECURSES
36
37
#if !defined CColorMap_h
39
#define CColorMap_h
40
42
// Inclusions
43
#include <iostream>
44
#include "boost/concept_check.hpp"
45
#include "DGtal/base/ConceptUtils.h"
46
#include "DGtal/base/CLabel.h"
47
#include "DGtal/base/Common.h"
48
#include "DGtal/io/Color.h"
50
51
namespace
DGtal
52
{
53
namespace
concepts
54
{
56
// class CColorMap
92
template
<
typename
CMap>
93
struct
CColorMap
94
{
95
// ----------------------- Concept checks ------------------------------
96
public
:
97
98
typedef
typename
CMap::Value
Value
;
99
100
BOOST_CONCEPT_ASSERT
((
CLabel<Value>
));
101
102
BOOST_CONCEPT_USAGE
(
CColorMap
)
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
}
108
109
// ------------------------- Private Data --------------------------------
110
private
:
111
112
// ------------------------- Internals ------------------------------------
113
private
:
114
Color
myColor
;
115
Value
myMin
,
myMax
,
myValue
;
116
};
// end of concept CColorMap
117
}
//namespace concepts
118
}
// namespace DGtal
119
120
121
// //
123
124
#endif
// !defined CColorMap_h
125
126
#undef CColorMap_RECURSES
127
#endif
// else defined(CColorMap_RECURSES)
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition
Color.h:77
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CColorMap
Aim: Defines the concept describing a color map. A color map converts a value within a given range in...
Definition
CColorMap.h:94
DGtal::concepts::CColorMap::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CColorMap)
Definition
CColorMap.h:102
DGtal::concepts::CColorMap::myValue
Value myValue
Definition
CColorMap.h:115
DGtal::concepts::CColorMap::myMin
Value myMin
Definition
CColorMap.h:115
DGtal::concepts::CColorMap::myMax
Value myMax
Definition
CColorMap.h:115
DGtal::concepts::CColorMap::myColor
Color myColor
Definition
CColorMap.h:114
DGtal::concepts::CColorMap::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CLabel< Value >))
DGtal::concepts::CColorMap::Value
CMap::Value Value
Definition
CColorMap.h:98
DGtal::concepts::CLabel
Aim: Define the concept of DGtal labels. Models of CLabel can be default-constructible,...
Definition
CLabel.h:93
src
DGtal
io
colormaps
CColorMap.h
Generated on
for DGtal by
1.18.0