Window and level in DICOM

A CT or MR image holds thousands of grey levels. A screen shows 256. Window and level is how you choose which part of the range you see. This page explains the idea, the numbers in your file, and the formula the standard defines.

Last reviewed 18 October 2026. Written by the dicompeek editors; sources are listed at the end.

The problem windowing solves

Pixels in a CT image are usually stored with 12 to 16 bits, so a single value can be one of thousands. A normal display can show only 256 shades of grey, and the eye can tell far fewer apart. If you map the whole stored range onto the screen, soft tissues that differ by a few tens of units end up as the same grey. Windowing picks a band of values, the window, and stretches that band over black to white. Everything below the band is black and everything above it is white.

The window has two numbers. Window width is how wide the band is, which sets the contrast: a narrow window shows small differences strongly; a wide one shows a large range with less contrast. Window level, also called window centre, is the value in the middle of the band, which sets the brightness. Moving the level slides the band along the range.

What the values mean: Hounsfield units

For CT the values mean something physical. The Hounsfield scale is defined so that distilled water is 0 HU and air is −1000 HU. A 12-bit encoding covers −1024 to 3071 HU, which includes air, soft tissue and bone. Pixels are normally stored as raw numbers, and the file carries aRescale Slope (0028,1053) and Rescale Intercept (0028,1052) to convert them:

HU = stored value × slope + intercept

Many CT files use slope 1 and intercept −1024, so a stored 1024 means 0 HU, water. Others store signed values with intercept 0. Either way the formula is the same. Windowing is applied after this conversion, so window numbers for CT are in HU. MR has no calibrated unit, so its windows depend entirely on the scanner and sequence: there are no standard numbers.

The numbers in the file

A file can carry a suggested window in Window Center (0028,1050) and Window Width (0028,1051), sometimes several pairs, with an optional explanation in (0028,1055) such as “brain” or “lung”. If it has none, a viewer has to pick a window itself; dicompeek uses the full range of values in the image. You can read the pairs in the tag viewer.

The formula

The standard defines the default linear window exactly. For a value x, centre c and width w, with the output running fromymin to ymax (0 to 255 on most screens):

if x ≤ c − 0.5 − (w − 1) / 2   then y = ymin
else if x > c − 0.5 + (w − 1) / 2   then y = ymax
else y = ((x − (c − 0.5)) / (w − 1) + 0.5) × (ymax − ymin) + ymin

For example, centre 0 and width 100 gives black at and below −50, white above 49, and a straight ramp in between. The standard adds that a width of 1 acts as a threshold and that a width below 1 is not allowed. It also warns that “window center” and “window width” are not used consistently in practice, which is why the exact definition exists.

Starting values for CT

There is no single correct window, because the right one depends on what you are looking at and on the scanner. Two anchors that are published: CT images of the brain are commonly viewed with a window from 0 to 80 HU (which is level 40, width 80), and a lung example in the Hounsfield scale article uses a level of −700 HU. Other commonly quoted starting points differ between textbooks and sites, so treat any list as a place to start, then adjust by eye.

GoalIdea
Soft tissue, brainNarrow window around the soft-tissue values (for example 0 to 80 HU).
LungLow level (around −700 HU) and a wide window, so air and lung vessels are visible.
BoneHigh level and a wide window, so dense bone shows detail instead of all-white.
Looking for any changeTry a wide window first for orientation, then narrow it.

Try it

Open the viewer, press “Try a sample CT slice” and drag on the image: left and right change the width, up and down change the level, or type numbers into the two boxes. Make the width very small and you get a black and white threshold image; make it very large and the image goes grey.

Related things that look like windowing

Sources

Not for clinical diagnosis. See the medical disclaimer.