---
title: MRI and nuclear medicine
heading: Proton spins precessing at the Larmor frequency, the tiny net magnetization, T1 and T2 relaxation and how echo and repetition times set image contrast, spatial encoding with gradients, slice selection and field of view, and imaging radioactive tracers with gamma cameras and PET
eyebrow: S15 · Lesson 41 · MRI and nuclear medicine
xp: 50
---

::: hook
Magnetic resonance imaging listens to hydrogen nuclei. In a strong field, protons precess at a frequency proportional to the field, about 64 MHz at 1.5 T, and a radio pulse at exactly that frequency tips them over so they broadcast back. How quickly that signal fades depends on the tissue, which gives MRI its superb soft-tissue contrast, and making the field vary across the body makes each location broadcast at its own frequency, so a Fourier transform (C9) turns the signal into an image. Nuclear medicine takes the opposite approach: it images where an injected radioactive tracer goes, showing function rather than anatomy.
:::

::: play
- The spin-echo signal $S \propto (1 - e^{-TR/T_1})e^{-TE/T_2}$ for two tissues with illustrative relaxation times: a solid tissue (T1 = 600 ms, T2 = 80 ms) and a fluid (T1 = 3000 ms, T2 = 1000 ms), against the echo time TE.
- With a short repetition time TR the solid tissue is brighter (T1 weighting); with a long TR and a long TE the fluid is brighter (T2 weighting).
- Choosing TR and TE is how the scanner decides which property the image shows.
:::

```sim plot
view: graph
x: E = 0..300
y: S = 0..1
slider: R = 200..5000 step 50 = 500
plot: (1 - exp(-R/600))*exp(-E/80) | samples: 300 | label: solid tissue
plot: (1 - exp(-R/3000))*exp(-E/1000) | samples: 300 | color: ch3 | label: fluid
readout: tissue minus fluid at TE of 15 ms = (1 - exp(-R/600))*exp(-15/80) - (1 - exp(-R/3000))*exp(-15/1000) | digits: 3
```

::: predict
## At what frequency do protons precess in a 3 T scanner?

- [ ] 42.6 MHz
- [ ] 3 GHz
- [x] About 128 MHz
- [ ] About 64 MHz

::: reveal
The proton's gyromagnetic ratio is 42.58 MHz per tesla, so $f = 42.58 \times 3$ = 127.7 MHz, in the VHF radio band. A 1.5 T scanner runs at 63.9 MHz. The RF coils, amplifiers and receivers are radio engineering, built to S6's standards.
:::
:::

::: nameit
## Spins in a field

A proton in a field $B_0$ precesses at the **Larmor frequency**

$$f_0 = \bar{\gamma}B_0, \qquad \bar{\gamma} = 42.58\text{ MHz/T}$$

Slightly more spins align with the field than against it, by a fraction of about $hf_0/(2kT)$: only 5 parts per million at 1.5 T and body temperature (B11's Boltzmann factor). There are so many protons that this tiny excess still gives a measurable signal.

## Excitation and relaxation

An RF pulse at $f_0$ tips the net magnetization away from the field; it then precesses and induces a signal in a receive coil. It relaxes in two ways: the longitudinal part recovers as $1 - e^{-t/T_1}$ (energy given to the surroundings), and the transverse part, which carries the signal, decays as $e^{-t/T_2}$ (spins dephasing). In a spin-echo sequence repeated every TR and read at echo time TE,

$$S \propto \rho\,(1 - e^{-TR/T_1})\,e^{-TE/T_2}$$

Short TR and short TE weight the image by T1; long TR and long TE weight it by T2; long TR and short TE leave mostly proton density ρ.

## Spatial encoding

A gradient G makes the field, and the precession frequency, vary with position: $\Delta f = \bar{\gamma}G\Delta x$. Then:

- **Slice selection**: an RF pulse of bandwidth $\Delta f$ excites a slice of thickness $\Delta f/(\bar{\gamma}G)$.
- **Frequency encoding**: during readout, a receiver bandwidth BW covers a field of view $\text{FOV} = \text{BW}/(\bar{\gamma}G)$, and N samples give pixels FOV/N wide.
- **Phase encoding** repeats the acquisition with steps of a second gradient; the 2D Fourier transform gives the image.

## Nuclear medicine

A tracer decays as $A = A_0\,2^{-t/T_{1/2}}$. **Gamma cameras** (and SPECT) image single photons, such as technetium-99m's 140 keV gammas (half-life 6.0 h), through a collimator. **PET** images positron emitters like fluorine-18 (half-life 109.8 min): each positron annihilates into two 511 keV photons flying in opposite directions, and detecting both in coincidence locates the decay on a line, without a collimator.
:::

::: example
## Compare the two tissues' signals for a T1-weighted (TR 500 ms, TE 15 ms) and a T2-weighted (TR 4000 ms, TE 100 ms) scan.

::: solution
1. **T1-weighted, solid tissue.**
   $$\begin{aligned} S &= (1 - e^{-500/600})e^{-15/80} \\ &= 0.469 \end{aligned}$$
2. **T1-weighted, fluid.**
   $$\begin{aligned} S &= (1 - e^{-500/3000})e^{-15/1000} \\ &= 0.151 \end{aligned}$$
   so tissue is three times brighter.
3. **T2-weighted.** Tissue gives 0.286 and fluid 0.666, so fluid is now more than twice as bright.
4. **What it shows.** The contrast reverses with the timing.

**Answer:** on the T1-weighted scan tissue (0.469) is three times brighter than fluid (0.151); on the T2-weighted scan fluid (0.666) is more than twice as bright as tissue (0.286).
:::
:::

::: example
## A 10 mT/m readout gradient and a ±32 kHz receiver bandwidth give what field of view? What slice does a 1 kHz RF pulse select with the same gradient? And how much of a 370 MBq dose of ¹⁸F remains after an hour?

::: solution
1. **Frequency spread of the gradient.**
   $$\begin{aligned} G &= 42.58\ \text{MHz/T} \times 0.01\ \text{T/m} \\ &= 4.26\ \text{kHz per cm} \end{aligned}$$
2. **Field of view.** The ±32 kHz receiver covers 64 kHz:
   $$\begin{aligned} \text{FOV} &= \frac{64}{4.26}\ \text{cm} \\ &= 15.0\ \text{cm} \end{aligned}$$
3. **Slice thickness.**
   $$\begin{aligned} \Delta z &= \frac{1\ \text{kHz}}{4.26\ \text{kHz/cm}} \\ &= 2.35\ \text{mm} \end{aligned}$$
4. **¹⁸F after an hour.**
   $$\begin{aligned} A &= 370 \times 2^{-60/109.8} \\ &= 253\ \text{MBq} \end{aligned}$$

**Answer:** the field of view is 15.0 cm, the slice 2.35 mm, and 253 MBq of the ¹⁸F remains after an hour.
:::
:::

::: example
## An MRI scan with 1 mm cubic voxels has adequate signal-to-noise ratio. What happens to the ratio at 0.5 mm voxels, and how much longer must the scan run to recover it?

::: solution
1. **Signal per voxel.** The signal is proportional to the number of protons in a voxel, so halving each dimension divides it by 8, and the SNR with it:
   $$\left(\tfrac12\right)^3 = \tfrac18$$
2. **Recovering it by averaging.** Averaging repeated acquisitions improves SNR only as the square root of time, so recovering a factor of 8 takes
   $$8^2 = 64$$
   times as long.
3. **In practice.** High-resolution scans accept lower SNR, move to stronger magnets (SNR grows roughly in proportion to field strength) or use closer, smaller receive coils.

**Answer:** the SNR falls by a factor of 8, and recovering it takes a scan 64 times as long.
:::
:::

::: check
given: B = 0.5 | 1.5 | 3 | 7
answer: 42.577*B
unit: MHz
tolerance: 0.5%

## At what frequency do protons resonate in a {B} T field?

::: right
Right. $\bar{\gamma}B_0$ = {answer} MHz.
:::

::: misses
- [42.577*B*2*pi] That's the angular frequency in Mrad/s.
- [any] Not yet. 42.58 MHz per tesla.
:::
:::

::: check
given: B = 0.5 | 1.5 | 3 | 7; T = 300 | 310
answer: 6.62607015e-34*42.577e6*B/(2*1.380649e-23*T)*1e6
tolerance: 0.5%

## What's the excess fraction of aligned protons, in parts per million, at {B} T and {T} K?

::: right
Right. $hf_0/(2kT)$ = {answer} ppm.
:::

::: misses
- [6.62607015e-34*42.577e6*B/(1.380649e-23*T)*1e6] The fractional excess has a factor of 2 in the denominator.
- [any] Not yet. Boltzmann factor for the two spin states.
:::
:::

::: check
given: R = 400 | 1000 | 2000; E = 15 | 50 | 120; a = 600 | 1200; b = 60 | 120
answer: (1 - exp(-R/a))*exp(-E/b)
tolerance: 0.5%

## A tissue has T1 = {a} ms and T2 = {b} ms. What relative spin-echo signal does it give with TR = {R} ms and TE = {E} ms?

::: right
Right. $(1 - e^{-TR/T_1})e^{-TE/T_2}$ = {answer}.
:::

::: misses
- [exp(-E/b)] Include the incomplete T1 recovery between repetitions.
- [any] Not yet. The spin-echo signal equation.
:::
:::

::: check
given: G = 5 | 10 | 25; W = 32 | 64 | 128
answer: W*1e3/(42.577e6*G*1e-3)*100
unit: cm
tolerance: 0.5%

## A readout gradient of {G} mT/m and a receiver bandwidth of {W} kHz cover what field of view?

::: right
Right. $\text{BW}/(\bar{\gamma}G)$ = {answer} cm.
:::

::: misses
- [any] Not yet. Bandwidth over frequency spread per meter.
:::
:::

::: check
given: G = 5 | 10 | 25; W = 0.5 | 1 | 2
answer: W*1e3/(42.577e6*G*1e-3)*1000
unit: mm
tolerance: 0.5%

## An RF pulse of {W} kHz bandwidth is applied with a {G} mT/m slice gradient. How thick a slice does it excite?

::: right
Right. $\Delta f/(\bar{\gamma}G)$ = {answer} mm.
:::

::: misses
- [any] Not yet. Pulse bandwidth over frequency spread per meter.
:::
:::

::: check
given: A = 200 | 370 | 740; t = 30 | 90 | 180; h = 109.8 | 360.6
answer: A*2^(-t/h)
unit: MBq
tolerance: 0.5%

## A tracer with a {h} min half-life starts at {A} MBq. How much remains after {t} min?

::: right
Right. $A_02^{-t/T_{1/2}}$ = {answer} MBq.
:::

::: misses
- [A*exp(-t/h)] The half-life is where it halves: use $2^{-t/T_{1/2}}$, or $e^{-t\ln 2/T_{1/2}}$.
- [any] Not yet. Exponential decay by half-lives.
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.7 | 1.5; n = 2 | 4 | 9; B = 1.5 | 3

## A scan's voxels are scaled by {a} in each dimension, with {n} times as many averages, and the field goes from 1.5 T to {B} T.

::: part
answer: a^3*sqrt(n)*B/1.5
tolerance: 0.5%

### By what factor does the SNR change, taking it as proportional to field strength?

::: misses
- [a^3*n*B/1.5] Averages improve SNR as their square root.
- [a*sqrt(n)*B/1.5] Signal scales with voxel volume, the cube of its size.
- [any] Volume × √(averages) × field ratio.
:::
:::
:::

::: check
kind: derivation
vars: B = 0.2..7, h = 1..120, A = 10..1000, t = 0..600

## An MRI scanner works at B tesla; separately, a tracer with half-life h minutes starts at activity A.

::: step
answer: 42.58*B

### At what frequency, in megahertz, do protons resonate?
:::

::: step
answer: 42.58*B*3.5

### How far apart, in hertz, are fat and water, 3.5 ppm?
:::

::: step
answer: A*2^(-t/h)

### What activity remains after t minutes?
:::

::: right
Right. The fat–water shift grows with field, which is why high-field images show more chemical-shift artifact.
:::
:::

::: explain
## How does a gradient field turn MRI's radio signal into an image?

::: model
In a uniform field every proton precesses at the same frequency, so the signal from the whole body is a single tone carrying no location. A gradient makes the field strength, and so the precession frequency, change linearly with position. During readout, protons at each position along the gradient then broadcast at their own frequency, and the received signal is a sum of tones whose amplitudes are the amounts of signal at each position: a Fourier transform of the slice's profile along that direction. Repeating the acquisition with different amounts of phase imposed by a second gradient fills in the other dimension, and a two-dimensional inverse Fourier transform recovers the image.
:::
:::

::: practice

::: check
given: B = 0.2 | 0.5 | 1 | 1.5 | 3 | 7 | 11.7
answer: 42.577*B
unit: MHz
tolerance: 0.5%

## Larmor frequency at {B} T?

::: misses
- [any] 42.58 MHz/T.
:::
:::

::: check
given: R = 100 | 6000; E = 5 | 200; a = 300 | 4000; b = 30 | 2000
answer: (1 - exp(-R/a))*exp(-E/b)
tolerance: 0.5%

## Spin echo: TR {R}, TE {E}, T1 {a}, T2 {b} ms?

::: misses
- [any] $(1 - e^{-TR/T_1})e^{-TE/T_2}$.
:::
:::

::: check
given: A = 50 | 1000; t = 10 | 300; h = 60 | 400
answer: A*2^(-t/h)
unit: MBq
tolerance: 0.5%

## Decay: {A} MBq, half-life {h} min, after {t} min?

::: misses
- [any] $A_02^{-t/T_{1/2}}$.
:::
:::
:::
