ImageEn, unit iexBitmaps

TIEDicomRange

TIEDicomRange

Declaration

TIEDicomRange = (iedrAdjust, iedrSetBlackWhite);

Description

Value Description
iedrAdjust Pixel values within the image are scaled to the appropriate visual range
iedrSetBlackWhite Pixel values are maintained, but WhiteValue and BlackValue are set to display the image correctly

Loading Example

ImageEnView1.IO.NativePixelFormat := True;
ImageEnView1.IO.Params.DICOM_Range := iedrSetBlackWhite;
ImageEnView1.IO.LoadFromFile( 'D:\slice91.dcm' );
dcenter := ImageEnView1.IO.Params.DICOM_WindowCenterOffset + StrToFloat( edtLevel.Text );
dMin := dcenter - 0.5 - StrToFloat( edtWidth.Text ) - 1) / 2;
dMax := dcenter - 0.5 + StrToFloat( edtWidth.Text ) - 1) / 2;
ImageEnView1.IEBitmap.BlackValue := dMin;
ImageEnView1.IEBitmap.WhiteValue := dMax;
ImageEnView1.Update();

Saving Example

// Saving a DICOM that was loaded using iedrSetBlackWhite
// The pixel values are automatically stretched to the BlackValue..WhiteValue range, and the Rescale Slope and Rescale Intercept tags are updated
// Note: Do not call IEBitmap.StretchValues() yourself, as the Rescale tags will then be removed
ImageEnView1.IO.SaveToFileDICOM( SaveImageEnDialog1.FileName );