TIOParams.DICOM_RescaleSlope
TIOParams.DICOM_RescaleSlope
Declaration
property DICOM_RescaleSlope: Double;
Description
Returns the value of the Rescale Slope tag (0028,1053).
Rescale Slope and
DICOM_RescaleIntercept define a linear subset of a conceptual Modality LUT transformation.
Note: The
DICOM_RescaleSlope and
DICOM_RescaleIntercept tags are removed when saving DICOM if
DICOM_Range = iedrAdjust
// 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;