Image Component Library (ICL)
|
Simple 2D indexed LUT Implementation. More...
#include <LUT2D.h>
Public Member Functions | |
LUT2D (RESULT_T(*generator_func)(IDX_T v1, IDX_T v2), IDX_T minVal, IDX_T maxVal) | |
creating a new LUT2D object with given element creation function More... | |
~LUT2D () | |
destructor More... | |
RESULT_T | operator() (IDX_T v1, IDX_T v2) const |
inline access in constant time of data element at (v1,v2) More... | |
Private Attributes | |
RESULT_T * | lut |
int | minVal |
int | range |
Simple 2D indexed LUT Implementation.
The LUT2D template class provides functionalities for aranging 2D index data in a linear array for best and constant access performance, whereby x and y indices are allowed to be in an abitrary integer range [minVal,maxVal].
Internally an array of size RANGEĀ² named "lut" is created. Date element Lookup can be calculated using the following formula ( ):
To enhance access performace, the lut-pointer can be adapted as follows:
Now, data element lookup can be calculated much easier:
A simple ()-operator can be used to access lut elements.
|
inline |
creating a new LUT2D object with given element creation function
|
inline |
destructor
|
inline |
inline access in constant time of data element at (v1,v2)
|
private |
|
private |
|
private |