![]() |
anatomist 6.0.18
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 209 of file colortraits.h.
|
inline |
Constructor for 1D palettes.
Scaling parameters are processed, and should be passed carefully:
mini / maxi are min and max values used to address the colormap from a source space. They can be either double float texture values, or indices used to build in a colormap or texture image. The methods color() and paletteCoords() get their parameters in this space.
For zero-centered palettes, a technical issue currently makes it mandatory to use positive and negative velues here.
Definition at line 221 of file colortraits.h.
|
inline |
Definition at line 229 of file colortraits.h.
|
inline |
returns a black / transparent / zero color
Definition at line 235 of file colortraits.h.
|
inline |
Definition at line 249 of file colortraits.h.
|
inline |
Definition at line 256 of file colortraits.h.
|
inline |
Definition at line 263 of file colortraits.h.
|
inline |
Definition at line 241 of file colortraits.h.