Chapter 15: Measurement, imaging, and the diagnostic laboratory

Talking track · voice bm_george · speed 1.0

1. Measurement, imaging, and the diagnostic laboratory

Welcome to chapter fifteen. Most of what a hospital does before it treats anybody is measure. Imaging, laboratory medicine, physiological measurement and point-of-care testing account for an enormous share of clinical activity, equipment, software and training. This chapter gives you the overview of what each kind of measurement actually is, and then the vocabulary for judging whether any number, from any instrument, deserves to be trusted. That second part applies to everything you will ever build that produces a value.

2. Why this chapter exists

A technologist meets this world sooner than expected. Cast ultrasound and needle-guidance phantoms, machined calibration jigs and test fixtures, electronic signal simulators for checking monitors, specimen-handling and transport aids, training datasets and the software that serves them, and physical models derived from scans are all realistic first projects. Every one of them requires you to understand what the underlying measurement is before you can represent it honestly. Remember the four layers from chapter nine: phenomenon, sensor, display and interpretation. This chapter is where that model does most of its work.

3. Medical imaging

First, imaging. This chapter is the overview. How each machine actually works, its physics and safety, is the subject of chapter sixteen.

4. The modalities at a glance

Here are the modalities side by side. Plain X-ray measures how strongly tissue attenuates X-rays, which depends on density and atomic number; it is fast and cheap but collapses three dimensions into two. CT takes many X-ray projections and reconstructs slices, at a higher dose. MRI listens to hydrogen nuclei in a strong magnetic field and gives superb soft-tissue contrast with no ionising radiation, but it is slow, expensive, and its magnet is a serious projectile hazard. Ultrasound times echoes from boundaries between tissues. Nuclear medicine and PET show where an injected tracer gathers, which reflects function. Endoscopy and optical coherence tomography use light, for a direct view or for micrometre-thin cross sections.

5. None of them measures anatomy

This is the single idea to take from the imaging overview. X-ray and CT measure attenuation. MRI measures nuclear magnetic relaxation, which reflects the chemical environment of hydrogen. Ultrasound measures where tissues of different acoustic impedance meet. Nuclear imaging measures where a tracer accumulated. Endoscopy measures reflected light. None of them measures anatomy. Each measures one physical property, and anatomy is inferred from its spatial pattern. That inference is where artefacts, ambiguity and error live, and it is why interpreting images is a trained clinical skill rather than reading off a picture.

6. Image quality, and the trade you cannot escape

Image quality has several dimensions: spatial resolution, contrast resolution, temporal resolution, signal to noise, field of view and slice thickness. And there is the partial volume effect, where one voxel straddling two tissues reports their average, a real source of error in segmentation. In every modality these trade against each other, and in the ionising ones they also trade against dose. More signal means more radiation, more time or less coverage. The governing principle is ALARA, as low as reasonably achievable. A request to just scan someone and make a model has a dose, a justification and a referral pathway behind it.

7. From scan to physical model

Here is the pipeline from a scan to a physical model. Acquisition sets slice thickness and reconstruction kernel. The DICOM files carry the images and extensive metadata, including patient identifiers. Segmentation chooses which voxels belong to the structure. A mesh is generated, smoothed, repaired and decimated. CAD adds wall thickness and assembly features. Then you fabricate, by printing, milling, or casting from a mould. And finally a qualified person verifies the result against the source images. Notice that fabrication is the least interesting step. Often a rotatable on-screen model answers the question with nothing made at all. The steps that decide whether the result is true all happen earlier.

8. An attractive reconstruction is not an accurate one

Every step in that pipeline is lossy or interpretive. Threshold choice alone can move a bone surface by a millimetre or more. Partial volume makes thin walls disappear. Smoothing removes real detail along with noise, and decimation changes geometry. None of that is visible in the finished object, which looks equally convincing whether it is right or wrong. So never treat a reconstruction as clinically accurate without validation by someone qualified to do it. And remember that imaging data is patient data from the first file. Identifiers hide in private DICOM tags and are sometimes burned into the pixels. Information governance applies before you open anything.

9. Laboratory medicine

Now the laboratory, where roughly two thirds of clinical decisions are said to involve some laboratory data.

10. The laboratory disciplines

The laboratory splits into disciplines. Clinical biochemistry measures electrolytes, glucose, kidney and liver markers, enzymes, hormones and drug levels. Haematology counts and examines blood cells and measures clotting. Microbiology identifies organisms and their antibiotic sensitivities. Histopathology examines tissue structure under the microscope. Immunology measures antibodies and antigens. Molecular diagnostics reads nucleic acid sequences. And transfusion science matches blood groups. Each has its own instruments, its own quality systems, and its own professionals.

11. The measurement principles worth knowing

A handful of principles cover most of the laboratory. Spectrophotometry shines light of a chosen wavelength through a sample, and absorbance gives concentration through the Beer–Lambert law, the same principle as the pulse oximeter. Ion-selective electrodes develop a potential that tracks one ion's activity, which is how sodium, potassium and pH are measured. Amperometry turns an electrode current into concentration, as in a glucose meter. Immunoassays use an antibody that binds its target; a lateral flow pregnancy test and a rapid COVID test share that architecture. Flow cytometry classifies cells passing a laser. PCR doubles a target sequence each cycle, which is why it detects tiny quantities and why contamination is catastrophic. Mass spectrometry sorts ions by mass.

12. Point-of-care testing

Point-of-care testing happens near the patient instead of in a central lab: glucose meters, blood gas analysers, lateral flow tests, portable coagulation monitors. The trade is consistent. You gain speed and accessibility. You give up, by default, analytical performance, quality control and traceability. A central laboratory has calibration regimes, external quality assurance, trained staff and an audit trail. A device on a ward has none of those unless someone builds them around it, which is why point-of-care testing has its own governance programmes.

13. Engineering bridge: what makes a measurement trustworthy

Now the engineering bridge, which is the heart of this chapter. This vocabulary applies to anything you will ever build that produces a number.

14. The vocabulary of trust

Accuracy is closeness to the true value, freedom from systematic error. Precision is closeness of repeated measurements to each other, freedom from random error. Bias is the gap between the average result and the truth. Repeatability is precision under the same conditions; reproducibility is precision across operators, instruments, days and sites, and it is the harder and more clinically relevant of the two. Calibration relates output to known standards, and traceability is the unbroken chain linking your result to a reference. Drift is slow change with no change in input. And uncertainty is the quantified doubt about a result. A result without it is incomplete.

15. Accuracy and precision are independent

Hold on to this one. Accuracy and precision are independent. An instrument can give tight, repeatable readings that are consistently wrong. That is bias, and it is the more dangerous failure, because the repeatability looks like reliability. This is exactly the pulse oximeter problem from chapter nine: highly repeatable readings that are systematically biased in one population. The precision concealed the bias.

16. Diagnostic sensitivity and specificity

Confusingly, sensitivity and specificity mean something different in diagnostics than in instrumentation. In diagnostics, sensitivity is the fraction of people with the condition whom the test catches. Specificity is the fraction of people without it whom the test correctly clears. Those are properties of the test. The positive predictive value, the chance that someone with a positive result actually has the condition, and the negative predictive value, are different. They depend on how common the condition is in the people being tested.

17. The arithmetic everyone should do once

Work this once, because it is genuinely counter-intuitive. Take a test that is ninety-nine percent sensitive and ninety-nine percent specific, and apply it to ten thousand people where the condition affects one in a thousand. Ten people have it, and the test finds all ten. Of the nine thousand nine hundred and ninety who do not, one percent, about a hundred, test positive anyway. So there are a hundred and ten positives, and only ten are real. The positive predictive value is about nine percent. A positive result from this excellent test means the condition is probably absent. That is not a flaw in the test. It is arithmetic.

18. What follows from the arithmetic

Several things follow. Screening programmes are designed by epidemiologists rather than enthusiasts. A claim that a model is ninety-nine percent accurate is close to meaningless without prevalence, and any software you write that classifies anything clinical must report more than accuracy. A positive screen is a reason to look further, not a diagnosis, which is why confirmatory tests exist. And for tests that give a continuous value, someone must choose the cut-off. A receiver operating characteristic curve shows every available trade between catching cases and raising false alarms. Where to set the threshold is a clinical and ethical decision, because the cost of a missed case and the cost of a false alarm cannot be reduced to one formula.

19. Devices, software, and training technology

Now the equipment, the software and the training technology of this area, and where a technologist can realistically contribute.

20. Clinical devices and software

On the device side: digital radiography, CT, MRI and ultrasound systems; automated analysers doing thousands of tests an hour with robotics, fluidics and optics; PCR instruments where thermal uniformity is the core engineering problem; mass spectrometers; digital slide scanners producing gigabyte files; and point-of-care readers built around self-contained microfluidic cartridges. On the software side: PACS stores and distributes images in DICOM; radiology and laboratory information systems integrate over HL7 and increasingly FHIR. 3D Slicer is the standard free route from DICOM to a surface mesh, and pydicom with SimpleITK will take a programmer a long way. With OHIF and Orthanc you can build a complete imaging pipeline on your own machine with public data.

21. Training technology and entry points

Training is where most realistic entry points are. Ultrasound phantoms are cast from gelatin, agar, PVA cryogel or silicone with embedded targets. Vascular access trainers put simulated vessels in tissue-mimicking material. Teaching files and public datasets support interpretation. Anatomical models from imaging may be printed, milled, or cast from a mould, and they carry the clearest accuracy obligation of anything here. And instrument test fixtures, machined holders, electronic signal and pressure simulators and reference samples, are valued by clinical engineering and laboratories and are rarely glamorous enough for anyone else to make.

22. The best first project here — an ultrasound phantom

The ultrasound phantom is the best first project in this chapter. It is cheap, it uses mould-making and casting skills you already have, it needs no patient contact, and educators want them because commercial ones are expensive and degrade. The mould can be anything watertight: a fabricated acrylic box, a turned or milled former, a sheet-metal tray or a printed shell. The material, gelatin, agar, PVA cryogel or silicone, is where the real decisions are. Its limitations are easy to state: its speed of sound, attenuation and backscatter are not those of tissue, it has a short life and it grows mould. None of that stops it teaching probe handling, if you say so. Agree the objective with the educator first.

23. Worked example: a model from a patient's scan

A surgeon asks for a physical model of a patient's pelvis from a CT scan, for planning and to explain the operation to the patient. Before touching a file you must establish information governance approval, because approval precedes access. You must know who anonymises the data and how that is verified. You need to know what the model is for, whether it needs to be physical at all, what accuracy is required and who says so, and who verifies the anatomy. If it enters the sterile field this becomes a different project entirely. And check the scan protocol, because a five millimetre slice cannot support a half millimetre claim.

24. The label is part of the deliverable

Then you record everything: the series used, the segmentation method and every threshold, the smoothing and decimation settings, scale verification, the fabrication method and its settings, measured dimensional checks, and the verification sign-off. And you write a statement like this one on the model and in the handover. That paragraph is the deliverable as much as the object is. Without it, the model is a convincing artefact whose provenance nobody can reconstruct.

25. Workshop exercise and exit criteria

For the exercises: install 3D Slicer, take a public anonymised dataset, segment a bone, and make it physical by whichever route your workshop suits best, recording why. Then re-segment at three thresholds and measure the same dimension each time; the spread is your honest answer to how accurate a model from a scan is. Cast an ultrasound phantom and write its limitations. Compute the positive predictive value for a test that is ninety-five percent sensitive and ninety percent specific at one percent and at forty percent prevalence. And open a DICOM file in Python and find the tags that would identify a patient.

26. What this chapter does not establish

Finally, the limits. You know what each measurement is, but you cannot interpret any image or result; that is a long, specialised clinical skill. You cannot handle clinical imaging data without approval, and anonymisation is a verified process. You cannot certify a model's anatomical accuracy; a qualified person checks it every time. Nothing here is for the sterile field. A phantom is not tissue, so say what it teaches and what it does not. And a reported accuracy figure is not performance without prevalence. Next, diagnostic devices: how they work and what they are for.