ImageGear Professional v18.1 > API Reference Guide > MD Component API Reference > MD Component Functions Reference > Image Processing Functions > MED_IP_contrast_auto |
This function converts a 16-bit grayscale image to an 8-bit grayscale image using the same function as MED_display_contrast_auto() except that this function permanently alters the pixel values.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI MED_IP_contrast_auto( const HIGEAR hIGear, const LPAT_RECT lpRect, const DOUBLE rescale_slope, const DOUBLE rescale_intercept, const DOUBLE gamma, const LONG lReserved_option, LPLONG lpWindow_center, LPLONG lpWindow_width ); |
Name | Type | Description |
hIGear | const HIGEAR | The HIGEAR handle to the image to convert. |
lpRect | const AT_RECT | Use this AT_RECT structure to specify the rectangular portion of the image for which to optimize the contrast on; set to NULL for the whole image. Please see the ImageGear User's Manual if you are unfamiliar with this structure. |
rescale_slope | const DOUBLE | Set to the value of the Data Element, Rescale Slope (0028,1053). You can use MED_DCM_DS_Rescale_get() to obtain this value. If this Data Element is not present in the Data Set, please set this value to 1.0. |
rescale_intercept | const DOUBLE | Set to the value of the Data Element, Rescale Intercept (0028,1054). You can use MED_DCM_DS_Rescale_get() to obtain this value. If this Data Element is not present in the Data Set, please set this value to 0.0. |
gamma | const DOUBLE | Non-linear method to adjust the contrast of DICOM image. In this method, the amount a pixel's intensity changes depends on its original intensity. Usual range is 0.75 to 3.0. |
lReserved_option | const LONG | Reserved for future use; please set to 0 for now. |
lpWindow_center | LPLONG | A far pointer that returns a LONG for the Window Center; set to NULL if you don't need this information. |
lpWindow_width | LPLONG | A far pointer that returns a LONG for the Window Width; set to NULL if you don't need this information. |
Grayscale – 9…16 bpp.
Returns the number of ImageGear errors that occurred during the function call.
MED_IP_reduce_depth_with_downshift()