MRT-130 · Lesson 5 of 12 · 24 min

Image processing and look-up tables

▶ Video coming soon A video version of this lesson is on the way.

Priya Langford had produced a lateral lumbar spine that looked strangely flat: the vertebral bodies were a washed-out gray, and the soft tissue in front of the spine was almost as bright as the bone. The deviation index read −4.8. She was reaching for the repeat button when Joanne Whitcombe asked her to check the examination selected at the console. It said "PA chest". Priya reprocessed the image as a lateral lumbar spine. The vertebrae sharpened into crisp, well-contrasted bone, and the deviation index changed to +0.3. "Same photons," Joanne said. "Same patient, same dose. Different recipe."

This lesson opens the "processing" box in the imaging chain. It explains the corrections applied to every raw image, how the software finds the anatomy and analyzes its histogram, how rescaling gives consistent brightness, how look-up tables and windowing create contrast, and what frequency processing, equalization and noise reduction do. It ends with the technologist’s responsibilities: selecting the right examination, recognizing processing failures, and using post-processing tools honestly.

Two kinds of image: for processing and for presentation

The DICOM standard distinguishes between an image "for processing", the corrected but otherwise unprocessed data from the detector, and an image "for presentation", the processed image intended for viewing. Most departments send only the processed image to PACS; the raw data stays on the acquisition system for a time and may be used for reprocessing or quality control. Knowing the difference matters when you reprocess an image or when a physicist asks for raw data to analyze detector performance.

Seven colored boxes in sequence: Raw data, Detector corrections, Find the anatomy, Rescale (normalize), Contrast LUT, Frequency processing, and For presentation. Under them are notes: for processing image; offset, gain, defect map; collimation edges, histogram; sets EI and consistent brightness; S-shaped curve per examination; edge enhancement, equalization; stored and sent to PACS. A highlighted note reads that selecting the wrong examination at the console changes every step after raw data.
Figure 1. A typical digital radiography processing sequence. Vendors use different names and orders, but the stages are similar.

Step 1: detector corrections

Every detector element responds slightly differently, and some do not respond at all. Before anything else, the system applies the corrections established during calibration, as MRT-120 described. An offset correction subtracts each element’s signal with no exposure (its dark signal). A gain or flat-field correction divides each element’s signal by its relative sensitivity, measured with a uniform exposure. A defect map identifies dead or unreliable elements, rows and columns, and replaces their values by interpolation from their neighbors. In CR, comparable corrections compensate for variations in the light collection along the scan line.

These corrections are invisible when they work. When they fail, because calibration is out of date or the detector has developed new defects, they produce characteristic artifacts such as fixed lines, blotches or a faint grid pattern that appears on every image. Lesson 8 shows how to recognize them.

Step 2: finding the anatomy

Next, the software must work out which part of the image contains useful information. This begins with exposure field recognition: finding the collimation edges, so that the unexposed area outside the field is excluded. Most systems then identify areas of raw, unattenuated beam inside the field, such as the air around a hand, and exclude those too. What is left is the anatomy.

Within the anatomy, the software builds a histogram: a graph of how many pixels have each pixel value. A histogram of a typical radiograph has distinct features, such as a lobe for soft tissue, another for bone, and a spike for the raw beam if any is present. Each examination type has an expected histogram shape stored in the system. The software compares the actual histogram with the expected one to locate the values of interest, the range of pixel values that represent the anatomy the examination is meant to show.

Two graphs side by side. The left graph is a histogram of a raw image, with pixel value from 0 to 4095 on the horizontal axis and number of pixels on the vertical axis. Two broad lobes labeled bone and soft tissue sit inside a shaded band labeled values of interest, anatomy, and a tall narrow spike near 3800 is labeled raw beam outside body. The right graph shows two linear look-up table lines mapping pixel value to displayed brightness from black to white, both crossing at a window level of 2000. A solid line with window width 2000 rises gently; a dashed line with window width 600 rises steeply, labeled more contrast.
Figure 2. Left: a histogram of a raw image with the values of interest. Right: window level and width as a linear look-up table.

This step is where most processing failures begin. If the wrong examination is selected, the expected histogram is wrong, and the software may treat bone as soft tissue or include the raw beam in the values of interest. If collimation is poor, or the collimation edges are not parallel to the detector edges, or several fields are exposed on one CR plate, exposure field recognition can fail. A large metal implant creates a block of very low values that may be mistaken for part of the anatomy. The result is an image with the wrong brightness or contrast, and an exposure indicator that is wrong too, because the exposure indicator is calculated from the same values of interest.

Step 3: rescaling

Once the values of interest are found, the software rescales them to a standard range. This process, also called normalization, is what makes digital images look consistently bright whatever the exposure. If the detector received twice the target exposure, the pixel values of interest are roughly twice as high, and rescaling brings them back to the standard range; if it received half, rescaling raises them. The exposure indicator is calculated at this stage, from the values of interest before rescaling, which is why it reports the detector exposure that rescaling hides.

Rescaling is the mechanism behind both the strength and the hazard described in Lesson 1. It makes the image usable over a vast range of exposures, and it removes the visual feedback that once warned technologists about overexposure.

Step 4: the look-up table

After rescaling, the pixel values still have a low, linear contrast. A look-up table (LUT) converts each rescaled value into a display value, according to a curve chosen for the examination. The LUT gives the image its contrast and character. A typical LUT has an S shape, similar to the old film characteristic curve: steep in the middle to give good contrast for the main anatomy, flatter at the ends to compress very bright and very dark values. Chest LUTs are designed to show lung and mediastinum together; extremity LUTs give higher contrast for bone; abdomen LUTs emphasize soft tissue differences.

Some systems offer several LUTs for the same examination, and some let the user choose a contrast preset. These choices are usually set by the department, with the radiologists, during installation and optimization. Technologists should not change default processing on their own initiative, but they should know what the defaults are and recognize when an image looks wrong for its examination.

Windowing: the viewer’s look-up table

Once the image is displayed, the viewer can apply a further adjustment called windowing. Window level sets the pixel value at the middle of the displayed brightness range; window width sets the range of values spread from black to white. Values below the window are shown black; values above are shown white.

Changing the window level makes the whole image brighter or darker. Changing the window width changes contrast: a narrow width gives high contrast over a small range of values, and a wide width gives low contrast over a large range. Windowing is a linear LUT applied on top of the processing LUT, and it can be changed at any time without altering the stored data.

Worked problem

Reading a window setting

An image has pixel values from 0 to 4,095. The reader sets a window level of 2,000 and a window width of 600. Which pixel values appear black, which white, and which in shades between?

Show solution
  1. The window spans the level plus or minus half the width: 2,000 − 300 = 1,700 to 2,000 + 300 = 2,300.
  2. Values below 1,700 are displayed black.
  3. Values above 2,300 are displayed white.
  4. Values from 1,700 to 2,300 are spread across the full brightness scale.

Answer: Values from 1,700 to 2,300 appear as shades from black to white, giving high contrast within that range; everything below 1,700 is black and everything above 2,300 is white. Detail outside the window is not lost from the data, only hidden from view.

The DICOM header can carry default window level and width values (the attributes Window Center and Window Width), so that the image opens with sensible settings on any workstation. Note that DICOM spells these attribute names in US English in every country, because they are fixed names in the standard.

Step 5: frequency processing

Images contain information at different spatial frequencies. Low frequencies represent broad, gradual changes, such as the overall difference between the thick abdomen and thin lung; high frequencies represent fine detail and sharp edges, such as trabecular bone, fracture lines and the edges of catheters. Frequency processing adjusts these components separately.

Edge enhancement, often using a technique called unsharp masking, boosts high-frequency components to make edges and fine detail more conspicuous. A blurred copy of the image (the "unsharp mask") is subtracted from the original, leaving only the fine detail, which is then added back with extra weight. Modest edge enhancement improves the visibility of fine structures. Too much creates artifacts: a dark halo or rebound around dense objects such as metal implants, which can mimic or hide loosening around a prosthesis, and amplified noise.

Equalization, also called dynamic range compression, does the opposite for low frequencies: it reduces the broad differences between very thick and very thin regions so that both can be shown in one window, while keeping local detail. It lets a single chest image show both the retrocardiac lung and the peripheral lung, or a lateral cervical spine show both C1 and C7. Most modern systems use multiscale or multifrequency processing, which splits the image into many frequency bands and adjusts each one, giving finer control than simple unsharp masking.

Processing steps and their typical failure modes.
Processing stepWhat it doesPossible problem if wrong or excessive
Offset and gain correctionRemoves element-to-element differencesFixed patterns, lines or blotches on every image
Defect mapReplaces dead elements by interpolationDead lines or pixels appear if map is out of date
Exposure field recognitionFinds collimation edgesWrong brightness and EI if edges are missed
Histogram analysisFinds the values of interestFlat or very dark images; misleading EI
RescalingGives consistent brightnessHides overexposure (by design)
Look-up tableGives examination-specific contrastFlat or harsh contrast if the wrong examination is chosen
Edge enhancementSharpens fine detailHalo or rebound around metal; more visible noise
EqualizationCompresses broad brightness differencesFlat, unnatural appearance if excessive
Noise reductionSmooths random fluctuationsLoss of fine detail; a waxy appearance

Noise reduction and other software tools

Many systems apply noise reduction, which smooths random pixel-to-pixel fluctuations while trying to preserve edges. Used appropriately, it allows lower doses for the same perceived quality. Used excessively, it gives images a smooth, waxy look and can erase fine detail. Some vendors offer software that estimates and removes scatter from images taken without a grid, often marketed under vendor-specific names, for situations such as bedside imaging where a grid is difficult to align. Others offer grid line suppression, which removes the pattern of a stationary grid, and image stitching, which joins several exposures into one long image for full-spine or long-leg studies.

These tools can be valuable, but each must be validated by the department, with the medical physicist and radiologists, for the examinations where it is used. Technologists should know which tools are active on their equipment and what their artifacts look like.

Post-processing by the technologist

Technologists routinely apply some post-processing before sending images: confirming the examination, reprocessing if needed, adding annotations, and in some departments adjusting the window or applying an electronic mask. Each of these carries responsibility.

Reprocessing with the correct examination is legitimate and often essential, as Priya found. Electronic masking or cropping, which blacks out the area outside the anatomy, improves the viewing experience by reducing glare from the bright unexposed border, but it must never be used to hide poor collimation. Professional guidance and departmental policies generally require that all anatomy that was irradiated remains available to the radiologist, because masking can hide incidental findings and conceals evidence of a larger field than necessary. Electronic annotations of side or position supplement, and do not replace, the lead anatomical marker placed in the field during the exposure, unless a department’s policy specifically provides otherwise for a situation.

Worked problem

Diagnosing a processing failure

Amara takes an AP shoulder on a patient with a total shoulder replacement. The image looks dark overall, the metal is white, and the bone around the prosthesis has a dark band along the metal edge. The DI is +4.2, although she used the department’s standard technique. What is likely happening?

Show solution
  1. The large metal component produces a block of very low pixel values that can distort histogram analysis, shifting the values of interest and the EI.
  2. A misleading EI and incorrect rescaling can make the image too dark.
  3. The dark band along the metal edge is consistent with a rebound or halo artifact from edge enhancement around a dense object.
  4. The band could mimic lucency around the prosthesis, a sign of loosening.

Answer: Histogram analysis and edge enhancement are being disturbed by the prosthesis. Amara should check the examination selection, try reprocessing (some systems have a setting for metal), consider windowing, and tell the radiologist about the possible halo artifact rather than repeating the exposure.

By the end of the session, the class had a new respect for the console’s examination menu. "It is not a label," Tomasz said. "It is half of the image." Joanne agreed. "The detector gives you the information. The examination you choose decides how it is shown, and how the exposure indicator is calculated. Pick it as carefully as you pick the kVp."

Common mistakes

  • MistakeChanging the window level changes the stored image.

    InsteadWindowing changes only the display; the stored pixel values are unchanged.

  • MistakeA wrong-looking image always means a wrong exposure.

    InsteadWrong examination selection, poor collimation or metal can cause processing failures; reprocess before repeating.

  • MistakeMore edge enhancement is always better.

    InsteadExcessive enhancement amplifies noise and creates halo artifacts that can mimic disease.

  • MistakeElectronic masking can be used to tidy up a large field.

    InsteadMasking must not hide poor collimation; irradiated anatomy should remain available to the radiologist.

  • MistakeThe exposure indicator is calculated independently of processing.

    InsteadIt is calculated from the values of interest found by histogram analysis, so processing errors can distort it.

Summary and key terms

  • Raw images are corrected for offset, gain and defective elements before any other processing.
  • Exposure field recognition and histogram analysis locate the values of interest for the selected examination.
  • Rescaling gives consistent brightness and is the stage at which the exposure indicator is calculated.
  • Look-up tables give examination-specific contrast; window level and width adjust brightness and contrast for viewing.
  • Edge enhancement and equalization adjust high and low spatial frequencies; excess causes halos, noise or flatness.
  • Wrong examination selection, poor collimation and metal are common causes of processing failure.
  • Reprocessing is legitimate; masking must not conceal poor collimation, and electronic annotation supplements lead markers.
Histogram
A graph of the number of pixels at each pixel value.
Values of interest
The range of pixel values representing the anatomy the examination is meant to show.
Exposure field recognition
Automatic detection of the collimated field edges.
Rescaling (normalization)
Mapping the values of interest to a standard range for consistent brightness.
Look-up table (LUT)
A table converting each pixel value into a display value according to a chosen curve.
Window level
The pixel value at the middle of the displayed brightness range.
Window width
The range of pixel values spread from black to white on the display.
Edge enhancement
Processing that boosts high spatial frequencies to sharpen edges and fine detail.
Equalization
Processing that compresses broad brightness differences while keeping local detail.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What are the three main detector corrections?

    Show answer

    Offset (dark) correction, gain (flat-field) correction and defect map interpolation.

  2. A window has level 1,500 and width 1,000. Which values are displayed white?

    Show answer

    Values above 2,000.

  3. Why does selecting the wrong examination affect the exposure indicator?

    Show answer

    The EI is calculated from the values of interest, which histogram analysis finds using the expected histogram for the selected examination.

  4. What artifact can excessive edge enhancement produce around a hip prosthesis?

    Show answer

    A dark halo or rebound band that can mimic loosening.

  5. What does equalization allow in a lateral cervical spine?

    Show answer

    Both the upper and lower cervical spine to be seen in one window despite the large thickness difference.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz