|
DGtal 1.4.0
|
Aim: simple blue to red colormap for distance information for instance. More...
#include <DGtal/io/colormaps/SimpleDistanceColorMap.h>
Public Types | |
| typedef TValue | Value |
| Value type. | |
Public Member Functions | |
| SimpleDistanceColorMap (const SimpleDistanceColorMap &other) | |
| SimpleDistanceColorMap & | operator= (const SimpleDistanceColorMap &anOther) |
| SimpleDistanceColorMap (const Value &amin, const Value &amax, const bool withTick=true) | |
| Color | operator() (const Value &aValue) const |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
| const Value & | min () const |
| const Value & | max () const |
Protected Member Functions | |
| SimpleDistanceColorMap () | |
Protected Attributes | |
| Value | myMin |
| Min value. | |
| Value | myMax |
| Max value. | |
| bool | myTick |
| Boolean to activate/desactivate ticks. | |
Aim: simple blue to red colormap for distance information for instance.
Description of class 'SimpleDistanceColorMap'
Color formula from a fragment shader in https://github.com/dgpdec/course.
| TValue | the value type |
Definition at line 64 of file SimpleDistanceColorMap.h.
| typedef TValue DGtal::SimpleDistanceColorMap< TValue >::Value |
Value type.
Definition at line 70 of file SimpleDistanceColorMap.h.
| DGtal::SimpleDistanceColorMap< TValue >::SimpleDistanceColorMap | ( | const SimpleDistanceColorMap< TValue > & | other | ) |
Copy constructor.
| [in] | other | the object to clone. Forbidden by default. |
|
inline |
Constructor from two min and max values.
| [in] | amin | the minimum value of the range. |
| [in] | amax | the maximum value of the range. |
| [in] | withTick | if true, white ticks are displayed (default true). |
Definition at line 95 of file SimpleDistanceColorMap.h.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
inline |
Checks the validity/consistency of the object.
Definition at line 151 of file SimpleDistanceColorMap.h.
|
inline |
Returns the upper bound of the value range.
Definition at line 168 of file SimpleDistanceColorMap.h.
References DGtal::SimpleDistanceColorMap< TValue >::myMax.
|
inline |
Returns the lower bound of the value range.
Definition at line 158 of file SimpleDistanceColorMap.h.
References DGtal::SimpleDistanceColorMap< TValue >::myMin.
|
inline |
Computes the color associated with a value.
| [in] | aValue | A value within the value range. |
Definition at line 109 of file SimpleDistanceColorMap.h.
References DGtal::NumberTraitsImpl< std::decay< T >::type >::castToDouble(), DGtal::SimpleDistanceColorMap< TValue >::myMax, DGtal::SimpleDistanceColorMap< TValue >::myMin, and DGtal::SimpleDistanceColorMap< TValue >::myTick.
| SimpleDistanceColorMap & DGtal::SimpleDistanceColorMap< TValue >::operator= | ( | const SimpleDistanceColorMap< TValue > & | anOther | ) |
Assignment.
| [in] | anOther | the object to copy. |
| void DGtal::SimpleDistanceColorMap< TValue >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
| [in,out] | out | the output stream where the object is written. |
|
protected |
Max value.
Definition at line 180 of file SimpleDistanceColorMap.h.
Referenced by DGtal::SimpleDistanceColorMap< TValue >::max(), and DGtal::SimpleDistanceColorMap< TValue >::operator()().
|
protected |
Min value.
Definition at line 177 of file SimpleDistanceColorMap.h.
Referenced by DGtal::SimpleDistanceColorMap< TValue >::min(), and DGtal::SimpleDistanceColorMap< TValue >::operator()().
|
protected |
Boolean to activate/desactivate ticks.
Definition at line 183 of file SimpleDistanceColorMap.h.
Referenced by DGtal::SimpleDistanceColorMap< TValue >::operator()().