ImageGear Professional for Windows ActiveX
AdjustContrastFrom Method

Description:

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().

Syntax:

      AdjustContrastFrom(pContrast As IGMedContrast)

Parameters:

Name Description
pContrast Specifies new contrast settings

Return Value:

N/A

Bits Per Pixel:

9..16g

Sample:

Med

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback