Chapter 15
Measurement, imaging, and the diagnostic laboratory What a measurement really is, and when you can trust it
Human Biology for the Medical Maker
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.
Why this chapter exists Measurement is most of what a hospital does before treatment Realistic first projects: cast phantoms, machined jigs, signal simulators Specimen-handling aids, training datasets, models derived from imaging Every one needs you to understand the underlying measurement The four-layer model from chapter nine — phenomenon, sensor, display, interpretation — gets its fullest workout here.
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.
Medical imaging What each modality measures, and the trades they share
First, imaging. This chapter is the overview. How each machine actually works, its physics and safety, is the subject of chapter sixteen.
The modalities at a glance Modality Physical principle Good at Costs and limits Plain X-ray Attenuation by density and atomic number Bone, chest, foreign bodies; cheap Ionising; 3D collapsed to 2D CT Many X-ray projections reconstructed Bone, acute bleeding, speed Higher dose; weaker soft tissue MRI Hydrogen nuclei in a strong field Soft tissue contrast, no ionising dose Slow, costly, projectile hazard Ultrasound Echoes from impedance boundaries Real time, portable, guidance Operator-dependent; blocked by bone and gas Nuclear and PET A tracer concentrates by function Physiology and metabolism Ionising; low resolution Endoscopy and OCT Light Direct view, biopsy; micrometre slices Invasive; shallow
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.
None of them measures anatomy Anatomy is inferred from one physical property. That inference is where artefacts and error live.
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.
Image quality, and the trade you cannot escape Parameters Spatial, contrast, and temporal resolution Signal-to-noise ratio Field of view and slice thickness Partial volume: one voxel, two tissues, averaged The trade Every parameter trades against the others In ionising modalities, they trade against dose ALARA : as low as reasonably achievableEvery X-ray or CT is a justified decision 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.
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.
An attractive reconstruction is not an accurate one Threshold choice alone can shift a bone surface by a millimetre or more Partial volume makes thin walls vanish or merge Smoothing removes real detail with the noise None of this is visible in the finished object Anonymisation is verified, not a best effort: private tags, burned-in pixels The model is a hypothesis until a qualified person checks it against the source images.
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.
Laboratory medicine Disciplines, principles, and point-of-care testing
Now the laboratory, where roughly two thirds of clinical decisions are said to involve some laboratory data.
The laboratory disciplines Discipline Measures Typical methods Clinical biochemistry Electrolytes, glucose, kidney and liver markers, drugs Spectrophotometry, ion-selective electrodes, immunoassay Haematology Cell counts, morphology, clotting Flow cytometry, microscopy, coagulometry Microbiology Organisms and antibiotic susceptibility Culture, Gram stain, MALDI-TOF, molecular Histopathology Tissue and cell structure Sectioning, staining, microscopy Immunology Antibodies, antigens ELISA, flow cytometry Molecular diagnostics Nucleic acid sequences PCR, qPCR, sequencing Transfusion science Blood groups and compatibility Agglutination, antibody screening
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.
The measurement principles worth knowing Principle How it works Spectrophotometry Absorbance at a chosen wavelength gives concentration — Beer–Lambert, as in pulse oximetry Ion-selective electrode A membrane potential that varies logarithmically with one ion's activity Amperometry Current from an electrode reaction — the glucose meter Immunoassay An antibody binds its target; a label reports it. ELISA; lateral flow strips Flow cytometry Cells pass a laser single file; scatter and fluorescence classify them PCR Thermal cycling doubles a target sequence each cycle Mass spectrometry Ionise, separate by mass-to-charge, detect
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.
Point-of-care testing Gains Speed Accessibility at the bedside Glucose, blood gas, lateral flow, coagulation Gives up by default Analytical performance Calibration and external quality assurance Trained operators and an audit trail That is why point-of-care programmes have their own governance.
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.
Engineering bridge: what makes a measurement trustworthy The heart of the chapter
Now the engineering bridge, which is the heart of this chapter. This vocabulary applies to anything you will ever build that produces a number.
The vocabulary of trust Term Meaning Accuracy Closeness to the true value — freedom from systematic error Precision Closeness of repeats to each other — freedom from random error Bias The difference between the average result and the true value Repeatability / reproducibility Same operator and conditions / across operators, instruments, sites Calibration and traceability An unbroken chain back to a reference standard Drift Slow change in output with no change in input Uncertainty Quantified doubt — a result without it is incomplete
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.
Accuracy and precision are independent An instrument can be precise and consistently wrong. That is bias — and it is the more dangerous failure, because the repeatability looks reassuring. The pulse oximeter in chapter nine is the example
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.
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.
The arithmetic everyone should do once 99% sensitive, 99% specific, prevalence 1 in 1,000 Condition present Condition absent Total Test positive 10 100 110 Test negative 0 9,890 9,890 Total 10 9,990 10,000
Positive predictive value about 9%. A positive result from a 99% test means the condition is probably absent.
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.
What follows from the arithmetic Screening programmes are designed by epidemiologists, not enthusiasts "Our model is 99% accurate" means little without prevalence Clinical classifiers must report more than an accuracy figure A positive screen is a reason to look further, not a diagnosis Thresholds: ROC curves show the trade; people choose the cut-off 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.
Devices, software, and training technology Now the equipment, the software and the training technology of this area, and where a technologist can realistically contribute.
Clinical devices and software Devices Digital radiography, CT, MRI, ultrasound Automated and haematology analysers PCR instruments, mass spectrometers, slide scanners Point-of-care cartridges and readers Software PACS and DICOM; RIS and LIS over HL7 and FHIR 3D Slicer, ITK-SNAP, InVesalius — free pydicom and SimpleITK for code OHIF, Orthanc: a whole pipeline on public data 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.
Training technology and entry points Training technology Form Ultrasound phantoms Gelatin, agar, PVA cryogel or silicone with embedded targets Vascular access trainers Simulated vessels in tissue-mimicking material Teaching files and datasets Radiopaedia, TCIA — anonymised cases Anatomical models from imaging Printed, milled, or cast from a mould; clearest accuracy obligation Instrument test fixtures Machined holders, signal and pressure simulators, reference samples Radiation safety trainers Simulation software and survey-meter practice
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.
The best first project here — an ultrasound phantom Mould: fabricated acrylic, milled former, sheet-metal tray, or printed shell Material: gelatin, agar, PVA cryogel, silicone — the real decision Scatterer plus embedded targets; a few pounds of materials Limits: wrong acoustic properties, short life, grows mould Agree the target first — which skill, at which depth, with what needle.
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.
Worked example: a model from a patient's scan Before touching a file Why Information governance approval? Approval precedes access Who anonymises and verifies? Identifiers hide in private tags and pixels What is it for? Planning, rehearsal, explanation and sizing differ Does it need to be physical? A screen model may do; purpose decides the method What accuracy, and who says? "Looks right" is not a specification Who verifies the anatomy? A qualified person — not you Sterile field? Scan protocol? A 5 mm slice cannot support a 0.5 mm claim
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.
The label is part of the deliverable Derived from CT series [id], slice thickness [x] mm. Segmentation by [method] at threshold [value]. Smoothed and decimated. Dimensional check [result]. Verified by [name, role, date]. Not sterile. Not for intraoperative use. Without it, the model is a convincing artefact whose provenance nobody can reconstruct.
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.
Workshop exercise and exit criteria Run DICOM to segmentation to mesh to object on a public dataset; justify the route Segment at three thresholds and measure the spread Cast an ultrasound phantom and list four limitations Compute PPV for 95% sensitivity, 90% specificity at 1% and 40% prevalence Open a DICOM file with pydicom and find identifying tags 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.
What this chapter does not establish You cannot interpret any image or result You cannot handle clinical imaging data without approval You cannot certify a model's anatomical accuracy Nothing here is for the sterile field A phantom is not tissue; an accuracy figure is not performance Next — Diagnostic devices, how they work and what they are for.
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.