Skip to content

Instantly share code, notes, and snippets.

@somada141
Last active March 7, 2023 21:43
Show Gist options
  • Save somada141/df9af37e567ba566902e to your computer and use it in GitHub Desktop.
Save somada141/df9af37e567ba566902e to your computer and use it in GitHub Desktop.
Converting CT Data to Hounsfield Units #medical #CT #imagedata #dicom #hounsfield #math

Converting CT Data to Hounsfield Units

The formula is:

hu = pixel_value * slope + intercept

Normally, these values are stored in the DICOM file itself. The tags are generally called the Rescale Slope and Rescale Intercept, and typically have values of 1 and -1024, respectively.

Hounsfield unit

The Hounsfield unit (HU) scale is a linear transformation of the original linear attenuation coefficient measurement in one in which the radiodensity of distilled water at standard pressure and temperature (STP) is defined as zero Hounsfield units (HU), while the radiodensity of air at STP is defined as -1000 HU. For a material X with linear attenuation coefficient μX, the corresponding HU value is therefore given by where is the linear attenuation coefficient of water. Thus, a change of one Hounsfield unit (HU) represents a change of 0.1% of the attenuation coefficient of water since the attenuation coefficient of air is nearly zero. It is the definition for CT scanners that are calibrated with reference to water.

Tissue CT number (HU)
Bone 1000
Liver 40 - 60
White matter ~20-30
Grey matter ~37-45
Blood 40
Muscle 10 - 40
Kidney 30
Cerebrospinal fluid 15
Water 0
Fat -50 - 100
Air -1000

sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment