Class representing a configurable (HSV) colormap. More...
#include <cmtkColormap.h>
Public Member Functions | |
igsClassParameter (bool, HaveUserMap) | |
Flag for user-defined colormaps. | |
igsClassParameter2Array (Types::DataItem, HueRange) | |
Two-value array defining the Hue range of the colormap. | |
igsClassParameter2Array (cmtk::Types::DataItem, SaturationRange) | |
Two-value array defining the Saturation range of the colormap. | |
igsClassParameter2Array (cmtk::Types::DataItem, ValueRange) | |
Two-value array defining the Value range of the colormap. | |
igsClassParameter (cmtk::Types::DataItem, Gamma) | |
igsClassParameter (int, TableEntries) | |
The number of entries in the colormap, ie. the number of discrete colors. | |
igsClassParameter2Array (cmtk::Types::DataItem, DataRange) | |
Two-value array defining the range of data values to map. | |
igsClassParameter (bool, Reverse) | |
Reverse order of table entries. | |
void | SetStandardColormap (const int index) |
Chose one out of five predefined colormaps. | |
void | Apply (void *const outPtr, const TypedArray *inPtr, const bool generateAlpha=false) |
Apply this colormap to an image to get an RGB presentation. | |
void | SetFromStudy (const Study *study) |
Set colormap parameters from Study object. | |
Static Public Member Functions | |
static Colormap * | New () |
Create new Colormap object. | |
static void | HSV2RGB (RGB &rgb, Types::DataItem H, Types::DataItem S, Types::DataItem V) |
Convert HSV color to RGB. | |
Static Public Attributes | |
static const char * | StandardColormaps [] |
NULL-terminated list of standard colormap names. | |
Protected Member Functions | |
Colormap () | |
Default constructor. | |
virtual | ~Colormap () |
Virtual destructor. | |
virtual void | Execute () |
Execute function. | |
Private Member Functions | |
template<class T > | |
void | ApplyPrimitive (RGB *const outPtr, const T *inPtr, const unsigned int count, const bool paddingFlag, const T paddingData) const |
Apply table lookup for a particular primitive data type. | |
template<class T > | |
void | ApplyPrimitive (RGBA *const outPtr, const T *inPtr, const unsigned int count, const bool paddingFlag, const T paddingData) const |
Apply table lookup with constant alpha for one primitive data type. | |
Private Attributes | |
std::vector< RGB > | LookupTable |
Color lookup table. | |
Types::DataItem | InvDataRangeWidth |
Precomputed scaling factor for data value to table index conversion. | |
SegmentationLabelMap | LabelColorMap |
Label color map: is system-defined by default or can be read from file. |
Class representing a configurable (HSV) colormap.
Ranges for H, S, and V can be defined. For all data values in a given range, colors are interpolated linearly from these ranges. The number of discrete colors can be chosen by the user (default is 256). For any given set of parameters the lookup table is precomputed, so the actual lookup of several subsequent images can be done very efficiently.
Definition at line 61 of file cmtkColormap.h.
virtual cmtk::Colormap::~Colormap | ( | ) | [inline, protected, virtual] |
Virtual destructor.
Definition at line 134 of file cmtkColormap.h.
cmtk::Colormap::igsClassParameter | ( | bool | , |
HaveUserMap | |||
) |
Flag for user-defined colormaps.
cmtk::Colormap::igsClassParameter | ( | bool | , |
Reverse | |||
) |
Reverse order of table entries.
cmtk::Colormap::igsClassParameter | ( | cmtk::Types::DataItem | , |
Gamma | |||
) |
cmtk::Colormap::igsClassParameter | ( | int | , |
TableEntries | |||
) |
The number of entries in the colormap, ie. the number of discrete colors.
cmtk::Colormap::igsClassParameter2Array | ( | cmtk::Types::DataItem | , |
SaturationRange | |||
) |
Two-value array defining the Saturation range of the colormap.
cmtk::Colormap::igsClassParameter2Array | ( | cmtk::Types::DataItem | , |
DataRange | |||
) |
Two-value array defining the range of data values to map.
All values below the lower bound will be mapped to the first color in the table while all values above the upper bound are mapped to the final color in the table.
cmtk::Colormap::igsClassParameter2Array | ( | cmtk::Types::DataItem | , |
ValueRange | |||
) |
Two-value array defining the Value range of the colormap.
cmtk::Colormap::igsClassParameter2Array | ( | Types::DataItem | , |
HueRange | |||
) |
Two-value array defining the Hue range of the colormap.
static Colormap* cmtk::Colormap::New | ( | ) | [inline, static] |
Create new Colormap object.
Definition at line 67 of file cmtkColormap.h.
Referenced by cmtk::QtTriplanarWindow::QtTriplanarWindow().
Precomputed scaling factor for data value to table index conversion.
Definition at line 151 of file cmtkColormap.h.
Label color map: is system-defined by default or can be read from file.
Definition at line 184 of file cmtkColormap.h.
std::vector<RGB> cmtk::Colormap::LookupTable [private] |
Color lookup table.
This array holds the precomputed R, G, and B color components for "TableEntries" distinct data values in the range DataRange[0] throgh DataRange[1].
Definition at line 148 of file cmtkColormap.h.