Chapter 16
Diagnostic devices: how they work and what they are for
X-ray, CT, MRI, ultrasound, nuclear medicine, endoscopy, and physiological tests
Human Biology for the Medical Maker
Why this chapter exists
- A phantom must reproduce the property the device measures
- Imaging software must respect what pixel values mean
- Anything in a scanner room must be compatible with its physics
- You need the vocabulary to talk with radiographers and physicists
- And these machines are some of the most elegant engineering there is
The map: which question, which device
| The question | Device family | Examples |
|---|
| What does it look like inside? | Anatomical imaging | X-ray, CT, MRI, ultrasound |
| What is it doing? | Functional imaging; physiological measurement | PET, SPECT, Doppler, ECG, spirometry |
| What can be seen directly? | Endoscopy and optical examination | Gastroscopy, colonoscopy, dermatoscopy |
| What is it made of chemically? | Laboratory medicine | Blood and urine tests, microbiology |
| What are the cells? | Biopsy and histopathology | Needle biopsy, cytology |
Radiation, ionising and not
Effective dose, for orientation
| Source | Typical effective dose | Equivalent background |
|---|
| Dental bitewing | 0.005 mSv | About a day |
| Chest X-ray | 0.02 to 0.1 mSv | A few days |
| Mammogram | 0.4 mSv | About seven weeks |
| CT head | 2 mSv | About eight months |
| CT abdomen and pelvis | 8 to 10 mSv | About three years |
| PET-CT | 10 to 25 mSv | Three to eight years |
| Natural background per year | 2 to 3 mSv | — |
Population-level comparison figures, not harm to an individual. Children are more sensitive.
How X-rays are made
- A vacuum diode: hot filament, 50 to 150 kV, tungsten anode
- About 1% becomes X-rays; 99% becomes heat
- kVp sets photon energy; mAs sets photon number and dose
How the body makes the image
- Exponential attenuation: the Beer–Lambert law again
- Photoelectric absorption rises with atomic number cubed — bone stands out
- Compton scatter fogs the image; a grid removes it
- Five densities: air, fat, soft tissue, bone, metal
The radiographic family
| Variant | How it differs | Used for |
|---|
| Plain radiography | Single projections | Fractures, chest, foreign bodies |
| Mammography | Low kVp, compression; tomosynthesis slices | Breast screening, calcifications |
| DEXA | Two energies solved for bone alone | Bone density; tiny dose |
| Fluoroscopy | Continuous X-ray video | Swallow studies, placing lines and implants |
| Angiography and DSA | Iodine in vessels, mask subtracted | Coronary, stroke clot retrieval |
| Cone-beam CT | Rotating source around the head | Dental implants — a major fabrication workflow |
The limit of all projection imaging is superimposition. The answer is the next machine.
Many shadows, solved backwards
- Tube and 64 to 320 detector rows rotate 2 to 4 times a second
- Each reading is a line integral of attenuation
- Reconstruction is an inverse problem — the Radon transform
- Filtered back-projection, iterative, and learned methods
Hounsfield units and windows
Calibrated HU
- Air −1000, fat about −100, water 0
- Soft tissue +20 to +60; fresh clot +60 to +90
- Cortical bone +1000 to +2000; metal saturates
Display windows
- Brain: level 40, width 80
- Lung: level −600, width 1500
- Bone: level 400, width 2000
For software: threshold and export on stored HU, never on the windowed screen image.
What CT is for, and what it costs
- Stroke: exclude bleeding in minutes; CT angiography
- Trauma, pulmonary embolism, abdominal pain, staging
- Costs: highest routine dose; iodine contrast risks
- Artefacts: metal streaks, beam hardening, motion
Magnetic resonance imaging
No ionising radiation — a magnet and radio waves
The physics in five steps
Relaxation and k-space
T1 and T2
- T1: magnetisation regrows along the field
- T2: the precessing signal loses phase and decays
- Fat: short T1. Free water: long T1 and T2
k-space
- Raw data are the image's spatial-frequency spectrum
- Centre: overall contrast. Edges: fine detail
- Speed-ups acquire less and reconstruct cleverly
Gradient switching in a strong field is loud — hearing protection for every patient.
Choosing the contrast
- T1: fat bright, fluid dark — anatomy
- T2: fluid bright — most disease adds water
- FLAIR, fat suppression, diffusion (acute stroke in minutes)
- Angiography, functional MRI, cardiac, spectroscopy
MR safety: the field is always on
- Projectiles: cylinders, tools, wheelchairs pulled in with lethal force
- Implants: MR Safe, MR Conditional, MR Unsafe
- RF heating: limited by SAR; conductive loops burn
- Nerve stimulation, noise, and helium release in a quench
- Access zones I to IV, with screening of every person and object
Nothing you build enters Zone IV without the MR safety lead's approval.
Pulse and echo
- Piezoelectric array, 2 to 18 MHz
- Depth equals speed times time, halved; speed assumed 1540 m/s
- Fat to muscle reflects about 1%; tissue to bone about 40%
- Tissue to air reflects over 99.9% — hence gel
Frequency is a trade between detail and depth
Detail
- At 5 MHz the wavelength is about 0.3 mm
- Higher frequency gives finer resolution
Depth
- Attenuation about 0.5 dB per cm per MHz, both ways
- 3 MHz: about 20 cm — abdomen, heart
- 10 MHz: about 6 cm — tendons, thyroid, needles
Frame rate is physics too: each line waits for the deepest echo.
Doppler: measuring movement
- Shift equals 2 f v cos θ divided by c
- 3.8 MHz, 60°, 0.88 m/s: about 2.2 kHz — audible
- At 60°, a 5° angle error changes velocity by about 15%
- Colour, spectral, power Doppler; elastography
What ultrasound is for, and what it costs
- First test for pregnancy, gallbladder, kidneys, thyroid, deep vein thrombosis
- Echocardiography: the workhorse of cardiology
- Point-of-care yes-or-no questions; needle guidance
- The most operator-dependent modality — a missed view leaves no record
- Thermal and mechanical indices shown on screen; kept low
SPECT and PET
- Technetium-99m: 140 keV, 6 h half-life, from a generator
- Gamma camera collimator rejects about 9,999 photons in 10,000
- PET: positron annihilation gives two 511 keV photons
- Coincidence detection; no collimator; 4 to 5 mm
FDG, and the SUV as a protocol
- FDG: glucose analogue, trapped in proportion to use
- Cancer lights up — so do brain, heart, muscle, inflammation
- F-18 half-life about 110 min; made in a cyclotron
- Forget decay correction: every SUV wrong by a factor of 1.46
Endoscopy and physiological measurement
| Test | What it shows |
|---|
| Gastroscopy and colonoscopy | Gut lining directly; biopsy and polyp removal |
| Capsule endoscopy | Small bowel, by a swallowed camera for 8 to 12 hours |
| 12-lead and ambulatory ECG | Rhythm and ischaemia; Holter, patch, loop recorder |
| Oscillometric blood pressure | Peak oscillation near MAP; the rest estimated |
| Spirometry | FEV1 over FVC below about 0.7 suggests obstruction |
| Polysomnography | A dozen channels overnight; apnoea–hypopnoea index |
| Biopsy | Tissue under the microscope — the reference for cancer |
Choosing a test — orientation only
| Question | Typical first test | Why |
|---|
| Is the bone broken? | Plain X-ray | Fast, cheap, excellent for bone |
| Stroke — is it bleeding? | Non-contrast CT; MRI diffusion | Speed before clot-busting drugs |
| Clot in the leg? | Compression ultrasound | Veins with clot do not compress |
| Gallstones? | Ultrasound | Highly reflective; no radiation |
| Torn knee ligament? | MRI | Soft-tissue contrast |
| How far has cancer spread? | CT; PET-CT | Anatomy plus function |
| Asthma or COPD? | Spirometry | Obstruction versus restriction |
The first choice is usually the cheapest adequate test; dose shapes choices for children and pregnancy.
Engineering bridge: the square-root law
SNR = √N
Counting N random events gives noise of √N. Halving the noise needs four times the counts.
Four times the dose, the time, or the detector sensitivity — there is no free lunch.
Where an engineer can contribute
| Area | Maker-relevant work |
|---|
| CT and radiography | Machined or cast phantoms tuned to HU; radiolucent, cleanable positioning aids |
| MRI | Doped agarose phantoms in glass or acrylic; non-metallic pads and straps |
| Ultrasound | Cast phantoms, probe holders, needle-guide fixtures |
| Endoscopy | Storage and drying cabinets; trays and covers |
| Physiological measurement | Test fixtures, pressure and flow rigs, signal simulators — never on a person |
| Software | ASTRA, BART and fastMRI, k-Wave, STIR, WFDB on public data |
Three of the best projects in the book
- A laparoscopic box trainer: sheet material, camera, lighting, good tasks
- An ECG or monitor waveform simulator: microcontroller, DAC, resistor network
- A CT reconstruction from scratch in Python, with Poisson noise
Three different skill sets — fabrication, electronics, and software.
Worked example: a knee model for the MRI room
First prototype
- Turned and milled acetal bones, stainless screws
- Cast silicone sleeve
- Neodymium magnet catch, coin-cell LED
- Copper wire "nerve"; webbing strap, steel buckle
The fix
- Magnet: MR Unsafe — remove
- Screws to nylon or PEEK; buckle to plastic
- LED to an alignment mark; copper to a moulded channel
- Then the MR safety lead decides
Workshop exercise and exit criteria
- Back-project a 3 by 3 grid by hand from row, column, and diagonal sums
- Time-of-flight ranging with a 40 kHz sensor — in air, on objects
- Window a public CT and measure HU of four tissues
- k-space in ten lines of Python; FDG decay planning; the √N law
- Explain each modality in two sentences
What this chapter does not establish
- You cannot interpret a diagnostic image or trace
- You cannot operate diagnostic equipment on people
- You cannot declare anything MR Safe, radiolucent, or radiation-safe
- The test-choice table is not clinical guidance
- Physics knowledge is not imaging-physics qualification
Next — Treatment and life-support devices: how they work and what they are for.