Photons through one row of a head
Open in CT Lab →Each dot is a photon. Orange flashes are photons taken out of the beam. Tap or drag on the head to move the beam. The counter on the right compares the counted fraction with the exponential law.
Medical imaging · inverse problems · 1917 to today
An X-ray photograph squashes a whole body into one shadow. A CT scanner takes hundreds of shadows from every direction around you, then solves for the one slice that could have cast all of them. Watch it happen below: the source turns, each turn fills a sinogram, and the image sharpens view by view.
Every figure on this page runs a real reconstruction in your browser: our own JavaScript code for the textbook algorithms, the same ones the ASTRA Toolbox runs on GPUs for research scanners. The phantoms are drawn shapes with realistic attenuation, not patient scans. Each figure has a link to the matching experiment in the CT Lab.
An X-ray photon either crosses the body or is taken out of the beam, mostly by scattering off electrons and by the photoelectric effect. Every millimetre of tissue removes the same fraction of the photons that reach it. That is why the beam fades exponentially, and bone, with more electrons per millimetre, removes a larger fraction than soft tissue.
Each dot is a photon. Orange flashes are photons taken out of the beam. Tap or drag on the head to move the beam. The counter on the right compares the counted fraction with the exponential law.
The attenuation coefficient μ says what fraction of photons a material removes per centimetre. At 70 keV, water has μ ≈ 0.19 /cm and dense bone two to three times that.
Take the logarithm and the exponential is gone. The detector reading becomes p, the sum of μ along the ray. A CT scanner measures thousands of such line sums. The rest of the page is about turning them back into μ at every point.
Line up many parallel rays and one detector element behind each. The row of readings is a projection: the object squashed flat in one direction. A single projection cannot tell a dense spot at the front from the same spot at the back. Turn the beam and the answer changes.
The delta function keeps only the points on the line at distance s from the centre, with its normal at angle θ. Johann Radon showed in 1917 that if you know p for every θ and every s, you know μ everywhere. He also gave the inversion formula, more than fifty years before anyone had a reason to use it.
Over 180° of parallel rays, every line has been measured once. Going on to 360° measures each line again from the other side.
Put each projection in a column, one column per angle, and you get a sinogram. It is the raw data of every CT scan. The name comes from what a single point does in it: as the beam turns, the point's shadow slides back and forth across the detector along a sine curve.
A point at (x0, y0) lands on the detector at s(θ). Its amplitude is the point's distance from the centre and its phase is the point's direction. Every object is a sum of points, so every sinogram is a sum of sine curves, which is why a sinogram looks like woven ribbons. The dashed amber curve is this formula, drawn over the data.
The obvious way back: take each projection and smear it back across the image along the rays it came from, then add up all the smears. Bright spots get smeared through from every angle and pile up where they belong. But the smear also lands everywhere else.
With a few views, a point back-projects into a star of lines. With many views the star fills in, but it does not go away: the sum falls off only as 1/r with distance from the point. The back-projected image is the true image blurred by 1/r.
Every edge gets a halo and every organ a glow. To remove that blur we need to know what 1/r does to each spatial frequency. That is a job for the Fourier transform.
Here is the key fact of tomography. Take the one-dimensional Fourier transform of one projection. It equals the two-dimensional Fourier transform of the image along one line through the centre, at the same angle as the beam. Each view gives one spoke of the image's spectrum.
The middle panel is built only from the sinogram: the 1D spectrum of each projection, placed on its spoke. It matches the right panel, the 2D Fourier transform of the object, computed directly. Fill in every spoke, invert the 2D transform, and you have the image. Look at the spokes, though: near the centre they crowd together, at the edge they spread apart. Plain back-projection counts the crowded low frequencies too often, and that excess weight is exactly the 1/r blur.
The fix is to weight each spoke by its spacing, which grows in proportion to the frequency |k|. In practice you filter each projection with a ramp before you smear it back. The ramp boosts fine detail, adds negative side lobes around every edge, and these cancel the halos when the views are added up. This is filtered back-projection (FBP), and nearly every clinical scanner has used it for fifty years.
The bare ramp (Ram-Lak, after Ramachandran and Lakshminarayanan, 1971) is the sharpest, and it also boosts noise most, because noise lives at high frequencies. A window W(k) rolls the ramp off: Shepp-Logan a little, Cosine, Hamming and Hann more. The cutoff stops the filter below the detector's Nyquist frequency. Sharper or quieter: you choose, per scan, and the change also drives the figure below.
Views arrive spread over 180°, so at first you see the streaks of a few views. The filtered image (right) uses the window chosen above. The PSNR compares it with the true object; higher is closer.
The first scanner, EMI's in 1971, used one pencil beam and one detector. It stepped across the head, turned one degree, and stepped across again, 180 times: several minutes for each pair of slices. Third-generation scanners spread the beam into a fan and caught it on an arc of hundreds of detectors, so one turn of well under a second gives a slice. Cone-beam scanners open the beam in the other direction too and catch it on a flat panel, which gives a whole volume per turn.
Fan beam. Each fan ray is also a parallel ray at some angle, so you can re-sort (rebin) fan data into parallel projections and use FBP. Or you filter the fan data directly, with a weight for the ray's distance from the source. Both need 180° plus the fan angle of data; this page's engine uses a full turn.
Cone beam. Rays that leave the central plane cross several slices. Feldkamp, Davis and Kress (1984) gave the standard approximation, FDK: weight each detector row by its cone angle, ramp-filter along rows, and back-project along the real 3D rays. It is exact in the mid-plane and drifts further out, which shows as streaks at the top and bottom of the volume.
The panel at the bottom right shows what the detector reads at this angle: a profile for the fan and the pencil beam, a full 2D projection for the cone.
Fan beam in the CT Lab → The lab works in 2D, so it has fan presets but no cone preset.
Forget calculus for a moment. Split the slice into pixels, unknowns xj. Each ray adds up the pixels it crosses, weighted by its path length in each one: one linear equation per ray. A scan is a huge system Ax = b, with a row for every ray and a column for every pixel. Solve it, and you have the image. Hounsfield's first scanner solved it this way.
ART (Kaczmarz 1937; Gordon, Bender and Herman 1970) takes one ray at a time and moves the image just enough to satisfy that ray. On the left, each line is one ray's equation: the estimate zigzags between them towards the crossing. When two rays are nearly parallel, the zigzag is slow. ART in the CT Lab →
SIRT uses all rays at once and averages the corrections, with R and C the inverse row and column sums. It is smooth and slow. SART (Andersen and Kak 1984) does the same one view at a time. CGLS runs conjugate gradients on the least-squares problem and gets close in a few steps.
The curves show the error against the true object, not the fit to the data. With noisy data, the solvers first approach the truth and then start to fit the noise; stopping early is itself a kind of regularisation. With few views or low dose, iterative methods beat FBP (dashed), which is why modern scanners use them to cut dose.
Reconstruction assumes a perfect world: enough photons, enough angles, one energy, perfect detectors, an object that holds still. Each broken assumption leaves its own fingerprint in the image. Radiologists learn to read them, and scanner makers spend fortunes to correct them.
Noise and dose. Photon counts follow Poisson statistics, so the noise in each reading goes as 1/√I. Halve the dose and the noise grows by √2. The ramp filter then amplifies it into fine streaky grain. Every CT protocol trades this grain against radiation dose.
Too few views. With too few angles, the gaps between spokes in k-space leave out fine detail at the edges of the spectrum. Each view's back-projection then shows as a streak. This is where iterative methods with prior knowledge help most.
Limited angle. If the views cover less than 180°, a whole wedge of k-space is never measured. Edges that run along the missing directions vanish, and the image smears along them. This happens in dental and breast scanners that cannot go round.
Beam hardening. A real tube makes a spectrum of energies. Soft, low-energy photons are absorbed first, so the beam that gets through is harder and attenuates less. Long paths through the middle look too thin, and the centre of a uniform object reads too low: cupping. Dark bands appear between dense bones. Lower kVp makes it worse.
Metal. Steel stops almost every photon on rays that cross it, so those readings are mostly noise and badly hardened. FBP spreads the bad readings out as bright and dark streaks. Metal artefact reduction replaces those rays before reconstruction.
Rings. A detector element with a slightly wrong gain reads off by the same amount in every view. In a turning scan, that one element always looks at the same distance from the centre, so its error back-projects into a circle. Scanners calibrate detectors every day to keep rings away.
Motion. The reconstruction assumes the object is the same in every view. If it moves (a breath, a heartbeat, a bag on a belt), the views disagree and edges double or streak. Fast gantries and cardiac gating exist for this reason.
A scanner reconstructs μ, which depends on the beam energy. To make images comparable, CT reports the Hounsfield unit (HU) instead, fixed by two points: air is −1000 and water is 0. Each HU is one tenth of a percent of the attenuation of water.
Hover or tap the slice to read the value. A screen shows about 256 greys and the eye separates far fewer, but the HU scale spans thousands. A window picks a band of the scale, a level at its centre and a width, and spreads only that band over black to white.
Fat is around −100, soft tissue and blood a few tens above zero, and dense bone near +1000 and more. Brain grey and white matter differ by only a few HU, so the brain window is just 80 HU wide. The lung window is wide and low, to show airways and vessels inside dark lung. The bone window is wider still.
The HU values on this page come from our phantom's mixes at 70 keV, so they are close to clinical values, not equal to them.
The mathematics came first, by decades. The machine came from a record company's research lab.
This page and the CT Lab were inspired by the ASTRA Toolbox, the open-source, GPU-accelerated toolbox for tomography from imec-Vision Lab (University of Antwerp) and CWI (Amsterdam). If you want to reconstruct real data, use it.
github.com/astra-toolbox/astra-toolbox · astra-toolbox.com
The ASTRA Toolbox is GPL-3.0 software. No ASTRA code is used or ported here: this page runs our own JavaScript implementation of the published algorithms.
The procedural phantoms (head, chest, suitcase, walnut, hip) are our own drawings. Attenuation values are approximate figures for water, bone and iron at 70 keV, mixed coarsely. No patient data is on this page.