DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
HueShadeColorMap.h
1
16
17
#pragma once
18
30
31
#if defined(HueShadeColorMap_RECURSES)
32
#error Recursive header files inclusion detected in HueShadeColorMap.h
33
#else
// defined(HueShadeColorMap_RECURSES)
35
#define HueShadeColorMap_RECURSES
36
37
#if !defined HueShadeColorMap_h
39
#define HueShadeColorMap_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "Board/Board.h"
46
#include "DGtal/io/Color.h"
47
49
50
namespace
DGtal
51
{
52
54
// template class HueShadeColorMap
89
template
<
typename
PValue,
int
DefaultCycles = 1 >
90
class
HueShadeColorMap
91
{
92
93
public
:
94
95
typedef
PValue
Value
;
96
97
// ----------------------- Standard services ------------------------------
98
public
:
99
107
HueShadeColorMap
(
const
PValue &
min
,
108
const
PValue &
max
,
109
const
unsigned
int
cycles = DefaultCycles );
110
118
Color
operator()
(
const
PValue & value )
const
;
119
123
~HueShadeColorMap
();
124
129
HueShadeColorMap
(
const
HueShadeColorMap
& other );
130
136
HueShadeColorMap
&
operator=
(
const
HueShadeColorMap
& other );
137
138
// ----------------------- Interface --------------------------------------
139
public
:
140
145
void
selfDisplay
( std::ostream & out )
const
;
146
151
bool
isValid
()
const
;
152
158
const
PValue &
min
()
const
;
159
165
const
PValue &
max
()
const
;
166
167
173
void
setCycles
(
int
cycles );
174
175
// ----------------------- Static methods ---------------------------------
176
177
188
static
Color
getColor
(
const
unsigned
int
cycles,
189
const
PValue &
min
,
190
const
PValue &
max
,
191
const
PValue & value );
192
193
// ------------------------- Protected Data ------------------------------
194
private
:
195
196
// ------------------------- Private Data --------------------------------
197
private
:
198
199
// ------------------------- Hidden services ------------------------------
200
protected
:
201
202
PValue
myMin
;
203
PValue
myMax
;
204
unsigned
int
myCycles
;
205
210
HueShadeColorMap
();
211
212
// ------------------------- Internals ------------------------------------
213
private
:
214
215
216
217
};
// end of class HueShadeColorMap
218
219
226
template
<
typename
PValue,
int
DefaultCycles >
227
std::ostream&
228
operator<<
( std::ostream & out,
const
HueShadeColorMap<PValue,DefaultCycles>
&
object
);
229
230
}
// namespace DGtal
231
232
234
// Includes inline functions.
235
#include "DGtal/io/colormaps/HueShadeColorMap.ih"
236
237
// //
239
240
#endif
// !defined HueShadeColorMap_h
241
242
#undef HueShadeColorMap_RECURSES
243
#endif
// else defined(HueShadeColorMap_RECURSES)
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition
Color.h:77
DGtal::HueShadeColorMap
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Definition
HueShadeColorMap.h:91
DGtal::HueShadeColorMap::setCycles
void setCycles(int cycles)
DGtal::HueShadeColorMap::isValid
bool isValid() const
DGtal::HueShadeColorMap::operator()
Color operator()(const PValue &value) const
DGtal::HueShadeColorMap::HueShadeColorMap
HueShadeColorMap()
DGtal::HueShadeColorMap::max
const PValue & max() const
DGtal::HueShadeColorMap::HueShadeColorMap
HueShadeColorMap(const HueShadeColorMap &other)
DGtal::HueShadeColorMap::HueShadeColorMap
HueShadeColorMap(const PValue &min, const PValue &max, const unsigned int cycles=DefaultCycles)
DGtal::HueShadeColorMap::min
const PValue & min() const
DGtal::HueShadeColorMap::myMax
PValue myMax
Definition
HueShadeColorMap.h:203
DGtal::HueShadeColorMap::myMin
PValue myMin
Definition
HueShadeColorMap.h:202
DGtal::HueShadeColorMap::~HueShadeColorMap
~HueShadeColorMap()
DGtal::HueShadeColorMap::operator=
HueShadeColorMap & operator=(const HueShadeColorMap &other)
DGtal::HueShadeColorMap::Value
PValue Value
Definition
HueShadeColorMap.h:95
DGtal::HueShadeColorMap::myCycles
unsigned int myCycles
Definition
HueShadeColorMap.h:204
DGtal::HueShadeColorMap::getColor
static Color getColor(const unsigned int cycles, const PValue &min, const PValue &max, const PValue &value)
DGtal::HueShadeColorMap::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
src
DGtal
io
colormaps
HueShadeColorMap.h
Generated on
for DGtal by
1.18.0