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.
Pixel values are adjusted when loading, so use DICOM_PixelToValue to get the original value of a pixel.

Note: When saving DICOM, if the pixel values were adjusted when loading (e.g. DICOM_Range = iedrAdjust), the DICOM_RescaleIntercept and DICOM_RescaleSlope tags are updated so that the adjusted pixel values map back to their original units (e.g. Hounsfield units). Values outside of the window range are clipped. Where this is not possible (e.g. color images) the tags are removed. If you have created the image in code, any Rescale tags you specify in DICOM_Tags are retained

Example

// Calculate the Hounsfield unit for a pixel
// https://en.wikipedia.org/wiki/Hounsfield_scale

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

// Get Hounsfield unit
// Note: Do not calculate this as Pixel * DICOM_RescaleSlope + DICOM_RescaleIntercept, because pixel values are adjusted when loading
hu := ImageEnView1.IO.Params.DICOM_PixelToValue( ImageEnView1.IEBitmap.Pixels_ie16g[x, y] );

See Also

◼DICOM_RescaleSlope
◼DICOM_PixelToValue
◼DICOM_Range