MeVisLabToolboxReference
|
A LUT function mapping the individual channels of the input LUT to the channels of the output LUT. More...
#include <mlLUTFChannelMap.h>
Public Types | |
enum | Map { MAP_NONE = 0, MAP_L, MAP_R, MAP_G, MAP_B, MAP_A, MAP_NUM_VALUES } |
Channel source selector constants and type. More... | |
Public Member Functions | |
LUTFChannelMap (void) | |
Constructor. | |
void | setRGBAMap (Map r, Map g, Map b, Map a) |
Specify channel map for RGB(A) output LUT. | |
void | setLAMap (Map l, Map a) |
Specify channel map for L(A) output LUT. | |
const Map * | getMap (void) const |
Get current channel map. | |
void | setSource (LUTFunction *source) |
Set input LUT function. | |
LUT properties | |
virtual bool | isValid (void) const |
Return true if the LUT function is valid. | |
virtual int | getNativeMinIndex (void) const |
Get native minimum index. | |
virtual int | getNativeMaxIndex (void) const |
Get native maximum index. | |
virtual int | getHeight (void) const |
Get native LUT height (= number of rows, numbering starts at 0) | |
virtual int | getDepth (void) const |
Get native LUT depth (= number of layers, numbering starts at 0) | |
virtual double | getNativeMinValue (void) const |
Get native minimum LUT value. | |
virtual double | getNativeMaxValue (void) const |
Get native maximum LUT value. | |
Protected Member Functions | |
ML_CLASS_HEADER (LUTFChannelMap) | |
LUT implementation | |
virtual bool | renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const |
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers. | |
virtual bool | renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const |
Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers. | |
template<typename T > | |
bool | renderLUT (LUTData< T > *lutData, LUTIterator< T > *lutIterator, double minIndex, double maxIndex, bool rescale) const |
Render a LUT primitive (as selected by the _shape member variable) into lutData using lutIterator to access and increment the LUT pointers. | |
Protected Attributes | |
Map | _map [LUTIteratorBase::MAX_CHANNELS] |
Source channel selectors. | |
LUTFunction * | _source |
Input LUT function. |
A LUT function mapping the individual channels of the input LUT to the channels of the output LUT.
Definition at line 32 of file mlLUTFChannelMap.h.
Channel source selector constants and type.
MAP_NONE |
No source channel. |
MAP_L |
Intensity channel. |
MAP_R | |
MAP_G | |
MAP_B |
Red, green, blue channels. |
MAP_A |
Alpha channel. |
MAP_NUM_VALUES |
Number of selector constants. |
Definition at line 68 of file mlLUTFChannelMap.h.
ml::LUTFChannelMap::LUTFChannelMap | ( | void | ) |
Constructor.
virtual int ml::LUTFChannelMap::getDepth | ( | void | ) | const [virtual] |
Get native LUT depth (= number of layers, numbering starts at 0)
Reimplemented from ml::LUTFunction.
virtual int ml::LUTFChannelMap::getHeight | ( | void | ) | const [virtual] |
Get native LUT height (= number of rows, numbering starts at 0)
Reimplemented from ml::LUTFunction.
const Map* ml::LUTFChannelMap::getMap | ( | void | ) | const [inline] |
Get current channel map.
Definition at line 84 of file mlLUTFChannelMap.h.
virtual int ml::LUTFChannelMap::getNativeMaxIndex | ( | void | ) | const [virtual] |
Get native maximum index.
Reimplemented from ml::LUTFunction.
virtual double ml::LUTFChannelMap::getNativeMaxValue | ( | void | ) | const [virtual] |
Get native maximum LUT value.
Reimplemented from ml::LUTFunction.
virtual int ml::LUTFChannelMap::getNativeMinIndex | ( | void | ) | const [virtual] |
Get native minimum index.
Reimplemented from ml::LUTFunction.
virtual double ml::LUTFChannelMap::getNativeMinValue | ( | void | ) | const [virtual] |
Get native minimum LUT value.
Reimplemented from ml::LUTFunction.
virtual bool ml::LUTFChannelMap::isValid | ( | void | ) | const [virtual] |
Return true if the LUT function is valid.
Reimplemented from ml::LUTFunction.
ml::LUTFChannelMap::ML_CLASS_HEADER | ( | LUTFChannelMap | ) | [protected] |
bool ml::LUTFChannelMap::renderLUT | ( | LUTData< T > * | lutData, |
LUTIterator< T > * | lutIterator, | ||
double | minIndex, | ||
double | maxIndex, | ||
bool | rescale | ||
) | const [protected] |
Render a LUT primitive (as selected by the _shape member variable) into lutData using lutIterator to access and increment the LUT pointers.
Return true if successful.
virtual bool ml::LUTFChannelMap::renderLUTNative | ( | LUTDataBase * | lutData, |
LUTIteratorBase * | lutIterator | ||
) | const [protected, virtual] |
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
Both lutData and lutIterator should be type-cast to a derived, type specific class pointer, according to lutData->getDataType(). Return true if successful.
Implements ml::LUTFunction.
virtual bool ml::LUTFChannelMap::renderLUTRescaled | ( | LUTDataBase * | lutData, |
LUTIteratorBase * | lutIterator, | ||
double | minIndex, | ||
double | maxIndex | ||
) | const [protected, virtual] |
Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers.
Both lutData and lutIterator should be type-cast to a derived, type specific class pointer, according to lutData->getDataType(). The LUT is rendered for range minIndex .. maxIndex, but resampled to the index range specified in lutData. Return true if successful.
Reimplemented from ml::LUTFunction.
Specify channel map for RGB(A) output LUT.
void ml::LUTFChannelMap::setSource | ( | LUTFunction * | source | ) |
Set input LUT function.
Map ml::LUTFChannelMap::_map[LUTIteratorBase::MAX_CHANNELS] [protected] |
Source channel selectors.
Definition at line 122 of file mlLUTFChannelMap.h.
LUTFunction* ml::LUTFChannelMap::_source [protected] |
Input LUT function.
Definition at line 125 of file mlLUTFChannelMap.h.