ImageGear for C and C++ on Windows v20.0 - Updated
MED_display_color_limits
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Display Functions > MED_display_color_limits

This function can be used to pseudo-color the brightest and the darkest pixels in a 16-bit grayscale image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_display_color_limits(
        HIGEAR hIGear, 
        const DWORD dwGrpID,
        const INT thresh_low, 
        const INT low_red,
        const INT low_green, 
        const INT low_blue, 
        const INT thresh_high, 
        const INT high_red, 
        const INT high_green, 
        const INT high_blue
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
dwGrpID const DWORD Display group identifier that should be used for display operations.
thresh_low const INT Set to an INT value for the lower pixel value limit. All pixels at or below this value will be pseudo-colored.
low_red const INT Set to an INT for the red component of the RGB color that will be used for all pixels below thresh_low.
low_green const INT Set to an INT for the green component of the RGB color that will be used for all pixels below thresh_low.
low_blue const INT Set to an INT for the blue component of the RGB color that will be used for all pixels below thresh_low.
thresh_high const INT Set to an INT value for the upper pixel value limit. All pixels at or above this value will be pseudo-colored.
high_red const INT Set to an INT for the red component of the RGB color that will be used for all pixels above thresh_high.
high_green const INT Set to an INT for the green component of the RGB color that will be used for all pixels above thresh_high.
high_blue const INT Set to an INT for the blue component of the RGB color that will be used for all pixels above thresh_high.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Remarks:

This is typically used to clearly see pixel values that are over-saturated (255 and up) or under-saturated (0 and below). However, this function lets you customize the settings for the upper and lower pixel value limits with thresh_low and thresh_high.

The color is applied after the 16x8 display LUT is applied to the image and is not affected by altering this LUT.

Pixels having values at or below thresh_low are colored by low_color and pixels having values at or above thresh_high are colored by high_color. All pixels having values within the 2 limits are set to normal linear gray.

To turn off this effect, set thresh_low to -1 and thresh_high to 256.

This function does not cause the image to be displayed or repainted. It only fills the 16x8 LUT. To display the results of this function, use IG_dspl_image_draw().

Is this page helpful?
Yes No
Thanks for your feedback.