// blog

DICOM Window Center and Width: The Tags Behind Window and Level

Window Center (0028,1050) and Window Width (0028,1051) suggest which range of values to show from black to white, in the rescaled unit (Hounsfield units on CT). A file can carry several pairs, explained by Window Center & Width Explanation (0028,1055), and VOI LUT Function (0028,1056) says whether to apply them as LINEAR (the default), LINEAR_EXACT or SIGMOID. Without them, a viewer computes a window from the image’s values.

Last updated 2 min read

Window Center and Width: one chest CT slice in a lung window (center -600, width 1500) and a soft tissue window (center 40, width 400)

Window and level explained the idea: a CT stores thousands of gray levels, a screen shows a few hundred, so a viewer shows a range. This post is about where that range lives in the file.

The tags

Tag Name Example (our CT sample)
(0028,1050) Window Center 00040\00040
(0028,1051) Window Width 00450\00450
(0028,1055) Window Center & Width Explanation (an MR sample says Algo1)
(0028,1056) VOI LUT Function LINEAR on our DX X-ray

Both values are decimal strings (DS), in the rescaled unit: Hounsfield units on CT, after Rescale Slope and Intercept.

More than one window

Center and Width can each hold several values, separated by backslashes; the first center goes with the first width, and so on. Our CT sample carries the same pair twice. Others carry, say, a soft tissue and a lung window, with the explanation naming them. Use the first as the default and offer the rest.

The exact formula

For LINEAR, the standard defines, with center c, width w, and output from y_min to y_max:

text
if      x <= c - 0.5 - (w - 1) / 2:  y = y_min
else if x >  c - 0.5 + (w - 1) / 2:  y = y_max
else:   y = ((x - (c - 0.5)) / (w - 1) + 0.5) * (y_max - y_min) + y_min

The half-pixel offsets keep it exact for integer data. LINEAR_EXACT drops them: c - w/2 is black, c + w/2 is white. SIGMOID gives an S-curve instead of a straight ramp.

Fast in the browser

Applying that per pixel on every mouse move is slow. Our viewer builds a lookup table with one entry per possible stored value (65,536 for 16-bit), folding in rescale, window and MONOCHROME1 inversion, then maps each pixel with one array read. Dragging the window just rebuilds the table.

When there’s no window

Some files have none, or a useless one. Options, in order:

  1. Modality presets: on CT, lung (-600 / 1500), soft tissue (40 / 400), bone (400 / 1800).
  2. A window from the values in the image, ignoring the extremes (for example the 1st to 99th percentile).
  3. The full range of the stored bits, as a last resort.

Key takeaways

  • (0028,1050) and (0028,1051): center and width, in rescaled units.
  • Several pairs are allowed; (0028,1055) names them; use the first as the default.
  • (0028,1056): LINEAR (default), LINEAR_EXACT or SIGMOID.
  • A lookup table makes window dragging instant.

Drag the window on a real CT →

We’re glad to share what we know. When you want a viewer or portal of your own, we’ll put all of it to work on your project, and because we build with AI-assisted development, it costs far less than you might expect. Let’s talk.

Frequently asked questions

Which window should a viewer show first?

The first pair in the file is the usual default. Offer the others by their explanation, and add your own presets (lung, soft tissue, bone on CT) and an automatic window.

Are the window values in stored units or Hounsfield units?

In the rescaled units: apply Rescale Slope and Intercept first. On CT that means Hounsfield units.

What's the difference between LINEAR and LINEAR_EXACT?

LINEAR, the default, follows the standard's formula with its half-pixel offsets; LINEAR_EXACT maps center minus half the width to black and center plus half the width to white exactly. The difference is tiny but matters when matching another system pixel for pixel.

Sources

  1. DICOM PS3.3: VOI LUT Module (Window Center and Width, VOI LUT Function)