![]() |
anatomist 6.0.4
3D neuroimaging data viewer
|
Converter value -> RGBA (high-level) More...
#include <anatomist/color/colortraits.h>
Public Member Functions | |
| ColorTraits (const AObjectPalette *palette, const T &mini, const T &maxi, const T &mini2, const T &maxi2, double min1, double max1, double zero1, double min2, double max2, double zero2) | |
| Constructor for 2D palettes. | |
| ColorTraits (const AObjectPalette *palette, const T &mini, const T &maxi, double min1, double max1, double zero1) | |
| Constructor for 1D palettes. | |
| AimsRGBA | color (const T &) const |
| T | neutralColor () const |
| returns a black / transparent / zero color | |
| void | paletteCoords (double val0, double val1, int &px, int &py) const |
| void | paletteCoord (int dim, double val0, int &px) const |
| void | paletteCoord0 (double val0, int &px) const |
| void | paletteCoord1 (double val0, int &px) const |
Converter value -> RGBA (high-level)
Colormap helper.
Allows to get rescalings to colormap space. Basically the color() method associates a RGBA color to a scalar value. To do so, values rescalings apply, and lookup in a colormap (AObjectPalette) returns the actual color.
Implementations for RGB/RGBA transforms also exist.
mini / maxi are min and max indexes used to address the colormap (let's call it "output colormap").
min1 / max1 are the range (as in AObjectPalette::min1()/max1() actually mapped to the colormap. Generally we use palette.min1()/max1()
Definition at line 129 of file colortraits.h.
|
inline |
Constructor for 2D palettes.
Definition at line 206 of file colortraits.h.
|
inline |
Constructor for 1D palettes.
Scaling parameters are processed, and should be passed carefully:
Definition at line 218 of file colortraits.h.
|
inline |
Definition at line 226 of file colortraits.h.
|
inline |
returns a black / transparent / zero color
Definition at line 232 of file colortraits.h.
|
inline |
Definition at line 246 of file colortraits.h.
|
inline |
Definition at line 253 of file colortraits.h.
|
inline |
Definition at line 260 of file colortraits.h.
|
inline |
Definition at line 238 of file colortraits.h.