ImageGear Professional v18.2 > API Reference Guide > MD Component API Reference > MD Component Objects > IGMedDisplay Object > IGMedDisplay Methods > AdjustContrastFrom Method |
Uses the window/level mapping method to change the contrast of an 9-16-bit image. It takes values for Window Center & Width, and Rescale Slope & Intercept, and it also allows you to apply Gamma correction, if you desire.
This method fills the 16x8 LUT with values that will display a 9-16 bit image according to VOI LUT (Window Center/Width) and Modality LUT (Rescale Intercept/Slope) values that you specify. Any values that have been in the 16x8 LUT are overwritten with these new ones. If the Rescale Slope and Intercept of the image are known, you should provide them. If they are not known, pass in a 1.0 and 0.0, respectively.
If you do not have values for Window Center and Window Width, these can be calculated using the minimum and maximum pixel values (if you have them known). Here are the formulas you should use to display all pixel values:
Window Center = (max + min) / 2;Window Width = (max - min);See also AdjustContrastAutoFrom().
AdjustContrastFrom(pContrast As IGMedContrast)
Name | Description |
---|---|
pContrast | Specifies new contrast settings |
N/A
9..16g
Med