ImageEn, unit iexBitmaps

TIOParams.DICOM_RescaleIntercept

TIOParams.DICOM_RescaleIntercept


Declaration

property DICOM_RescaleIntercept: Double;


Description

Returns the value of the Rescale Intercept tag (0028,1052).
DICOM_RescaleSlope and DICOM_RescaleIntercept define a linear subset of a conceptual Modality LUT transformation.

Note: The DICOM_RescaleIntercept and DICOM_RescaleSlope tags are removed when saving DICOM if DICOM_Range = iedrAdjust


Example

// Calculate the Hounsfield unit for a pixel
// https://en.wikipedia.org/wiki/Hounsfield_scale
// hu = pixel_value * slope + intercept

// Load image
ImageEnView1.IO.NativePixelFormat := True;
ImageEnView1.IO.Params.DICOM_Range := iedrSetBlackWhite;
ImageEnView1.IO.LoadFromFileDICOM(...);

// Get Hounsfield unit
hu := ImageEnView1.IEBitmap.Pixels_ie16g[x, y] * ImageEnView1.IO.IOParams.DICOM_RescaleSlope + ImageEnView1.IO.IOParams.DICOM_RescaleIntercept;