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 | |
~LUT2D () | |
destructor | |
RESULT_T | operator() (IDX_T v1, IDX_T v2) const |
inline access in constant time of data element at (v1,v2) | |
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.
icl::filter::LUT2D< RESULT_T, IDX_T >::LUT2D | ( | RESULT_T(*)(IDX_T v1, IDX_T v2) | generator_func, |
IDX_T | minVal, | ||
IDX_T | maxVal | ||
) | [inline] |
creating a new LUT2D object with given element creation function
icl::filter::LUT2D< RESULT_T, IDX_T >::~LUT2D | ( | ) | [inline] |
destructor
RESULT_T icl::filter::LUT2D< RESULT_T, IDX_T >::operator() | ( | IDX_T | v1, |
IDX_T | v2 | ||
) | const [inline] |
inline access in constant time of data element at (v1,v2)
RESULT_T* icl::filter::LUT2D< RESULT_T, IDX_T >::lut [private] |
int icl::filter::LUT2D< RESULT_T, IDX_T >::minVal [private] |
int icl::filter::LUT2D< RESULT_T, IDX_T >::range [private] |