KNOWLEDGE · X-RAY AND CT IMAGING
How do you match one X-ray film to a 3D CT scan?
An X-ray film is one view of what a CT scan records. So you can compute the same shadow from the CT volume, search for the pose that looks most like the film, and match the two. The formula that does this is the cone-beam model, in which rays spread from a point source.
01 One view
One film is one view of a CT
An X-ray film is taken the same way as a CT. X-rays spreading from a point source pass through the specimen and reach a flat detector, and each pixel is the attenuation added up along the path of its ray. A CT turns the specimen and takes such shadows from hundreds of views; a film takes just one of them.
Sources: C-arm geometry is written as a 3×4 projection matrix that comes from the pinhole camera (Preuhs et al. 2018 §2.1). A dental CBCT takes several hundred frames in 10–40 s (Pauwels et al. 2015), and the rotation step in the public SkyScan 1272 log is 0.4°.
02 Shadow
A shadow is a sum, so one view cannot tell depth
A pixel value is the sum of how dark each cell along the ray is. Across three cells, (1, 2, 3), (3, 2, 1) and (2, 2, 2) all add up to 6, so the shadow is the same. One view gives only the sum and not which cell is dark. That is why many views are needed.
Sources: NIST gives the exponential attenuation law for a narrow monochromatic beam crossing a uniform layer. Chain it along the ray and you get I/I₀ = exp(−∫μ dl), and taking the logarithm turns it into a sum (the chaining step is a derivation). The cell values are numbers chosen for the explanation.
03 How each is taken
How are a CT and an X-ray taken?
They are taken by the same principle, so they can be matched; they are taken differently, so matching is needed.
| Item | CT (micro-CT) | X-ray (one film) |
|---|---|---|
| Principle | Point source → specimen → flat detector. Pixel = sum of attenuation along the ray | Same |
| Number of views | Hundreds | One |
| What one frame is | Raw material. It becomes a result only after many are combined and solved | That one frame is the result |
| Result | 3D volume (attenuation coefficient per voxel) | 2D picture. Front and back overlap |
| Depth | Yes (reconstruction) | None (a sum) |
| Geometry | The scanner knows it and records it in the log | May differ every time or go unrecorded Hypothesis |
| Brightness | Constant within one scan, and the values are gray values | Differs with device and conditions, so it may not map directly to the CT Hypothesis |
| Times taken | Usually once | Can be taken many times General tendency |
| In registration | The 3D coordinate system, that is, the map | A 2D observation from one moment and one pose |
So registration is placing a 2D observation (the film) on a 3D map (the CT). We do not know which pose the observation came from, so we compute the same observation from the map and pick the pose that looks most like it.
Sources: detector correction and geometry from Pauwels et al. 2015 (an overview of dental CBCT); an overview of registration methods from Markelj et al. 2012 (abstract). The micro-CT column is read from the public SkyScan 1272 log.
Try it
Turn the CT to match the film
Make a virtual film from the CT, then turn and move the CT until it overlaps the blue curve (the real film). Moving it back and forth brings it closer to the source, and its shadow grows.
Real filmVirtual film from the CT
Projection model
Source distance (times the specimen radius)
Turn and move the CT until the two curves overlap. Moving it back and forth changes the size.
This is a toy for explanation. It takes a 2D slice as a one-line shadow and has only three pose values (turn, sideways, back and forth). Real 3D registration has six, and the source distance may be unknown. The drawing is a diagram, so it looks the same whatever source distance you pick. The numbers in the demo come from one film, so they may differ from the three-seed averages in the text.
04 Cone model
Why a point source's cone model?
- With a point source, things nearer the source appear larger, so the size of the shadow tells you the front-to-back position. Simplify to parallel rays and the shadow does not change when you move back and forth.
- You need the distance between the source and the film and the pixel size to turn the CT's millimeters into the film's pixels.
- The six pose values (three turns, three shifts) and this geometry fit into a single projection matrix. Registration is finding those values so that the virtual film looks most like the real film.
DistanceAs the source moves away, the two models grow closer. In this toy, the parallel model's rotation error was within 2° once the source was only 6 times the specimen radius away, while the error with which the cone model finds the front-to-back position grew as the source moved farther (0.005 at 6×, 0.05 at 10×, 0.20 at 20×, 0.75 at 50×). The farther away the source is, the more the cone model's part shrinks to using a weakened depth signal. Confirmed in the toy
Source: we recomputed this page's 2D toy with an independent implementation and tested it (the analytic virtual film agrees with numerical integration to within 2.5×10⁻⁴, three seeds per source distance). We do not know what this distance ratio is in a real device.
05 Why it is hard
Even so, matching is hard
- One film tells the front-to-back direction only weakly. Many poses look alike. Hypothesis The toy supports this.
- If you do not know the film's geometry (the source–film distance and so on), the magnification is off. Hypothesis
- A CT and a film use different X-ray energies, so their brightness may not correspond. Hypothesis
If the matching error is larger than a structure, you cannot draw that structure's boundary from the film.
Common misconceptions
MythA CT and an X-ray are different kinds of pictures, so they cannot be compared.
In factBoth are shadows from a point source, and a pixel is the sum of attenuation along a ray. The only difference is the number of views, so you can compute the same shadow from a CT and compare.
MythIf you match a film to a CT, you can draw structure boundaries exactly.
In factIf the matching error is larger than a structure, you cannot draw its boundary. That is because one film pins down the front-to-back direction only weakly.
Go deeper
How is a CT solved into 3D?
Paint each view's shadow back along the rays it came from and add them up (backprojection), and the shape emerges, but adding them as they are blurs it. So before backprojecting, filter the shadow with something that emphasizes edges (a ramp filter). Combine the two and you have filtered backprojection, and FDK, the standard cone-beam method, carries it over to 3D. Confirmed We confirmed that FDK filters with a cosine weight and a ramp filter and then backprojects from the iFDK paper (Chen et al. 2019), and that almost all CBCT machines use FDK from Pauwels et al. 2015; we could not read the original 1984 paper.
FDK solves each detector row as if it were a fan-beam problem and does only the backprojection in 3D. So on one circular orbit it is exact only in the central slice and approximate elsewhere, and the wider the cone, the larger the error. Hypothesis We confirmed the data-sufficiency condition (Tuy–Smith) only from secondary accounts.
In the 2D toy (parallel rays, a 96×96 slice), the correlation with the true image stops at 0.64 without the filter however many views you add; with the filter it was 0.94 at 18 views and 0.98 at 60 views. Confirmed in the toy
Sources: Feldkamp, Davis, Kress 1984 (J. Opt. Soc. Am. A 1:612), Chen et al. 2019 (iFDK, arXiv 1909.02724), Pauwels et al. 2015.
Where does the size of one voxel come from?
The size one detector pixel covers on the specimen is the pixel size ÷ the magnification, and the magnification is the source–detector distance ÷ the source–specimen distance. Binning enlarges it by the binning factor. In the public SkyScan 1272 log, a 9.0 µm camera pixel with 3×3 binning gives 27 µm, and with a magnification of 270.988 ÷ 200.709 = 1.35 the expected value is about 20.0 µm, while the log's Image Pixel Size is 19.80 µm. We do not know why it is 0.99 times smaller. Confirmed log values and arithmetic
A small voxel does not mean the resolution is as good. Confirmed In one micro-CT system (detector pixel 127 µm, magnification 5.10) the 10% MTF cutoff was 12.56 lp/mm, and the authors wrote that, because of the finite focal spot, the detector blur and the reconstruction kernel, it falls short of the Nyquist limit (Ghani et al. 2016, abstract). At that magnification the pixel on the specimen is about 25 µm and the Nyquist limit is about 20 lp/mm (arithmetic).
How far can you trust a measured volume?
In specimens of the size handled in mineralized-tissue studies, the beam hardening artifact can reach 32.6% and affects mineral density measurements (Meganck et al. 2009, abstract). In a study comparing 13 dental CBCT devices, even after recalibration the mean error of the CBCT voxel values in the mid-density range was 35 to 1562 (Pauwels et al. 2013, abstract). Confirmed
So the volume is an estimate set by the device, X-ray energy, filter, voxel, reconstruction and threshold. It is safer to fix the settings, sweep the threshold to see the sensitivity, and look at the relative change between registered scan pairs. Hypothesis
Confirmed · Hypothesis · Unknown
ConfirmedA CT and a film follow the same principle (Preuhs et al. 2018, the NIST attenuation law). In this toy, the analytic virtual film agrees with numerical integration, the parallel model cannot see back-and-forth movement, and the farther away the source is, the more alike the two models become and the weaker the cone model's depth signal gets.
HypothesisThat the film's geometry and brightness may be unknown. Whether the toy's source-distance ratio matches a real device. That the 180°-flipped solution seen when the source is very far comes from the slice's left–right symmetry.
UnknownHow a film's brightness corresponds to CT values. The imaging geometry of a real film device. The equations and theorems in the original FDK paper.
Frequently asked questions
What does it mean to match an X-ray film to a CT?
It means making a virtual X-ray picture from the CT volume while changing the CT's pose (three turns and three shifts), and finding the pose that looks most like the real film. Using virtual X-ray pictures (DRRs) to solve inverse problems such as slice-to-volume registration is well studied (Gopalakrishnan and Golland 2022, abstract), and methods that match a 3D CT to 2D X-ray projections are catalogued as 3D/2D registration (Markelj et al. 2012, abstract).
What is a DRR (virtual X-ray picture)?
A DRR (digitally reconstructed radiograph) is a picture computed by adding up the CT volume's values along the rays from a point source to each detector pixel. A real X-ray picture's pixel is also the sum of the attenuation coefficient along a ray (the NIST attenuation law), so the same formula makes the same kind of picture from a CT.
Why do you need a cone-beam model with a point source rather than parallel rays?
With a point source, things nearer the source appear larger, so the size of the shadow tells you the front-to-back position. With a parallel model, the shadow does not change when you move back and forth. In this page's 2D toy, though, once the source was 6 or more times the specimen radius away, the parallel model's rotation error was within 2°, and the cone model's power to find the front-to-back position weakened too.
How are a CT and an X-ray picture taken differently?
Both are taken with a point source, a specimen and a flat detector, and a pixel is the sum of attenuation along a ray. A CT collects pictures from hundreds of views as the specimen or the source turns, and a computer solves them into a 3D volume. An X-ray film is one picture from one view and is the result itself, so front and back overlap and there is no depth (Pauwels et al. 2015).
How is the voxel size of a micro-CT set?
By default it is the detector pixel size divided by the magnification (source–detector distance ÷ source–specimen distance), and binning enlarges it by the binning factor. In the public SkyScan 1272 log, a 27 µm pixel (9 µm with 3×3 binning) and a magnification of 1.35 gave an expected value of about 20 µm. A small voxel does not mean the resolution is as good.
How accurate is matching a film to a CT?
It depends on the device and the method, so this page does not give a single number. If the matching error is larger than a structure, you cannot draw that structure's boundary from the film. In this page's 2D toy, the error with which the cone model finds the front-to-back position grew as the source moved farther away (0.005 at 6×, 0.20 at 20×).
Further reading
- Markelj et al. 2012, a review of 3D/2D registration methods for image-guided interventions (Medical Image Analysis)
- Preuhs et al. 2018, viewpoint planning for quantitative coronary angiography (§2.1 has the C-arm geometry and projection matrix)
- Pauwels et al. 2015, the technology of dental cone-beam CT
- Feldkamp, Davis, Kress 1984, cone-beam reconstruction (FDK)
- NIST, X-ray attenuation coefficients
- Gopalakrishnan and Golland 2022, a differentiable DRR generator (DiffDRR)
- Chen et al. 2019, iFDK: a scalable framework for instant high-resolution image reconstruction