ViewWiki

The world, a little closer

Medical imaging.

An X-ray squashes the whole body into one shadow. A CT scanner takes hundreds from all around and works out a single slice. How?

Explore the scene Interactive article

01 / The experiment

Many shadows. One slice.

Move the slice along the body, change how many angles the scanner measures from, then choose Slice to see the image it rebuilds.

Still of the Medical imaging 3D scene, which explores: How can a computer see a slice of you that no camera ever photographed?
Interactive scene

Loading the interactive version…

The explanation below is available while the scene loads.

A patient in a hospital gown lies face up on the table. Inside, the body is modelled as a phantom of overlapping ellipses of bone, muscle, fat, blood, lung and gas, with X-ray attenuation for about 70 keV. Every view is calculated exactly, and the slice is rebuilt on a 128 × 128 grid.The drum turns about twenty times slower than a real one, the X-ray fan is drawn although X-rays are invisible, and the rebuild treats the rays as parallel, as scanners do after re-sorting their fan. There is no photon noise, scatter or beam hardening.

02 / Four ways in

Shadows, slices, signals and echoes.

Each method measures something different, so each shows some tissues well and others hardly at all.

Broken bones, chest01

X-ray radiograph

One shadow: everything along each line is stacked into a single picture, so it cannot show how deep anything lies.

Measures
X-rays dimmed along each line, from one side
Shows well
Bone and air-filled lungs
Dose
About 0.02 mSv (chest)
Head injury, chest, abdomen02

CT scan

Projections from all round the body are rebuilt by computer into slices, so structures that overlap in a shadow come apart.

Measures
The same dimming, from hundreds of angles
Shows well
Bone, lungs, bleeding, organs, slice by slice
Dose
About 2 to 10 mSv
Brain, spine, joints03

MRI

Radio pulses tip the hydrogen nuclei the magnet has lined up; tissues differ in how fast their signal fades.

Measures
Radio signals from hydrogen nuclei in a strong magnet
Shows well
Soft tissue: brain, ligaments, tumours
Dose
None (no X-rays)
Pregnancy, heart, gallbladder04

Ultrasound

A probe sends pulses of sound and times the echoes from each boundary inside. Bone and gas block the sound.

Measures
Echoes of high-pitched sound from boundaries
Shows well
Soft organs and movement, live
Dose
None (sound waves)
The big idea

A CT slice is never photographed. Each reading is the attenuation added up along one line, and with enough lines from enough angles the computer can work out what lies at every point.

ln(I₀/I) = ∫ μ ds

A shadow stacks everything

A plain X-ray picture is a shadow. X-rays pass through the body to a detector, and wherever they cross bone more of them are stopped, so the bone shows white. But each point of the picture records everything along one straight line through the body: ribs, heart, spine and lungs are piled on top of one another. A shadow cannot tell you how deep anything is.

A CT scanner (computed tomography: drawing by slices) gets round this. Its X-ray tube and a curved row of detectors sit on opposite sides of a ring, the gantry, and spin round the patient two to four times a second. The table slides the body through the ring, and each turn measures one thin slice.

Every reading is a sum along a line

Each detector reading says how strongly the X-rays were dimmed on their way from the tube. Every tissue weakens the beam by a fixed fraction per centimetre, its attenuation. Bone weakens it most, water-rich muscle and organs less, fat a little less again, and the air in the lungs hardly at all. Over a whole path the fractions multiply, so the logarithm of the dimming is simply the sum of the attenuation along the line.

One sweep across the detector, with the tube at one angle, gives a projection: a profile of those sums. Stack the profiles from every angle, one row each, and you get a sinogram. Each point inside the body traces a sine-shaped stripe through it, because its shadow slides from side to side as the tube goes round.

From shadows back to a slice

How do you undo the sums? Take each profile and smear it back across the image along the lines it was measured on. Where many smears from different angles agree, something dense must be there. This back-projection alone gives a blurred image, so each profile is first sharpened by a filter that boosts fine detail and adds a slight dip beside every edge. Summed over every angle, the dips cancel the blur exactly. This filtered back-projection is what the scanner’s computer does, and the mathematics behind it was published by Johann Radon in 1917, long before anyone could use it. Godfrey Hounsfield built the first clinical scanner in 1971.

Try it: choose Head under Slice position, set Projection angles to 6 and choose Slice under Build the slice. Then slide it up to 180 and watch the streaks fade.

Back to the experiment

How many angles?

With only a few views, every sharp edge smears into straight streaks that point back towards the angles that were measured, and the skull or the spine throws spokes across the whole slice. As views are added, the streaks from different directions overlap and cancel, and the real shapes emerge: the black lungs, the bright vertebra, the grey liver and kidneys. A real scanner takes about a thousand views every turn.

The slider also shows why the method cares about dose. Each view needs X-rays, and X-rays can damage cells. A chest CT gives a dose of several millisieverts: about two years of natural background radiation, and a few hundred times a chest X-ray. Scanners are designed to get a clear slice from as few X-rays as they can.

Other ways in

CT shows bone, air and dense tissue sharply, but soft tissues that attenuate X-rays almost equally look nearly the same grey. MRI instead measures radio signals from hydrogen nuclei in a strong magnet, and it tells soft tissues apart with no ionising radiation. Ultrasound times echoes of high-pitched sound bouncing off boundaries inside the body; it is cheap, safe and moving, but it cannot see through bone or gas. Doctors choose the tool by what they need to see.

What this model leaves out

The patient’s insides are modelled as a phantom: ellipses with fixed attenuation values, and its organs carry the brightening of an injected contrast agent, so they stand out a little more than they would without one. The scene computes each view exactly, with no photon noise, scattered X-rays or beam hardening (the low-energy part of the beam being soaked up first), all of which add grain and artefacts to real images. Real scanners measure many slices at once with dozens of detector rows, often while the table moves in a spiral, and use far finer grids than 128 × 128. The drum is slowed down enormously, and the X-ray fan, invisible in reality, is drawn with its brightness compressed so the shadow of the body shows.

Reuse with credit to ViewWiki and a link to this page.

04 / Learn this in a course

Practise it, step by step.

This lesson teaches the topic with checked questions.

  1. Medical imaging Physics · Seeing and sensing