Applies previously created Look Up transformation to provided image.
void avl::ApplyPixelLut ( const avl::Image& inImage, atl::Optional<const avl::Region&> inRoi, const avl::PixelLut& inLut, avl::Image& outImage )
|inImage||const Image&||Image to which LUT transformation will be applied|
|inRoi||Optional<const Region&>||NIL||Range of pixels to be processed|
|inLut||const PixelLut&||LUT object, which defines transformation|
This filter will apply previously created (by i.e. CreatePowerLut) LookUp Table transformation to inImage. Type and depth of resulting outImage are determined by properties of inLut, which were fixed during creation of LUT.
Generally speaking, LookUp transform should only be applied to monochromatic images. However, ApplyPixelLut allows for transformation of color images, under special conditions:
- inLut has to be created for single channel output
- inImage has to be multichannel (its depth has to be greater than 1)
If those conditions are met, processing steps are as follows: input image is being split into separate channels, every channel is processed by inLut, resulting processed channels are being merged into outImage.
It also possible to apply multichannel LUT to multichannel image, however number of channels (depth) must match, i.e. one can apply LUT of depth 3 to color, 3-channel image.
ApplyPixelLut can work with images of type: INT8, UINT8, INT16, UINT16, INT32, REAL. Operation time can be longer with INT32 and REAL, because LUT is not cached in this case - all calculations are performed during each execution, as opposed to cached execution, when only copying of appropriate values is conducted.
Please note, that one cannot apply custom LUT created for INT32 and REAL types. This would result in storing enormous array of data in-memory and would not be feasible.
List of possible exceptions:
|DomainError||Region exceeds an input image in ApplyPixelLut.|
- 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.