You are here: Start » Function Reference » Image Look Up Tables » CreateCustomLut
CreateCustomLut
Creates Look Up Table for user provided operation on image pixels.
Header: | AVL.h |
---|
Syntax
void avl::CreateCustomLut ( const LutOperatorType& inLutFunction, const avl::PlainType::Type& inOutputType, avl::PixelLut& outLut )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inLutFunction | const LutOperatorType& | |||
inOutputType | const PlainType::Type& | |||
outLut | PixelLut& |
Description
This function creates custom Look Up Table from function provided by user in form of callable.
Function to use can be passed as pointer to function, callable object (object with operator() defined) or lambda expression. Only requirement for such callable is for it to accept single parameter of type float and return value of type float.
Value passed to provided function is value of pixel. Value returned from provided function is value demanded from LUT being created.
CreateCustomLut will apply provided function on all possible values of inOutputType type and cache them in internal structure. Such PixelLut object can be then passed to ApplyPixelLut.
CreateCustomLut can create Look Up Tables for the following types: Int8, UInt8, Int16, UInt16.
Remarks
Standard operations like PowerImage, CorrectGamma and LogarithmImage for images of type Int32 and Real are available in Image Point Transforms category.
Errors
Error type | Description |
---|---|
DomainError | Cannon create LUT with empty operator! |
See Also
- ApplyPixelLut – Applies previously created Look Up transformation to provided image.
- CreateGammaCorrectionLut – Creates Look Up Table for gamma correction operation on image pixels.
- CreateLogarithmLut – Creates Look Up Table for logarithm operation on image pixels.
- CreatePowerLut – Creates Look Up Table for power operation on image pixels.