#include <mlLUTFLinear.h>

Public Types | |
| enum | ColorInterpolation { InterpolateRGB, InterpolateHLS, InterpolateHLSpos, InterpolateHLSneg, InterpolateConstant, numColorInterpolation } |
| Color interpolation constants. More... | |
Public Member Functions | |
| LUTFLinear (void) | |
| Constructor. | |
LUT parameters | |
| virtual bool | setPoints (const LUTRGBAPointList &points) |
| Set table with sampling points, data is copied to internal storage. | |
| const LUTRGBAPointList & | getPoints () const |
| Get sampling point table as a const reference. | |
| LUTRGBAPointList & | getModifiablePoints () |
| Get modifiable sampling point table. | |
| void | setVisualType (LUTVisualType visualType) |
| Set the visual type of the table (this affects how the points in the list are handled). | |
| int | insertPoint (const LUTRGBAPoint &point) |
| Insert a given point and return the resulting index in the sampling point table. | |
| void | removePoint (int idx) |
| Remove the point at the given index. | |
| const LUTRGBAPoint & | getPoint (int idx) const |
| Get a point at given index. | |
| void | setPoint (int idx, const LUTRGBAPoint &point) |
| Set a point at given index, does not check if position is correct! | |
| virtual double | getStartIndex (void) const |
| Get start index. | |
| virtual double | getEndIndex (void) const |
| Get end index. | |
| virtual ColorInterpolation | getColorInterpolation (void) const |
| Get color interpolation mode. | |
| virtual void | setColorInterpolation (ColorInterpolation c) |
| Set color interpolation mode. | |
| void | setAlphaFactor (float factor) |
| Set the global alpha factor (default is 1.). | |
| float | getAlphaFactor () const |
| Get the global alpha factor. | |
| bool | relativeUsesNativeRange () const |
| Return true if the native index range (given by the first and last index position in the sampling point table) is used as the range for relative mapping, If set to false, [0,1] is used (default is false). | |
| void | setRelativeUsesNativeRange (bool flag) |
| Specify whether the native index range (given by the first and last index position in the sampling point table) is used as the range for relative mapping, If set to false, [0,1] is used (default is false). | |
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. | |
Static Public Attributes | |
| static const char * | ColorInterpolationNames [numColorInterpolation] |
| Color interpolation constant names. | |
Protected Member Functions | |
| void | copyPoint (int idx, double *array) const |
| Copy the point at table index idx to the given array (ordered like in the LUTIterator). | |
| ML_CLASS_HEADER (LUTFLinear) | |
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 startIndex, double endIndex) const |
| Render the LUT table between startIndex and endIndex into lutData using lutIterator to access and increment the LUT pointers. | |
Protected Attributes | |
| LUTRGBAPointList | _points |
| LUT sampling point table. | |
| float | _alphaFactor |
| Global alpha factor. | |
| bool | _relativeUsesNativeRange |
| Flag specifying whether the native index range is used as the range for relative mapping, If set to false, [0,1] is used (default is false). | |
| ColorInterpolation | _colorInterpolation |
| Color interpolation mode. | |
Definition at line 114 of file mlLUTFLinear.h.
Color interpolation constants.
Definition at line 119 of file mlLUTFLinear.h.
| ml::LUTFLinear::LUTFLinear | ( | void | ) |
Constructor.
| void ml::LUTFLinear::copyPoint | ( | int | idx, | |
| double * | array | |||
| ) | const [protected] |
Copy the point at table index idx to the given array (ordered like in the LUTIterator).
| float ml::LUTFLinear::getAlphaFactor | ( | ) | const [inline] |
| virtual ColorInterpolation ml::LUTFLinear::getColorInterpolation | ( | void | ) | const [inline, virtual] |
| virtual double ml::LUTFLinear::getEndIndex | ( | void | ) | const [virtual] |
Get end index.
| LUTRGBAPointList& ml::LUTFLinear::getModifiablePoints | ( | ) | [inline] |
Get modifiable sampling point table.
Make sure that you keep the order of the points and that you call changed() after each change to the table.
Definition at line 149 of file mlLUTFLinear.h.
| virtual int ml::LUTFLinear::getNativeMaxIndex | ( | void | ) | const [virtual] |
| virtual int ml::LUTFLinear::getNativeMinIndex | ( | void | ) | const [virtual] |
| const LUTRGBAPoint& ml::LUTFLinear::getPoint | ( | int | idx | ) | const |
Get a point at given index.
| const LUTRGBAPointList& ml::LUTFLinear::getPoints | ( | ) | const [inline] |
| virtual double ml::LUTFLinear::getStartIndex | ( | void | ) | const [virtual] |
Get start index.
| int ml::LUTFLinear::insertPoint | ( | const LUTRGBAPoint & | point | ) |
Insert a given point and return the resulting index in the sampling point table.
| virtual bool ml::LUTFLinear::isValid | ( | void | ) | const [virtual] |
| ml::LUTFLinear::ML_CLASS_HEADER | ( | LUTFLinear | ) | [protected] |
| bool ml::LUTFLinear::relativeUsesNativeRange | ( | ) | const [inline] |
Return true if the native index range (given by the first and last index position in the sampling point table) is used as the range for relative mapping, If set to false, [0,1] is used (default is false).
Definition at line 191 of file mlLUTFLinear.h.
| void ml::LUTFLinear::removePoint | ( | int | idx | ) |
Remove the point at the given index.
| bool ml::LUTFLinear::renderLUT | ( | LUTData< T > * | lutData, | |
| LUTIterator< T > * | lutIterator, | |||
| double | startIndex, | |||
| double | endIndex | |||
| ) | const [inline, protected] |
Render the LUT table between startIndex and endIndex into lutData using lutIterator to access and increment the LUT pointers.
Return true if successful.
| virtual bool ml::LUTFLinear::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::LUTFLinear::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.
| void ml::LUTFLinear::setAlphaFactor | ( | float | factor | ) | [inline] |
Set the global alpha factor (default is 1.).
Definition at line 179 of file mlLUTFLinear.h.
References ml::LUTFunction::changed().
| virtual void ml::LUTFLinear::setColorInterpolation | ( | ColorInterpolation | c | ) | [inline, virtual] |
Set color interpolation mode.
Definition at line 176 of file mlLUTFLinear.h.
References ml::LUTFunction::changed().
| void ml::LUTFLinear::setPoint | ( | int | idx, | |
| const LUTRGBAPoint & | point | |||
| ) |
Set a point at given index, does not check if position is correct!
| virtual bool ml::LUTFLinear::setPoints | ( | const LUTRGBAPointList & | points | ) | [virtual] |
Set table with sampling points, data is copied to internal storage.
Returns true if successful.
| void ml::LUTFLinear::setRelativeUsesNativeRange | ( | bool | flag | ) | [inline] |
Specify whether the native index range (given by the first and last index position in the sampling point table) is used as the range for relative mapping, If set to false, [0,1] is used (default is false).
Definition at line 195 of file mlLUTFLinear.h.
| void ml::LUTFLinear::setVisualType | ( | LUTVisualType | visualType | ) | [inline] |
Set the visual type of the table (this affects how the points in the list are handled).
Definition at line 152 of file mlLUTFLinear.h.
References ml::LUTFunction::changed().
float ml::LUTFLinear::_alphaFactor [protected] |
LUTRGBAPointList ml::LUTFLinear::_points [protected] |
bool ml::LUTFLinear::_relativeUsesNativeRange [protected] |
Flag specifying whether the native index range is used as the range for relative mapping, If set to false, [0,1] is used (default is false).
Definition at line 257 of file mlLUTFLinear.h.
const char* ml::LUTFLinear::ColorInterpolationNames[numColorInterpolation] [static] |
1.5.8