20

I have few questions about the rescale slope and rescale intercept in CT DICOM:

  1. Are they used to transfer original data from the scanner to Hounsfield data set, in which water is 0 and air is -1000?
  2. I am in the image display group. How can I know the rescale slope and the rescale intercept values?
  3. What's the exact meaning of the rescale slope and the rescale intercept? How are they determined?
E_net4
  • 27,810
  • 13
  • 101
  • 139
5YrsLaterDBA
  • 33,370
  • 43
  • 136
  • 210

2 Answers2

25

The rescale slope and rescale intercept allow to transform the pixel values to HU or other units, as specified in the tag 0028,1054.

For CT images, the unit should be HU (Hounsfield) and the default value is indeed HU when the tag 0028,1054 is not present. However, the tag may be present and may specify a different unit (OD=optical density, US=unspecified).

The rescale slope and intercept are determined by the manufacturer of the hardware.

If the transformation from original pixel values to Hounsfield or Optical density is not linear, then a LUT is applied.

Check the part 3 of the standard C.11 for more detailed information, and also this answer Window width and center calculation of DICOM image

Community
  • 1
  • 1
Paolo Brandoli
  • 4,681
  • 26
  • 38
  • 2
    The LUT you mentioned is the same as the look table used when mapping to 256 grey scale display for non-colored display? – 5YrsLaterDBA Apr 19 '12 at 15:30
  • 3
    No, is a look up table that maps a monochrome value to another monochrome value, defined by the device manufacturer (Modality LUT). It is defined using the rules used to define other LUTs, but it is in the tag 0028,3000 (Dicom part 3 C11.1). It is used when the transformation from the device's values to the desidered units is not linear – Paolo Brandoli Apr 19 '12 at 17:37
2

This is my implementation:

def window_ct(dcm, w, c, ymin, ymax):
    """Windows a CT slice.
    http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.2.html

    Args:
        dcm (pydicom.dataset.FileDataset):
        w: Window Width parameter.
        c: Window Center parameter.
        ymin: Minimum output value.
        ymax: Maximum output value.

    Returns:
        Windowed slice.
    """
    # convert to HU
    b = dcm.RescaleIntercept
    m = dcm.RescaleSlope
    x = m * dcm.pixel_array + b

    # windowing C.11.2.1.2.1 Default LINEAR Function
    #
    y = np.zeros_like(x)
    y[x <= (c - 0.5 - (w - 1) / 2)] = ymin
    y[x > (c - 0.5 + (w - 1) / 2)] = ymax
    y[(x > (c - 0.5 - (w - 1) / 2)) & (x <= (c - 0.5 + (w - 1) / 2))] = \
        ((x[(x > (c - 0.5 - (w - 1) / 2)) & (x <= (c - 0.5 + (w - 1) / 2))] - (c - 0.5)) / (w - 1) + 0.5) * (
                ymax - ymin) + ymin

    return y
torayeff
  • 9,296
  • 19
  • 69
  • 103