You are here: Start » AVL.NET » AVL.ApplyPixelLut Method

AVL.ApplyPixelLut Method

Applies previously created Look Up transformation to provided image.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void ApplyPixelLut(
	AvlNet.Image inImage,
	AvlNet.PixelLut inLut,
	out AvlNet.Image outImage
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageImage to which LUT transformation will be applied.
inLutAvlNet.PixelLutLUT object, which defines transformation.
outImageAvlNet.ImageTransformed image.

Description

This filter will apply previously created (by i.e. CreateCustomLut or 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.

Remarks

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.

Standard operations like PowerImage, CorrectGamma and LogarithmImage for images of type Int32 and Real are available in ImagePointTransforms category.

See also