You are here: Start » AVL.NET » AVL.CreatePixelLut(AvlNet.Pixel[], AvlNet.PlainType, int, AvlNet.PixelLut)

AVL.CreatePixelLut(AvlNet.Pixel[], AvlNet.PlainType, int, AvlNet.PixelLut)

Creates LookUp Table from function provided as array of pixels.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void CreatePixelLut(
	AvlNet.Pixel[] inFunction,
	AvlNet.PlainType inOutputType,
	int inOutputDepth,
	out AvlNet.PixelLut outLut
)

Parameters

inFunction
Type: AvlNet.Pixel
inOutputType
Type: AvlNet.PlainType
inOutputDepth
Type: System.Int32
outLut
Type: AvlNet.PixelLut
LUT object, which defines transformation

Description

This operation allows to create LookUp Table to be used with ApplyPixelLut filter. Internal LUT object is created based on provided inFunction, which should consist of pixels with desired values to be in output image after transformation. PixelLut can be created for images of types: INT8, UINT8, INT16, UINT16 and any valid depth (max. 4). inFunction should contain number of Pixel objects equal to number of distinct values in image of inOutputType type. First value in inFunction array is being mapped to lowest possible value of pixel, i.e. when inOutputType is set to UInt8, every pixel with value 0 in input image will be mapped to pixel with index 0 in inFunction, but when inOutputType is set to Int8, every pixel with value -127 in input image of ApplyPixelLut will be mapped to pixel with index 0 in inFunction.

Remarks

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

Errors

Error type Description
DomainError Unsupported output pixel type!
DomainError Empty array on inFunction input in CreatePixelLut

See also