ImageGear Professional > API Reference Guide > MD Component API Reference > MD Component Functions Reference > Image Processing Functions > MED_IP_contrast |
This function converts a 16-bit grayscale image to an 8-bit grayscale image in the same way as MED_display_contrast().
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI MED_IP_contrast( HIGEAR hIGear, const DOUBLE rescale_slope, const DOUBLE rescale_intercept, const LONG window_center, const LONG window_width, const DOUBLE gamma ); |
Name | Type | Description |
hIGear | HIGEAR | 16g image that will have its 16x8 LUT updated. |
rescale_slope | const DOUBLE | Set to the desired value for Rescale Slope (0028,1053). Call MED_DCM_DS_Rescale_get() to obtain this value. |
rescale_intercept | const DOUBLE | Set to the desired value for Rescale Intercept (0028,1054). Call MED_DCM_DS_Rescale_get() to obtain this value. |
window_center | const LONG | Set to the desired value for Window Center (0028,1050). Call MED_DCM_DS_Window_Level_get() to obtain this value. |
window_width | const LONG | Set to the desired value for Window Width (0028,1051). Call MED_DCM_DS_Window_Level_get() to obtain this value. |
gamma | const DOUBLE | Set this to the amount of Gamma correction you would like applied to the image. To turn off Gamma correction, set to 1.0. The valid range of values is any DOUBLE between 0.20-1.80. |
Returns the number of ImageGear errors that occurred during the function call.
Grayscale – 9…16 bpp.
The difference between this function and MED_display_contrast() is that this function permanently alters the pixel values.
See also MED_display_contrast().
The functionality of MED_IP_window_level() has been incorporated into the new function MED_IP_contrast(), which also takes settings for Rescale Slope, Rescale Intercept, and gamma correction. |