ImageEn, unit iexBitmaps

TIEBitmap.WhiteValue

TIEBitmap.WhiteValue


Declaration

property BlackValue: double;


Description

Specifies (along with BlackValue) the values range from black to white.

For example, if your image is a gray scale (256 levels) where only values from 100 to 200 are used (100 is black and 200 is white), to display the image you must write:

ImageEnView1.IEBitmap.BlackValue := 100;
ImageEnView1.IEBitmap.WhiteValue := 200;
ImageEnView1.Update();


Valid ranges will depend on the format, e.g.
ie8g, ie24RGB: 0 - 255
ie16g, ie48RGB: 0 - 65535
ie32f: 0.0 - 1.0

Note:
The following pixel formats are supported: ie8g, ie16g, ie24RGB, ie48RGB, ie32f
To automatically set the BlackValue and WhiteValue to the lowest and highest values in the image, call AutoCalcBWValues
To permanently apply the range to the image, use StretchValues
Set both WhiteValue and BlackValue to 0 to disable stretching

Default: 0


Demos

Demo  Demos\Display\DisplayAdjust\Display.dpr
Demo  Demos\InputOutput\DicomRange\Dicom.dpr


Examples

// Calculate Window Center and Width
WindowWidth  := Round( ImageEnView1.IEBitmap.WhiteValue - ImageEnView1.IEBitmap.BlackValue + 1 );
WindowCenter := Round( ImageEnView1.IEBitmap.BlackValue + 0.5 + ( ImageEnView1.IEBitmap.WhiteValue - ImageEnView1.IEBitmap.BlackValue ) / 2 );
Caption := 'WindowWidth: ' + IntToStr( WindowWidth ) + ' - WindowCenter: ' + IntToStr( WindowCenter );

// Set black and white values based on Window Center and Width
ImageEnView1.IEBitmap.BlackValue := WindowCenter - 0.5 - ( WindowWidth - 1) / 2;
ImageEnView1.IEBitmap.WhiteValue := WindowCenter - 0.5 + ( WindowWidth - 1) / 2;


See Also

AutoCalcBWValues
BlackValue
StretchValues
Dicom_WindowCenter
Dicom_WindowWidth
DICOMWindowingStrategy