ImageGear for C and C++ on Windows v19.4 - Updated
IG_IP_transform_with_LUT_ex
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_transform_with_LUT_ex

This function transforms the pixel values of the image referenced by hIGear, using a LUT.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_transform_with_LUT_ex(
        HIGEAR hImage, 
        LPAT_RECT lpRect, 
        LPAT_VOID* lpLUTs, 
        AT_INT nLUTNumber, 
        LPAT_INT lpLUTSize, 
        AT_MODE nChannels
);

Arguments:

Name Type Description
hImage HIGEAR Image to transform.
lpRect LPAT_RECT Rectangular portion of the image to process; set to NULL for entire image. Before ImageGear performs this operation, it will check to see if an internal flag has been set to TRUE to make a mask active for this HIGEAR image. If a mask is active, and a valid pointer to a mask can be found, ImageGear will override the settings passed to this structure in favor of the non-rectangular ROI defined by the mask.
lpLUTs LPAT_VOID* Far pointer to a user-supplied Look-Up Table.
nLUTNumber AT_INT Number of LUTs in lpLUTs.
lpLUTSize LPAT_INT Size of every LUT.
nChannels AT_MODE A variable of type AT_MODE (IG_COLOR_COMP_) that tells which color channel to use.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++, with the following restrictions:
Bits per channel must be less than or equal to 16.

Sample:

Image Processing

Remarks:

The pixels from hIGear are used as indices into the LUT. The entry in the LUT at this position is placed into the new image. The function supports images having any number of channels and arbitrary channel depths.

This function, like other ImageGear Image Processing and Clipboard API calls, takes an AT_RECT structure as an argument, so that you can process a rectangular sub-region of an image. However, before ImageGear performs the operation specified by this function, it will check to see if an internal flag has been set to TRUE, indicating that a mask HIGEAR should be used with the image. If the flag is set to TRUE, and a valid pointer to a mask image has been assigned, ImageGear will override the settings passed to the AT_RECT structure and use the non-rectangular ROI defined by the mask HIGEAR. To create a non-rectangular region of interest, call IG_IP_NR_ROI_to_HIGEAR_mask().