What makes it tick

Medical imaging

GitHub

How an MRI scanner works

A giant magnet, a radio pulse and the hydrogen in your body: how a scanner hears a faint echo and turns it into a picture.

01

A tunnel that listens to your body

This is an MRI scanner. MRI is short for magnetic resonance imaging. Its magnet has a strength of 1.5 tesla. The tesla is the unit for how strong a magnetic field is. You lie on the table, and it slides you into the bore, a tunnel about 70 cm wide. The machine around it is about 1.6 to 1.9 m long and weighs 3 to 6 tonnes.

For a brain scan, a head coil sits around your head like a cage. It is an antenna with 20 to 64 small receivers. They listen for a faint radio echo from your body. The room is lined with copper sheet, so outside radio waves cannot drown out that echo. There are no X-rays here. The scanner's radio waves carry about 50 million times too little energy to knock an electron out of an atom.

Under the white cover, the parts sit one inside the other like rings. From the outside in, you find the magnet in its cold jacket, three gradient coils and the body coil, a radio antenna. Switch on the cutaway (C) to open a wedge of the magnet and see them. The next chapters take them one at a time.

The model plays one repetition. That is the short cycle a scan runs again and again to build one picture. Here one repetition lasts 0.5 to 2.5 s of real time, but the radio pulses inside it take only milliseconds. So the timeline is not to scale. The few milliseconds of pulses and echo fill about two thirds of it, and the long rest is squeezed into the last third. The timeline shows which step is playing, and the live readings show the real time. A whole head exam, with many pictures, takes about 30 to 45 minutes.

Main field
1.5 T, always on
Tunnel width
70 cm across

02

A magnet that never switches off

The biggest part is the main magnet: about 30 to 40 km of niobium-titanium wire wound into coils. When this wire is cooled far enough, it becomes superconducting. That means current flows through it with no resistance at all. Several hundred amperes run round and round in a closed loop. Once the loop is closed, keeping the field going takes no power. The field fades by less than a tenth of a percent in a year.

To stay superconducting, the coils sit in liquid helium at 4.2 kelvin (K), about −269 °C. Kelvin is a temperature scale that starts at absolute zero, the coldest anything can get. So the helium is only about 1.5 K warmer than deep space. A classic magnet holds about 1,500 litres of it, while newer sealed magnets need 7 litres or even less. Around the helium vessel, a heat shield and a vacuum keep the warmth out, like a thermos flask. The open wedge shows these layers. A small fridge on top, the cold head, turns boiled-off helium back into liquid. It runs day and night and draws about 6 to 7 kW.

The field is tens of thousands of times stronger than Earth's. The exact number depends on where you are, because Earth's own field differs from place to place. Pick 3 T to compare a stronger magnet. The lines around the magnet show the shape of its field. Extra shield coils on the outside carry current the other way and pull back the field that leaks out. Even so, the field stays above 0.5 mT, half a thousandth of a tesla, up to about 4 m along the tunnel. Inside that zone, a pacemaker may stop working safely. The dashed ring on the floor marks its edge.

The magnet never switches off, so a lit sign at the door warns that it is always on. Anything with iron in it can fly into the tunnel, and oxygen tanks have killed people this way. That is why staff check everyone and everything at the door. If the wire warms up somewhere, it stops superconducting and the current turns into heat. This is called a quench. The field drops to zero in 2 to 5 seconds, and the boiling helium roars out of the building through the quench pipe.

Against Earth's field
23,000 to 60,000 times stronger
Liquid helium
4.2 K, −269 °C
0.5 mT safety line
4 m along the tunnel, 2.5 m to the side

03

Hydrogen leans and wobbles

About six in ten atoms in your body are hydrogen, mostly in water and fat. The core of a hydrogen atom, its nucleus, is a single proton. It behaves like a tiny magnet. MRI listens to hydrogen because it is everywhere and gives the strongest signal.

In the field, each tiny magnet does not simply point along it. Instead it precesses: it wobbles around the field direction like a tilted spinning top. At 1.5 T it wobbles about 64 million times a second, or 63.9 MHz (megahertz). This rate is the Larmor frequency, the pitch of the wobble. It rises with the field, to 127.7 MHz at 3 T. Both are close to FM radio: one just below the band, the other just above it.

The nuclei do not all line up. Body heat jostles them, so they point in almost every direction. Only about 5 in a million more lean with the field than against it. Still, that small surplus adds up to about 3.3 × 10¹⁴ nuclei in one cubic millimetre of water. Together they make a tiny net magnet. That is the arrow the scanner works with.

The arrows in the inset are a drawing, enlarged many times. They are not a real spot in the head, and they show the lean much stronger than it is, so you can see it. Press play to watch them turn. The drawing is slowed down enormously, and the reading shows by how much. That number follows the playback speed. Switch to 3 T: the real frequency and the surplus double, but the drawing keeps its pace, so the slowdown doubles too.

Larmor frequency
63.9 MHz, just below FM radio
Extra nuclei leaning with the field
about 5 in a million
Surplus in 1 mm³ of water
about 3.3 × 10¹⁴
Drawing slowed down
about 128 million times

04

A radio pulse and its echo

To make the net magnet speak, the scanner sends a short radio pulse at exactly the Larmor frequency. Matching the wobble like this is called resonance. It is like pushing a child on a swing at just the right moment. The pulse comes from the body coil, a cage of copper rungs just inside the tunnel. It lasts a few milliseconds at most.

A 90° pulse tips the net magnet over until it lies sideways. There it keeps wobbling. As it sweeps past the head coil, it makes a tiny voltage, measured in microvolts. That voltage is the signal. Move the tip angle slider: only the sideways part makes a signal, and the part along the field makes none.

The tiny magnets soon drift out of step, because some wobble a little faster than others. The signal fades. Halfway to the echo, a 180° pulse flips them over. Now the fast ones are behind, and they catch up. The magnets come back into step and give an echo. The time from the 90° pulse to the echo is the echo time. Use the buttons below to stop at each moment.

Two clocks decide how bright each tissue looks. T1 is the time the net magnet takes to grow about 63 % of the way back along the field. T2 is the time the sideways signal takes to fade to about 37 %. The 180° flip only undoes differences that stay the same. Random nudges between neighbouring nuclei remain, so the echo is a little weaker. That loss is T2. Fat recovers fast and brain fluid slowly. Pick a tissue to compare. The values for each tissue are rough figures chosen for this model. The pulses also warm you slightly, so the scanner keeps that heating within safe limits.

90°
Sideways part (signal)
100 %
Part along the field
0 %
T1, regrowth
884 ms
T2, fading
72 ms

05

Coils that tell places apart

So far every spot in the head answers at the same pitch, so the echo cannot tell where it came from. Three more coils inside the magnet fix that: the gradient coils x, y and z. A gradient is a field that changes steadily from one side to the other. Each coil adds a little to the main field on one side of the centre and takes a little away on the other.

The change is small: up to 45 mT per metre. At the edge of the head it adds up to about 5.4 mT. That is a third of a percent of a 1.5 T field. Yet it is enough to give every position its own frequency. The coils switch on in about 0.2 ms.

Each coil has its own job. The z coil works with the radio pulse to wake just one thin slice. This is slice selection. The y coil gives each repetition a different twist from top to bottom, called phase encoding. The x coil runs while the echo comes in, so its pitch tells left from right. This is frequency encoding. Pick a coil to see its field, or follow the scan.

Switching big currents inside a strong magnet makes the coils jolt, like a loudspeaker. That is the loud knocking you hear during a scan. It can pass 100 decibels, as loud as a jackhammer or louder. That is why you always get earplugs or headphones.

Change at the head's edge
5.4 mT
Share of the main field
0.36 %
Pitch shift at the edge of the head
230 kHz
Switch-on time
0.225 ms
Job in this scan
Changes with each step

06

From echoes to a picture

Each echo is stored as one line of k-space. This is a grid that sorts the echoes by pitch and twist, not by place. One repetition fills one line. The next one changes the twist and fills another. In this model the picture is 64 × 64, so it takes 64 repetitions. Real head scans often use 256 lines. Here the lines fill from the middle outwards, so a rough picture shows up early.

A calculation called the Fourier transform turns that grid into the picture. It works out which mix of stripes, broad and fine, adds up to the image. The middle of k-space holds the broad stripes: the overall light and shade. The edges hold the fine detail. The picture shows on the monitor on the wall, beside the control window. Pick 8, 16, 32 or 64 lines: the scan pauses, and you can watch the picture sharpen.

The timing decides which tissues look bright. A T1-weighted scan repeats every 500 ms and listens early, at 15 ms. Each repetition ends before slow tissues have grown back, so fat is bright and brain fluid is dark. A T2-weighted scan waits 2,500 ms and listens at 100 ms. Now slow-fading fluid shines, and grey matter looks brighter than white matter. The readings show how bright each tissue looks, with the brightest at 100 %. The head here is a simple drawing made of ovals, not a real scan. In this model every tissue holds the same amount of hydrogen, and bone and air stay black.

With one line per repetition, 256 lines take about 2.1 minutes for the T1 scan and 10.7 minutes for the T2 scan. Most brain scans today use turbo spin echo, which reads 4 to 32 lines in each repetition. At 16 lines, the T2 scan takes about 40 seconds. This model takes one slice, while a real head scan takes many. Paul Lauterbur published the first MR image in 1973. He and Peter Mansfield shared the 2003 Nobel Prize for it.

k-space, the stored echoes The picture
Fat
0 %
White matter
0 %
Grey matter
0 %
Brain fluid
0 %
One line per repetition
10.7 min for 256 lines
Turbo spin echo, 16 lines per repetition
about 40 s