X-ray computed tomography

X-ray computed tomography (CT) can reveal the internal details of objects in three dimensions non-destructively. In this Primer, we outline the basic principles of CT and describe the ways in which a CT scan can be acquired using X-ray tubes and synchrotron sources, including the different possible contrast modes that can be exploited. We explain the process of computationally reconstructing three-dimensional (3D) images from 2D radiographs and how to segment the 3D images for subsequent visualization and quantification. Whereas CT is widely used in medical and heavy industrial contexts at relatively low resolutions, here we focus on the application of higher resolution X-ray CT across science and engineering. We consider the application of X-ray CT to study subjects across the materials, metrology and manufacturing, engineering, food, biological, geological and palaeontological sciences. We examine how CT can be used to follow the structural evolution of materials in three dimensions in real time or in a time-lapse manner, for example to follow materials manufacturing or the in-service behaviour and degradation of manufactured components. Finally, we consider the potential for radiation damage and common sources of imaging artefacts, discuss reproducibility issues and consider future advances and opportunities. This Primer on X-ray computed tomography explores the different experimental configurations for three-dimensional data acquisition as well as the fundamentals of three-dimensional data reconstruction, segmentation and analysis with examples across the physical and life sciences.

The non-destructive aspect also opens up the possibility of longitudinal studies monitoring the evolution of 3D structure, for example the growth of a malignant tumour undergoing treatment 4 , the manufacture and assembly of products 5 or product degradation in service 6 . In this respect, CT scanning can either be undertaken periodically in a time-lapse manner, such as to follow the metamorphosis of a chrysalis 7 , or continuously in real time, such as to track the progress of a fluid through rock 8 , cracks during the fracture of a sample 9 or the catastrophic thermal runaway failure of a lithium battery 10 .
The contrast recorded by each projection is dependent on the interaction of X-rays with matter. As a result, several contrast modes are possible that suit different types of imaging task. When an electromagnetic X-ray wave passes through an object, both the intensity and the phase change vary according to the refractive index, n: n δ β = 1 − +i (1) where the imaginary part (β) controls the attenuation (absorption) and the real part (δ) the phase shift as the X-rays pass through the object. The former is exploited to obtain attenuation contrast, while the real part is exploited for phase contrast. The linear attenuation coefficient, μ, expresses the attenuation of X-rays as they pass through Radiographs Images formed by x-rays transmitted through an object, originally collected on a photographic plate but now acquired digitally.

Projections
Radiographs of the object acquired at a given angle of illumination that, when combined with many others, provide the data for numerically reconstructing the object. Normally, between 100 and 3,600 projections are used to reconstruct a tomogram.

Greyscale
A synonym for the range of voxel values within a slice, volume or tomographic data set.
the material and is given by 4πβ/λ, where λ is the X-ray wavelength 11 . When deciding whether, or how, to undertake a CT scan, several important factors need to be considered, including the object size, the features of interest and their composition, the allowable dose and the temporal resolution. Just as 2D images are made up of 2D pixels, 3D images are made up of many cubic volume elements called voxels. The spatial resolution is typically larger than the voxel size, depending on the scanning conditions 5 . Although one can detect features that are smaller than the voxel size if they are reasonably well separated and have sufficient contrast to differentiate them from noise in the reconstruction, to properly characterize features (shape, volume and so on) the selected voxel size must be significantly smaller than the size of the expected features or their separation. Conventional (medical or heavy industrial) CT generally refers to submillimetre resolutions or poorer (voxel sizes ≥100 µm), microtomography (microCT) to micrometre resolutions (voxel sizes ≥0.1 µm) and nanotomography (nanoCT) to nanometre resolutions (down to voxel sizes ~10 nm). Selecting a smaller voxel size usually means accepting a smaller object size. This is in part because having a smaller effective pixel size generally means recording a smaller field of view (FoV) on the detector. But this is also because of the increase in acquisition time associated with stitching together multiple FoVs, along with the marked increase in the computational reconstruction task and the storage requirements, as the sample/voxel size ratio increases.
In addition to selecting a scanner with the appropriate spatial resolution, the contrast between features is critical to their detection. Indeed, contrast agents and phase contrast can be used to detect details finer than the spatial resolution. As the linear attenuation coefficient generally rises sharply with increasing atomic number (due to scattering by the electrons) and falls with increasing X-ray energy, attenuation contrast is well suited to distinguishing materials with large differences in electron density, for example bone fractures (contrast between calcium-containing hydroxyapatite and cracks) and porous networks in hydrocarbon reservoirs (contrast between sandstones or carbonates and pores). Low atomic number materials, such as soft tissue and carbon fibre composites, generally show poor attenuation contrast, and are better suited to phase contrast imaging. For the imaging of intracellular detail, soft nanoCT can exploit the water window (X-ray energies between 284 and 543 eV) across which water is essentially X-ray transparent. The attenuation contrast can be tailored by selecting the X-ray energy (monochromatic beam) or range of energies (polychromatic beam) used. Too high an energy can lead to low attenuation and hence poor contrast, whereas too low an energy can lead to no penetration and hence little detected signal. This balance between contrast and sample penetration means that as the sample size increases, the optimal X-ray energy increases. As a result, nanoCT systems usually work at either soft (<1 keV) or moderate (5-30 keV) energies, microCT and clinical scanners at high energies (30-300 keV and 80-140 keV, respectively) and heavy industrial CT systems at very high energies (>400 keV).
The field of X-ray CT is expanding rapidly both in terms of the range of applications and with regard to the development of new imaging modalities. In this Primer, we focus on introducing the general principles underlying conventional scalar attenuation and phase contrast CT, and their practical implementation and limitations across a range of applications in the areas of microCT and nanoCT. For the application of CT imaging within a clinical context, the reader is referred to Refs 4,12 , and to Ref. 5 with regard to high-energy industrial CT. Similarly, the reader is pointed elsewhere for a discussion of advanced methods [13][14][15] , for example where scattered signals (such as diffraction, fluorescence and so on) are used to reconstruct the spatial variation of tensor properties (for example, strain 16 , polycrystalline grain orientations 17,18 , crystalline phases 19 , nanostructure 20 or elemental composition 21 ).

Experimentation
In this section, we introduce the principal components of CT scanners and their typical configurations before considering attenuation and phase contrast CT.
Experimental configuration. The three basic physical components of a CT scanner are the X-ray source, the X-ray detector and the sample stage (fIg. 1). The architectural principle 'form follows function' 22 also governs CT system design and use. Function can be viewed from two interrelated but somewhat different perspectives: one dictated by the objects being imaged, and the other defined by the nature of the X-ray source and detector.
If the function is patient or laboratory animal imaging, for example, then the form is determined by the need for the patient and their organs to remain motionless. Therefore, the form is a scanner located in the clinic or laboratory, where the X-ray source and detector rotate around the supine 'patient' (fIg. 1a). If the function is to image centimetre-sized or millimetre-sized specimens, then the X-ray source and detector are best kept stationary while the specimen rotates (fIg. 1b,c).
From the perspective of instrument function, the X-ray source and the X-ray detector dictate practical scanner forms. In most cases, the source is either an x-ray tube or a synchrotron storage ring. In both cases, X-rays are produced by the acceleration of electrons. X-ray tubes are (relatively) simple, numerous and inexpensive devices that power laboratory CT scanners, whereas there are relatively few synchrotron facilities worldwide, each hosting dozens of experimental stations (including CT beamlines) tangential to the storage ring. Their beams differ in terms of x-ray flux, source size and X-ray energy spectrum, as discussed below and in detail elsewhere 23 .
Tube sources emit a wide spectrum of X-ray energies (a broad polychromatic -usually white -beam along with sharp peaks characteristic of the target material) in a cone. The maximum energy of this spectrum of X-ray energies is determined by the electron accelerating voltage. To use as many photons as possible that emanate from the source, tube source microCT instruments typically use the cone beam design (fIg. 1b). The solid angle of the X-ray cone illuminates a significant sample volume. The geometrical magnification of the image can be increased by moving smaller samples closer to the source (and farther from the detector), so as to expand the projection of the image across more pixels on the detector. This geometrical magnification decreases the effective size represented by each voxel. Scan times typically range from minutes to hours depending on the resolution required.
In a synchrotron, the path of circulating electrons is bent and accelerated radially either by bending magnets or by insertion devices such as undulators or wigglers 23 . The resulting highly directional X-ray beam travels down a vacuum beam pipe to the experiment (here, the tomography station). Synchrotrons provide many orders of magnitude more flux than tube sources and often a monochromatic beam is selected from the X-ray spectrum. This improves sensitivity to small differences in absorptivity and limits certain artefacts. Often the beam is spatially coherent, an advantage for imaging with phase contrast (see below). The X-ray beam reaching the specimen is typically highly parallel (fIg. 1c) because the X-ray source is tens to hundreds of metres from the object. As a result, the reconstructed voxel size is equal to the detector pixel size. Scan times typically range from sub-seconds to minutes 24 .
Strict adherence to the mathematical assumptions underlying reconstruction algorithms dictates that the entire sample cross-section should be fully illuminated and remain within the FoV of the detector for all projections. It is common practice to select a magnification ratio (cone beam) or beam size (parallel beam) that ensures the full width of the sample lies within the FoV (although this need not necessarily be the case for every scan). The systems shown in fIg. 1 are projection systems having no lenses; by contrast, nanoCT instruments often employ X-ray condenser and objective lenses (for example, zone plates) in arrangements such as that shown in fIg. 2a. In such cases, voxel sizes less than 50 nm can be used for specimens having dimensions ~50 µm or less 25 .
X-ray area detectors are normally used to record the spatial pattern of transmitted X-ray intensities across each projection. Most detectors convert X-rays into visible light with a scintillator and then, via an array of complementary metal-oxide semiconductor or other devices, to electrons for digital processing. In laboratory microCT, where it is critical to capture as many X-ray photons as possible, designers most often couple the scintillator and the complementary metal-oxide semiconductor array by affixing them to opposite sides of a fibre optic array. In synchrotron microCT, where photon flux is high, less efficient and low depth of focus optical lenses often link single crystal scintillators with complementary metal-oxide semiconductor detectors, which allows resolution well below the detector pixel size. Because the illumination provided by X-ray sources is far from uniform, and detectors show pixel to pixel variations in sensitivity, a projection must be acquired without the sample in the FoV to compensate Voxels (An abbreviation for volume elements). The basic unit of a three-dimensional digital representation of an image or object. The voxel size should not be confused with the spatial resolution.

Spatial resolution
The smallest linear distance between two points that can be distinguished in the reconstructed image. Usually larger than the voxel size, depending on the scanned materials and the scanning conditions.

Contrast agents
Highly attenuating particles, gases or stains used to increase the x-ray attenuation contrast of specific structures or defects.

Monochromatic beam
A beam (of x-rays) containing photons with a single energy (wavelength) or a narrow range of energies.

Polychromatic beam
A beam (of x-rays) containing photons having a wide range of wavelengths. Typical of x-ray tube sources, but also available at some synchrotron beamlines. for tube sources, the accelerating voltage determines the maximum x-ray energy but the majority of the x-ray photons have a much lower energy.

X-ray tube
A relatively low-cost and compact source of polychromatic x-rays, typically used in cone beam tomography, producing x-rays by accelerating energetic electrons into a metal target with the subsequent deceleration producing a divergent beam of a broad spectrum of x-ray energies along with characteristic peaks.

Synchrotron
A large-scale facility in which electrons circulate continuously around an essentially circular path defined by bending magnets. Bending magnets and insertion devices deflect the electrons, thereby creating x-ray beams tangential to the ring.

X-ray flux
The number of x-ray photons in the incident beam per second per unit area.

Box 1 | Common types of X-ray CT images
Computed tomography (CT) scan of a fatigue crack in a titanium/silicon carbide tungsten-cored monofilamentary fibre metal matrix composite imaged at maximum crack opening load: radiograph (projection) (see the figure, part a), reconstructed tomogram (see the figure, part b), virtual cross-section (see the figure, part c) and volume rendering showing fibres (yellow), titanium matrix (transparent), matrix crack (red) and fibre fractures (green) (see the figure, part d).
Image courtesy of Y. Wang, T. L. Burnett and P. J. Withers. for these variations during reconstruction: this is called a flat field correction.
Mechanical stability (both of the instrument and of the specimen) is essential in tomography. The precision/accuracy of motions must be smaller than the voxel size otherwise features within the reconstruction will be blurred. Although prior calibration can correct known (that is, reproducible) inaccuracies, wobble of the rotation axis or movement of the X-ray source during a scan, for example, can seriously degrade reconstructions. Adequate warm up of the X-ray tube (laboratory) or monochromator (synchrotron) is also important to avoid blurring due to thermally induced movement of the source during a scan.
Alternative tomographic arrangements can be extremely valuable for certain applications. For example, large aspect ratio panels and circuit boards present a serious challenge for conventional CT because of the inability to collect signals over the full 180° rotation. In such cases, laminography 26 can be used; this is a tomographic method using planar translation of the specimen and the detector coupled so that all features outside the selected focal plane are blurred out.
Attenuation contrast CT. The contrast obtained in each projection of the object is related to the attenuation of the beam. It is given by the line integral of the attenuation arising from the material encountered on the path of the beam as it passes through the object. For an object comprising multiple (i = 1...n) materials in the beam path, the transmitted intensity, I, falls exponentially compared with the incident intensity, I 0 , and is described by Beer-Lambert's law: where μ i and x i are the linear attenuation coefficient of, and path length through, the material, i. Each reconstructed slice is a map of the linear attenuation coefficient µ(x,y,z) for the corresponding section in the object (see, for example, fIg. 1d). Contrast sensitivity, which is the extent to which small changes Δµ can be detected, and resolving power, which is the degree to which small, closely spaced features can be distinguished, depend on the CT instrument, the sample and the data acquisition parameters. Materials having similar atomic numbers (Z) tend to produce little absorption contrast.
The signal to noise ratio within each radiograph affects the quality of the reconstruction. In terms of the signal, differentiation of Eq. 2 reveals that optimum contrast is obtained for µt ~ 2 (14% transmissivity) 27 , where t is the path length. In practice, not all of the photon paths can satisfy this criterion; one typically ensures that the transmissivity is never much worse than this by adjusting the X-ray tube accelerating voltage or the monochromatic energy. Note that avoiding detector saturation is also critical because this invalidates the flat field correction.
As mentioned in the Introduction, the linear attenuation coefficient (µ) of a given element changes with X-ray energy; this variation is smooth except for step changes that occur at the characteristic absorption edges. As μ changes abruptly at the element-specific energies corresponding to these edges, they can be used to enhance contrast in X-ray CT or to identify the presence of different elements. In tube source CT, two scans are undertaken using different accelerating voltages in an approach termed dual-energy CT (for an example, see Ref. 28 ). In synchrotron source CT, one can optimize contrast from element Z by collecting projection sets at energies on either side of a characteristic absorption edge of Z 27 . In both cases, numerical comparison of the pairs of reconstructions shows where element Z is concentrated.
Phase contrast imaging. Although attenuation contrast suffices for visualizing objects containing very different materials, many specimens contain materials that attenuate similarly (for example, soft tissue), and better contrast can be obtained by exploiting the materials' X-ray phase contrast [29][30][31][32]  Phase contrast stems from variations in the real part (δ) of the refractive index (Eq. 1), which generates a phase shift in the propagating X-ray wavefront, rather than the imaginary part (β), which describes the   253 . c | Parallel beam system geometry typical of synchrotron X-ray systems 253 . d | Virtual slice through an attenuation contrast tomogram of an iodine-stained mouse embryo 254 . Parts b and c adapted with permission from Ref. 253

Accelerating voltage
The electrical potential difference that accelerates the electrons that produce x-rays; this voltage determines the maximum x-ray energy.

Bending magnets
Magnets used to maintain the trajectory of the electrons in a synchrotron storage ring. They produce x-rays over a continuous spectrum and are typically much less intense and less focused than the beam of x-rays from an insertion device.

Insertion devices
Magnetic devices used in a synchrotron to produce x-rays from the circulating electrons.

Flat field correction
An image collected without the specimen in place, used to correct for the different sensitivity of each pixel in the detector or non-uniformities across the x-ray beam.

Laminography
A variant of x-ray computed tomography suited to the imaging of flat objects.
attenuation. For weakly attenuating materials and within the lower X-ray energy regime, δ can be orders of magnitude larger than β 33,34 . As a result, greater contrast can be expected by designing the imaging process to detect phase shifts and by incorporating their extraction into the reconstruction step.
Phase shifts are detected indirectly by measuring modulated intensity patterns because direct measurement of the phase of an electromagnetic wave is difficult. Several different experimental approaches exist for detecting phase shifts. The simplest is propagation-based imaging (also called in-line phase contrast imaging) [35][36][37] , whose set-up is identical to that of a conventional CT apparatus except that the detector is far from the sample instead of close to it. The X-ray wave passes through the specimen and propagates in space before its intensity is recorded; parts of the wave with different phases interfere, modulating the intensity and producing intensity peaks and troughs at internal and external boundaries. Certain reconstruction algorithms explicitly incorporate the pattern of boundary fringes into a map emphasizing differences in phase contrast. Propagation-based phase contrast microCT, where contrast increases with the distance between source and detector, is a standard option at many synchrotron beamlines 35 .
Other X-ray phase contrast approaches rely on optical elements to convert phase shifts into modulated intensity patterns. Zernike phase contrast [38][39][40][41][42] is commonly implemented when spatial resolutions on the micrometre scale or below are required. Inserting a phase ring into the beam (fIg. 2a) generates a phase shift between the unscattered and scattered X-rays and increases the visibility of interference between them, which would otherwise be out of phase by approximately π / 2. Other phase contrast imaging techniques can be grouped into interferometric and non-interferometric approaches. Grating interferometry [43][44][45] is the most widely used interferometric method, where two (or three) finely pitched gratings facilitate indirect measurements of the phase shift (fIg. 2b). Non-interferometric methods are based on the idea that X-ray refraction -minute changes in the direction of travel -can be detected by means of a single crystal analyser and scanning across the crystal's diffraction peak (analyser-based imaging) 46,47 or by a beam stop array in front of the detector (edge illumination method) 48 .
In order to obtain high-contrast images, the propagation-based and Zernike techniques should be implemented with spatially coherent radiation either available at third-generation synchrotrons or from microfocus X-ray tube sources 49 . X-ray source technology has greatly advanced over the past decade and has substantially increased the practicality of using phase contrast imaging in research laboratories outside

Absorption edges
Characteristic sharp discontinuities in the absorption spectrum of a substance that are related to the sharply defined energy levels that electrons occupy in the atoms of a given element.

Coherent radiation
An x-ray beam in which all of the photons in a plane have the same (wave) phase.
large-scale synchrotron facilities. Modern X-ray generators such as liquid metal jet sources 50 , where a liquid rather than a solid target is bombarded with electrons, or inverse Compton sources 51 offer significantly higher flux at micrometre-scale focal spots than conventional X-ray tube technology and allow phase contrast scans to be performed within time frames suitable for living animals 50,52 . In addition, grating interferometry and edge illumination techniques have relaxed source requirements and can be implemented in laboratory settings with non-microfocal X-ray tube sources. Irrespective of the approach and because detectors cannot measure phase, the phase shifts must be decoded from the recorded patterns of intensity: this process is known as phase retrieval. Numerous phase retrieval methods exist 45,[53][54][55][56][57] , varying in the complexity of the required input data. Paganin's method 58 is most commonly used for propagation-based imaging. It assumes a constant linear relationship between δ and β, allowing phase shift recovery by application of a low-pass filter to the intensity data.

Results
As the term 'computed tomography' implies, the collection of the projection data is only the first step to obtaining a tomogram and deriving useful insights from it. Here, we consider how computed reconstruction produces a 3D stack of slices from the 2D radiographs. Sometimes, analysis requires only visual inspection of these (or other) virtual greyscale slices cut through the tomogram. However, in many cases we need to quantify and three-dimensionally visualize specific regions within the volume. This is achieved by segmentation, analysis and volume rendering and is outlined in the second half of this section.

Computed reconstruction methods.
Computational reconstruction recovers the spatial distribution of the attenuation coefficient μ(x,y) (or phase decrement δ(x,y) for phase contrast) slice by slice, to form a greyscale image of the object, from the set of projections (radiographs). The relationship between the slices and projections is described mathematically by the Radon transform 59 . Two broad classes of reconstruction algorithms, namely analytic and iterative methods, are based on the transform.
For brevity, this section introduces the broad principles of the most commonly used analytic method, the filtered backprojection. The radiographs used in CT represent 2D projections of the specimen's attenuation according to Eq. 2. By way of example, consider parallel beam CT (fIg. 1c) of an object (here, a human head), as depicted in fIg. 3. If we consider one cross-sectional slice, recorded by a row of pixels on the detector, we can represent the attenuation as a line profile. For a given projection angle, θ, each pixel on the detector sums the X-ray photons passing through the specimen slice along a given beam path; fIg. 3b shows three projection angles and the corresponding projection (a line profile) of absorptivity. As the sample is rotated, the row of pixels

Segmentation
An image-processing procedure of assigning a label to every voxel in a volume such that voxels with the same label share certain characteristics.

Volume rendering
Three-dimensional representation of data, often with certain segmented regions colourized or rendered transparent.

Radon transform
An integral transform that projects a cross-sectional slice along a given direction to give the one-dimensional profile. In x-ray computed tomography, the plot of the Radon transform for a slice is represented by a sinogram.
traces out a sinogram (fIg. 3c) showing the variation in attenuation across the row of pixels as the projection angle varies. In fIg. 3d, the backprojection reconstruction algorithm 60 takes each projection making up the sinogram and mathematically projects it back along the angle θ at which it was recorded. In other words, the mass represented by each line profile is distributed uniformly along the ray path at each angle. This virtual mass builds up at positions where the intensities from different projections intersect. With an increasing number of line profiles -corresponding to an increasing number of radiographs (projections) -backprojected, an increasingly faithful backprojection image of the object is recovered. However, it is evident from fIg. 3d that backprojection spreads mass where there is, in fact, no mass, introducing blurring into the reconstruction (as seen by comparing fIg. 3a,e). Filtered backprojection corrects for this blurring by applying a filter (most commonly a ramp filter) to the projections. This suppresses the low frequencies to compensate for the high-frequency components in Fourier space that are missing (due to insufficient sampling) and leads to a sharper image 61 More detailed mathematical treatments of this and other methods appear elsewhere [61][62][63] .
In parallel beam geometry (fIg. 1c), attenuation from each slice is independent of the other slices, and each slice in the stack can be reconstructed separately. By contrast, cone beam CT and the related helical CT employ beams diverging from an X-ray tube source. For a vertical rotation axis, the voxels within a given physical slice of the object therefore project to a lower/higher detector position when they are farther from/nearer to the X-ray source. This means that sets of rays contribute to more than one slice, and the absorption paths must be treated as 3D and not 2D. If the cone angle is small, practical reconstruction is possible using the Feldkamp, Davis and Kress filtered backprojection algorithm 64 but incurs cone beam distortions. An exact reconstruction for the helical trajectory is possible with the Katsevich algorithm 65 .
An important question to ask is how many projections are required to recover an acceptable image. At a minimum, the angular change between projections should be no greater than the voxel size at the outer diameter of the object. Therefore, the number of points needed along the circumference to satisfy the sampling condition is qπ, where q is the number of pixels across the diameter of the object. As each projection profile provides two points along this circumference, the minimum number of projections is qπ / 2 (Ref. 61 ), which is in line with more rigorous analyses [66][67][68] . This means that for a 2,000-pixel detector, around 3,200 projections are recommended. In practice, it is often sufficient to use considerably fewer projections, especially if features in the centre of the FoV are of interest. When the number of projections is too sparse or non-uniform, then imaging artefacts will occur.
Even when the theory says there is no exact solution or when the data are severely under-sampled, high-quality reconstruction is still possible through the use of iterative reconstruction methods that incorporate prior information. First, a forward projection of the estimate of the object is used to create artificial projection data. This is then compared with the measured projection data to compute a correction term. This correction term is then backprojected onto the volumetric object estimate, and the process is repeated iteratively. The process can start either with an empty image estimate or using prior information, such as a standard filtered backprojection reconstruction of the object 69 . Iterative reconstruction methods offer the potential for high-quality reconstruction when the data are very noisy and sparse, but this is at the cost of a higher computational burden. Model-based iterative reconstructions go beyond modelling the statistics of the detected photons and include modelling of the acquisition process (scattering, beam hardening and so forth). They can generate high-quality reconstructions, even when the data are highly under-sampled. Iterative methods are being used increasingly in cases where imaging is suboptimal, that is, where only a limited angular range or number of projections can be acquired, or in cases where the dose must be limited or the acquisition time must be short 70 .
Machine learning methods are emerging for the reconstruction of tomographic data sets. For example, in situations where high temporal resolution is required, which dictates shortened detector integration times and a decrease in the number of projections 71 , machine learning methods can produce much better reconstructions than conventional analytic or iterative methods. In the spatial realm, convolutional neural networks and training data sets can produce super-resolution results, for example in clinical CT where slices 3 mm thick can be recovered from data sets containing slices 15 mm thick 72 .
Visualization and quantitative analysis. In principle, the constituent materials can be mapped across a tomogram by comparing the precise μ values recorded for each voxel with those tabulated for different materials at that X-ray energy 73 . In practice, this is not easy. First, different materials can have similar attenuation coefficients. For example, attenuation coefficients for aluminium and silicon carbide differ by 1%, making it difficult to distinguish the phases in an aluminium/silicon carbide composite 74 . Secondly, highly accurate determination of densities by microCT is challenging and requires the use of standards scanned under the same conditions as the unknown sample 75 . Nevertheless, precise measurements of μ are used to quantify bone mineral density 76 .
Quantifying morphological characteristics such as phase fractions, particle sizes and shapes, and pore networks requires segmentation of the volume image into regions representing the constituent materials. fIgURe 4 illustrates a simple, but widely employed, segmentation approach for an idealized elliptical specimen of a low absorption material (dark grey) containing an array of two higher attenuating phases (medium and light grey). The object can be grouped into regions based on ranges of voxel values (often referred to as greyscale levels). The choice of greyscale thresholds is often made with reference to the image's greyscale histogram. In the idealized case (fIg. 4), the object can easily be segmented into its four component materials because the final result is relatively Greyscale thresholds greyscale levels used in an image-processing procedure to segment a reconstructed volume based on the greyscale value of the voxel being above or below the given thresholds.

Histogram
A graph that shows how many times an event occurs across various groups of data or classes. often used to display the frequency of greyscale levels recorded in a tomogram. In practice, reconstructions typically contain noise, that is, apparently random variations in the voxel values. Visualization can be severely hampered if this noise is not removed prior to segmentation, and pre-processing with median or other filters is often employed for this purpose. As illustrated for a gravel filter pack 77 in fIg. 4, in addition to any noise in the image, the physics of radiograph collection and artefacts from the reconstruction process lead to wide peaks in the histograms associated with the constituent phases of real specimens, and this complicates the choice of where to set the segmentation limits. The partial volume effect also broadens histogram peaks. As the greyscale levels for the three regions overlap, their separation based simply on greyscale thresholds is inaccurate and very sensitive to the thresholds chosen as well as to any artefacts in the image.
In addition to threshold-based methods, boundarybased and region-growing approaches are prominent 23,78 . The features present and the type(s) of contrast dictate which method is preferable. If, for example, gradients of greyscale levels extend across the specimen owing to uneven illumination from beam hardening, applying a global threshold is problematic, and a local threshold method, where a variable threshold is set relative to the voxel's neighbours 79 , works better. A powerful alternative is to segment based on a range of local greyscale gradients simultaneously with a range of greyscale levels 80 . Boundary-based methods use relative differences in greyscale to detect the edges between materials. One example is mapping connected pore channels in a partially densified ceramic composite 81 ; the boundary following algorithm ignored isolated pores that global thresholding would have included. Watershed segmentation is a widely used region-growing method and is a direct analogue of the geographical or geological concept of a watershed: greyscale levels are considered heights and define different catchment basins. Watershed segmentation works well with foams where a significant fraction of cell walls cannot be detected 82 . A rapidly developing alternative to conventional methods is machine learning/deep learning for segmentation, which is most developed in medical CT image analysis 83 ; typically, a neural network is trained by the investigator (where the investigator manually identifies regions representative of the constituent phases), with the resulting neural network being capable of automatic segmentation of large image data sets.
Once segmented, many aspects of a tomogram can be quantified. Because X-ray CT can sample large volumes, it can provide excellent volume-averaged data or population distributions, including averaged quantities such as phase fractions (for example, phase A and porosity in a matrix of phase B 84 , or the bone volume per total volume of tissue 85 ) or the surface area of phase A per unit volume 86 . The large volumes that can be interrogated by CT make it ideal for locating and quantifying rare features or events that might be missed using cross-sectioning (for example, in the case of manufacturing defects). For the dimensional quantification of features of interest, the measurement uncertainty must be kept under control and the voxels must be small enough that several of them -depending on the application -span the

Partial volume effect
The appearance of greyscale levels in reconstructed data intermediate between those corresponding to two constituent materials when the voxel is partially filled by both. simple greyscale threshold methods can mis-segment such voxels. smallest structural dimension of the feature; otherwise, partially filled voxels produce high sensitivity to segmentation parameters and concomitant bias. It is often difficult to decide whether small, segmented features are noise-related or real structures, and a common approach is to quantify only features exceeding a minimum number of contiguous voxels. This places a limit on the smallest features that can be identified as being a multiple of the voxel in size, depending on the application. It is sometimes useful to employ erosion/dilation operations (or the converse) to clean up segmented volumes. Erosion removes one voxel from each surface and dilation adds one voxel to each surface. If there are small, isolated pores within the segmented solid, applying dilation by a single voxel fills in the voids having a diameter of two voxels or fewer while adding a voxel to each external surface. By following this with erosion to the same degree, the added surface voxels are removed but, because the internal voids no longer exist with the segmented solid, erosion does not reintroduce the small voids.
For microstructures that contain a network (for example, plates and struts, blood or other vessels, pores and cracks) or an array of objects (particles, fibres and voids), examples of quantities of interest include mean feature dimensions or volumes, the associated standard deviation and the distribution (histogram) of the feature population. Note that thicknesses and lengths need to be measured in three dimensions: in two dimensions, the apparent thickness of a plate depends on the angle that plate makes with the slice plane, and such potential bias of 2D sampling can invalidate any results. The distance transform method is widely used for valid, 3D thickness quantification 87 and is typically available in commercial packages such as BoneJ 88  The final step is often to visualize segmented images, and many visualization approaches (and software packages) exist. Visualization can be as simple as displaying three orthogonal greyscale sections, or ortho-sections (fIg. 5c), unwrapping a circular surface through the volume, a virtual autopsy for cause of death determination 89 or use in forensic anthropology 90 . More complex 2D and 3D representations exploit colour, or render transparent, certain segmented phases (see examples in fIg. 4d and   fIg. 5g), thereby highlighting important characteristics (see Box 1). Any visualization interprets the data and should be viewed cautiously: small changes in the value of the segmentation threshold may highlight small gaps between features when the gap is actually noise, or they may merge closely spaced objects when there are real, but small, gaps. Fly-around videos or cut-throughs are increasingly common as a means of visualizing the 3D nature of the object (see Supplementary Video 1 showing a Huntsman spider's head virtually extracted from amber) 271 whereas structural alteration/evolution over time can be effectively demonstrated in time-lapse videos (Supplementary Video 2 of a chrysalis pupating) 7 . The impact of archived data can be further increased by observer-directed viewing or sectioning of 3D data sets (for example, Digital Morphology at the University of Texas), whereas augmented reality is becoming an increasingly important interactive tool in museums and elsewhere 91 .
Applications X-ray CT can provide 3D and 4D (3D + time) information across a very wide range of applications. We do not hope to cover them all here, but rather to illustrate the types of information, the most appropriate imaging modes and the insight that can be gained through a few chosen application areas.
In each example below, the researchers have had to identify the most appropriate imaging conditions. First, they will have considered the resolution required; this is usually set to be about ten times the size of the smallest details to be observed in the sample. This determines whether a nanoCT or a microCT system is most appropriate, and what magnification is needed. This in turn dictates the FoV and whether region of interest scanning, or image stitching, is required to image a sufficiently large volume at the required resolution. The maximum pathlength through the sample then determines the maximum X-ray energy of the beam. For a given sample, this is a trade-off because the lower the energy, the higher the attenuation contrast between the different phases inside the sample, but also the lower the transmission. The energy is usually chosen to be the lowest energy that achieves enough transmission for all projections (say >10-20%). In some cases, a full 180° rotation may not be possible because of geometrical issues associated with extended laminar objects. If the attenuation contrast is unlikely to be sufficient to differentiate key features, phase contrast or sample staining can be considered. Finally, the scan time and the dose required to obtain a scan of sufficient quality need to be considered in terms of the exposure time and the number of projections. This is both because of the propensity for beam damage and also for temporal studies, where the frame rate needed to capture the events of interest is key. With regard to temporal resolution, synchrotron X-ray sources are able to provide a much higher X-ray flux than X-ray tube sources, and so are especially well suited to high temporal resolution studies where thousands of projections can be acquired per second even at micrometre resolutions 24,92 ; X-ray tube source CT, on the other hand, is better suited to longer timescale studies.

Pore throats
Characterizations of the smallest cross-sectional area of a pore channel, equal to the radius of a circle drawn perpendicular to fluid flow at the narrowest point.

Tortuosity
A measure of how winding a path or shape is, defined as the ratio of actual path length to the straight distance between the ends of the path. It is sensitive to the spatial resolution of the tomogram.

Ortho-sections
(Also known as ortho-slices). Three orthogonal virtual slices through the volume.

Region of interest scanning
Normally, computed tomography scans include the whole of the sample width in the field of view, but, in cases where higher resolution is required than this allows, it is possible to reconstruct data sets for which a smaller field of view is present in all of the projections, albeit with the introduction of some imaging artefacts such as uneven contrast.
Industrial metrology and manufacturing. X-ray CT is being used increasingly in manufacturing, not only to inspect and measure manufactured products and components but also to provide feedback in order to enhance quality at all stages of product development and manufacturing 5,93 . The advantage of CT over conventional industrial metrology tools, such as coordinate measuring machines, is that CT is able to quantify internal features and details that are difficult/impossible to access externally 94 . In addition to metrology, manufacturing defects such as pores, cracks, inclusions and density variations can be identified, providing quality assurance of the parts. The development of factory-style high-throughput in-line CT systems for rapid quality assurance inspections is now feasible 95 .
CT has been used with great success in the automotive and aerospace industries, for example to inspect metal castings for porosity and to inspect welds and joints for porosity, cracks and bond quality 96,97 . It is particularly advantageous in additive manufacturing, where some level of porosity tends to be unavoidable and its distribution can be very heterogeneous within ); colour-coding shows that the local thickness of the lattice struts lie within an acceptable range (green ~0.5 mm). b | Threedimensional (3D) rendering of a commercial Duracell CR2 battery showing the casing (orange), the current collector mesh (green) connected via a tab to the terminal (green) and a manganese dioxide electrode (grey); inset shows cracks between the electrode and current carrying mesh after discharge 256 (synchrotron microCT). c | Evolution of surface morphology and internal microstructure of an individual tin particle in a lithium-ion battery electrode before and after the first lithiation (synchrotron nanotomography (nanoCT)) 257 . d | 3D rendering of impact damage ply by ply for an 8-ply [0°/90°]2s carbon fibre composite panel (tube source microCT) 258 . e | Fatigue crack initiated from a focused ion beam notch in a titanium alloy (Ti-β21S) sample. Colour scale represents the height of the crack surface (for details, see Ref. 259 ). f | 3D rendering of human fibroblast cells (green), with nuclei (red) distributed within an electrospun scaffold (grey) 148 (tube source phase contrast-enhanced nanoCT). g | Volume rendering during thermal cycling of ice cream showing the relationship between the air cells (blue) and the surrounding ice crystals (grey) (synchrotron microCT) 1  complex 3D parts. CT images can guide manufacturing process optimization, paying particular attention to critical defects such as clusters of pores, near-surface pores or irregular lack-of-fusion pores [98][99][100] . For highly engineered parts, the limitation is that the critical defect sizes can be small (for example, tens of micrometres), which means that only relatively small samples can be scanned at sufficient spatial resolution. However, representative small test samples can be scanned for manufacturing process development, or for regular process quality checks. X-ray CT is also being applied to composites manufacturing, where delaminations are particularly important 101 , as well as in the fabrication of batteries and fuel cells, where insights into internal structure can be related to degradation behaviour 102 (fIg. 5b). Other examples of application include the evaluation of manufacturing and assembly errors in electronic products, packaging materials such as polymer food packaging, glass bottles and enclosures, and paint coating thickness distributions, to name but a few. The ability of X-ray CT to follow processes in a time-lapse manner (Box 2) is being used to increase the effectiveness of manufacturing processes. An example is observing the efficacy of hot isostatic pressing in closing porosity of additively manufactured parts by CT imaging before and after the processing step 103,104 . Similarly, in-service parts can be subjected to CT at regular intervals to evaluate wear, fatigue crack formation and growth or deformation of parts due to service use, and thereby evaluate their safe life potential 105 . All of the above areas are still being developed and show great potential for CT in advanced manufacturing and engineering failure analysis.
Industrial metrological applications typically demand high dimensional accuracy and pose specific requirements that can be challenging for X-ray CT. Furthermore, industrial CT metrology often also calls for high penetration power, as there is a need for the accurate measurement of increasingly complex metallic parts for aerospace and medical components (fIg. 5a and Supplementary Video 3). The region in the highlighted section of biomedical implant in fIg. 5a contains a lattice structure designed to allow bone in-growth and better long-term attachment to surrounding bone 106 . When dimensional or geometrical measurement results have to be obtained from CT data, for example to make decisions on the conformance of the inspected products or on the control and optimization of the manufacturing processes, mere visualization of geometries and extraction of quantity values is not sufficient if the measurement uncertainty is unknown. Measurement accuracy and metrological traceability are fundamental requirements in dimensional metrology 107 .
Good-practice procedures have been introduced for metrological CT to address different aspects. These include geometrical calibration of the scanning arrangement, the use of calibrated objects for error determination, procedures for optimizing settings, metrological performance verification and so on. Interlaboratory comparisons suggest that, under specified conditions, measurement errors as small as one-tenth of a voxel are possible for simple dimensional measurements 108 . The reader is directed elsewhere for reviews on qualification and testing procedures for metrological CT systems 109 and for examples of industrial metrology applications 93,94,110 .
Specific software tools have been devised for metrological analyses, such as nominal to actual comparisons -comparisons of the measured geometry with the computer-aided design model -and verification of dimensional and geometrical tolerances. Several algorithms have been developed to enhance the accuracy of CT measurements at different points of the CT data processing pipeline, ranging from correction of imaging artefacts to advanced methods for threshold determination and surface generation 78,111 .

Materials science.
Materials scientists have been using microCT since the early 1990s (Ref. 74 ) to provide a detailed picture of the internal structures of materials and their evolution during processing and/or in service. Previously, they had largely relied on the analysis of 2D sections (by scanning electron microscopy or optical microscopy) combined with stereology 112 . However, many aspects are not easily discerned from 2D sections, such as the degree of percolation of a phase in a sample 113 , fluid transport through a porous network 114 or the 3D architecture of cellular materials 115 . After appropriate segmentation (as in fIg. 4), CT allows the microstructure of materials to be quantitatively analysed in terms of the number of phases, volume fraction of phases, shape, specific surface, tortuosity and so on. This precise quantitative knowledge of the microstructure is a key element for Percolation The measure of the connectivity of a constituent domain in an object.

Box 2 | Time-resolved imaging
The range of length and timescales that can be imaged non-destructively by X-ray computed tomography (CT) makes it a unique tool for acquiring three-dimensional (3D) movies (sometimes called 4D imaging). The higher the desired resolution, the longer it takes to acquire the hundreds, or thousands, of radiographs needed for each scan. For X-ray tube sources, scans range from minutes to many hours, making them ideal for phenomena that occur over long timescales that can be followed in situ (for example, rising of dough or corrosion of steels) or processes that need to be monitored periodically in a time-lapse manner, such as cancerous tumours, fatigue cracks in engineering structures and the changes that occur during the cycling of batteries (fIg. 5).
For rapidly changing phenomena, the simplest approach is to take advantage of the higher flux available at synchrotron sources. These enable continuous streaming where projections are collected at extremely high rates as the sample continuously rotates. Acquisition times range from several CT scans per second to study fracture 264 through to hundreds of scans per second to study aluminium foaming 92 . For cyclic processes, this can be extended further by stroboscopic imaging, for example to analyse the biomechanics of the flight of a fly 265 . Alternatively, new CT scanning strategies are being developed around lower cost X-ray tube sources, for example where the source and the detector rotate around the sample (as in fIg. 1a), allowing scan times of around 10 s (Refs 8,266 ), or using multiple sources to illuminate the sample from many orientations 95 . In this way, it is possible to image thousands of manufactured parts per hour using a conveyor belt.
Novel reconstruction methods can further shorten scan times and give good reconstructions using relatively few projections. This is illustrated by the imaging of a dendrite growing in molten aluminium where the number of projections was undersampled by a factor of 16 (Ref. 260 ) (fIg. 6 and Supplementary Video 7) 260 . The changes taking place during time-lapse image sequences can be quantified by correlating images to infer displacement (and hence strain) fields using digital volume correlation [267][268][269] or by tracking the movement of features in the imaged volume 270 . One other aspect to consider for beam-sensitive materials and tissues is the cumulative dose, which can be significant when many scans are undertaken over a time sequence. the materials scientist in understanding the relationship between processing, microstructure and structural and/ or functional performance. For example, CT is uniquely able to locate defects inside a commercial battery (fIg. 5b) or to map the nature and extent of delamination impact damage layer by layer in a composite panel (fIg. 5d and Supplementary Video 4) 258 . It can also be used to locate features for subsequent in-depth study by higher resolution destructive electron microscopy methods 116 . In materials having very fine microstructural features, such as a change in morphology of battery electrode particles upon lithiation (fIg. 5c), tube or synchrotron source nanoCT 25 can be applied on submillimetre-sized samples.
Materials scientists often exploit the high flux of synchrotron sources for real-time experiments and X-ray tube systems for longer timescale (usually time-lapse) studies. Here, the ability to track the evolution of a region of interest over the lifetime of a single sample (for example, the growth of a fatigue crack in fIg. 5e and Supplementary Video 6 where high resolution and phase contrast aid crack detection) 259 can provide unambiguous insights into the evolutionary sequence. This contrasts with destructive longitudinal studies that rely on the statistical analysis of such features sampled at different times through the process. Indeed, for particularly rare or unpredictable events, in situ experiments significantly decrease the number of samples that need to be studied. Being able to quantify features continuously without stopping/holding/freezing the experiment also avoids questions about the validity of the features observed after holding/freezing treatments, for example in the semi-solid coarsening of metallic microstructures 117 .
Time-resolved imaging (Box 2) often requires the accommodation of in situ rigs on the CT scanner sample stage to follow manufacturing processes or in-service behaviour. Some in situ studies require extremely simple sample environments. One example is the setting of plaster; once the transformation is initiated by mixing water and plaster powder, setting can be observed by repeated imaging under ambient conditions 118 . Other studies, such as the solidification of metals (fIg. 6 and Supplementary Video 7), foaming, superplastic deformation 119 and additive manufacturing 120 , require complex environments to replicate their processing conditions where the temperature (heating or cooling), the atmosphere (nature of gas and pressure) and/or the stress state (tension and compression fatigue) can be controlled.
Once manufactured, a material's microstructure may evolve significantly in service according to the operating conditions. The behaviour of materials under a very wide range of in-service conditions has been studied by CT. One of the advantages of CT imaging is the ability to study how damage propagates, such as in fIg. 5e, leading to ultimate failure for various materials, strain rates 121 and stress states such as tension 122 , fatigue 123 , compression 124 , indentation 125 and hydrostatic pressure 126 .
Environmental conditions can also have a very strong effect on the degradation of materials in service, for example via corrosion and stress corrosion cracking 127 or exposure to high 128 or low 129 temperatures. Functional operation can also lead to structural changes; one example is the increasing use of X-ray CT, and in particular nanoCT, to study the behaviour of batteries during charging and discharging 130 (fIg. 5b,c), whereas high-speed imaging has been used to better understand the events leading to catastrophic thermal runaway 131 .
Finally, 3D tomographic images can also be used to produce image-based 3D simulations faithful to the microstructure by means of finite element 132 , discrete element 133 or fast Fourier transform-based 134 modelling. It is also possible to validate the predictive capability of such image-based models through direct comparison with the actual behaviour captured by time-resolved X-ray CT imaging 135 .
Biomedical and life sciences. The term biomedical imaging refers to the ex vivo, in situ or in vivo examination of biological samples or entire animals, rather than the diagnostic scanning of patients in a hospital setting. Whereas optical microscopy is often the imaging method of choice, X-ray CT has emerged as a powerful and versatile tool that can either complement or replace other modalities, owing to the ability of X-rays to penetrate deep into matter and the resulting opportunities for the rapid visualization of 3D structures. X-ray CT can indeed be used for digital histology, rendering relatively large specimen sections at once and facilitating a more time-efficient analysis than traditional histopathological slicing and slice by slice examination under the microscope.
When the imaging task is to visualize biological tissue that is calcified (such as bone) or contains calcifications (as in fIg. 2c), attenuation contrast CT is generally the appropriate method. The high X-ray attenuation of calcium provides high contrast. Indeed, the quantitative imaging of bone structure, porosity and mineral density marks the start of the application of X-ray CT in the biomedical area 136 and can be used to study links between bone morphology and biological factors such as ageing or drug use 137 . For non-calcified biomedical samples that generally exhibit weak intrinsic X-ray attenuation, contrast agents such as heavy element liquids 138,139 (for example, iodine), gases (for example, xenon 140 ) or nanoparticles can be used to locally increase the attenuation properties -and therefore the contrast -of a tissue (fIg. 1d). X-ray microCT using a tube source plays

Histology
The branch of biology studying tissues by optical or other microscopies.
a central role in the preclinical imaging of rodents, providing an excellent visualization of the skeletal structure 141 and rendering soft tissues when aided by contrast agents 142 . Owing to the high soft tissue contrast achievable through iodine-staining, X-ray microCT can also be used in a clinical context, for example as a tool for scan-based post-mortem assessment of structural abnormalities in deceased fetuses 143,144 . Phase contrast imaging is commonly applied when imaging soft tissue in cases where the use of contrast agents is not possible or undesirable. Phase contrast microCT can render weakly attenuating tissues with higher contrast than attenuation contrast CT (see fIg. 2) and/or at a lower dose. Phase contrast CT has been used to visualize the mouse brain, revealing the molecular, granular, white matter and Purkinje cell layers of the cerebellar vermis as well as axon bundles within the white matter 145 . Another example where phase contrast microCT shows great promise is the intraoperative scanning of tumour-bearing breast specimens excised during cancer surgery to visualize tumour margins in 3D tissue volumes 146 .
The resolving power of X-ray CT readily covers the cellular length scales and beyond. For example, synchrotron microCT can render whole zebrafish with cellular resolution, allowing the identification of morphological changes linked with intrinsic (for example, genetics) and extrinsic (for example, environmental) factors 147 . NanoCT exploiting Zernike phase contrast can render cells on a polymer scaffold (fIg. 5f) and can be used to quantify scaffold porosity, pore size and fibre diameter, cell length and cell diameter 148 , all of which can aid our understanding of cell-scaffold interaction.
X-ray CT is also opening up new opportunities across the plant 149 and zoological 150 sciences, enabling the digital curation of data associated with new species and providing new opportunities for data sharing 151,152 . In ecological studies, the use of CT can assist in quantifying biological morphologies as they vary according to environmental and ecological factors 153 . CT is also finding increasing use in biomimicry -where the real 3D morphology of biological structures on a microscale can be assessed for their translation to engineering solutions 154 .
Food science. The sensory appreciation and acceptance of food products by consumers is highly correlated to their texture and microstructure. As a result, the potential of X-ray microCT in food science applications, whether fresh produce or processed food products 155 , is vast. X-ray microCT is particularly well suited to the exploration of food products with foam structures, such as bread 156 . The microstructure of bread is determined by the spatial organization of properties such as the pore size, pore distribution and cell wall thickness. This can be visualized by scanning slices 20 mm thick cut from a loaf of bread, followed by digital isolation of equal-sized breadcrumb volumes of interest from the reconstructed 3D volumes 156 . The digitally isolated volumes of interest enable visualization of the porous structure and quantification of the cell wall thickness, crumb porosity and pore size distribution. This contributes to better understanding of pore networks and, in this case, the effect of changes in bread formulations on the texture and quality of the loaf. X-ray tube microCT, which requires up to an hour or even longer for image acquisition, is suitable for such applications.
Synchrotron CT scanners enable real-time imaging, for example to follow microstructural changes of ice cream 1 during thermal cycling between -15 and -5 °C. Such imaging requires an experimental set-up that can maintain the sample in a frozen state (here, -15 and -5 °C, respectively). In this study, 3,601 projections were each acquired with an exposure time of 0.1 s and a final pixel size of 0.8 μm before subsequent reconstruction of the 3D volume. The formation of coarse, faceted ice crystals and larger air cells due to thermal cycling is shown in fIg. 5g.
Freezing is also used in the processing of fresh produce and inevitably affects the tissue structure. Since the first non-destructive application of X-ray microCT to fresh produce in the early 1990s for the detection of maturity in green tomatoes, investigations on fruit and vegetables have characterized a range of quality factors such as produce maturity, produce decay, internal disorders of fresh fruit 157,158 such as apples 159 , and loss of texture in vegetables 160 . In addition, 3D ice crystal growth has been quantified using X-ray microCT in frozen carrots stored over a period of 2 months 161 .

Palaeontology.
As the only direct evidence of life that lived a few thousand to 3,500 million years ago, fossils are of critical significance in evolutionary biology. Their accurate interpretation is directly related to the amount of character information that can be extracted. X-ray microCT has revolutionized palaeontology by providing detailed, 3D views of structures that previously were inaccessible, or visible only through tedious and often destructive physical preparation.
X-ray imaging finds application across many length scales from large fossils embedded in tons of rock using very high-energy X-rays (up to 9 MeV) 162 to micrometre-sized fossils in amber viewed at moderate energies (<40 keV) 163 . Synchrotron CT, although presenting logistical stewardship issues associated with using national facilities, is providing images of extraordinary detail 164 , often exploiting phase contrast. Care should also be exercised because the intense synchrotron X-ray beam can damage fossils 165 . Amber browning 164 is perhaps the most striking example in palaeontology of specimen degradation. This consideration has not prevented it being used widely, the main limitations being access to synchrotron beamlines capable of phase contrast imaging and the small illumination area typical of these beamlines. CT scans can be converted into 3D models for myriad purposes from biomechanical analysis 166 to public exhibits and teaching, and for the worldwide archiving of digital facsimiles. Because the modes of fossilization vary widely, the microCT techniques employed also vary.
In permineralized fossils, the organic remains, such as vertebrate bones, are replaced by minerals. If the fossil matrix differs appreciably in composition and density, microCT imaging is straightforward using standard attenuation contrast instruments. Fine internal features Scaffold A structure that 'supports' tissue and is at the core of many tissue engineering applications.
of bones such as lacunae, pits and growth rings are readily discerned. The insects, plants and vertebrates in Brazil's Early Cretaceous Crato Formation, approximately 115 million years old 167,168 , for example, are exceptionally well preserved. Crato fossils, such as that shown in fIg. 5h, are not only preserved in three dimensions but are composed of iron hydroxide, affording superior contrast against the soft limestone matrix. Imaging at relatively high energy (180 kV) provides detail of fish scales, body bristles, fine cuticle punctation and wing veins of insects. Internal organs are preserved but, as they too are replaced by iron hydroxide, careful (often semi-automated) segmentation is required. Small fossils replicated in silica and phosphate also exhibit extraordinary 3D preservation even of internal organs 169,170 .
In most deposits, however, fossils are lithifiedpreserved as impressions or compressions of leaves, stems and insect wings in a shale or mudstone matrix. These compressions are films of carbon that are too thin and too transparent to X-rays, even with phase contrast CT.
One might expect the CT scanning of inclusions in fossil resins such as amber to be straightforward, as amber is renowned for preservation with microscopic fidelity 171,172 . In practice, results vary widely depending on the botanical source of the amber 173 . Resins are organically complex 174,175 , and this affects their cross-linking, hardness and preservative qualities. Age of amber is not a factor in the quality of the X-ray signal. Inclusions in ambers derived from Hymenaea, such as material 17-20 million years old from the Dominican Republic and Mexico, scan very well using absorption contrast, as do insects and other life forms in amber 90 million years old from New Jersey, USA, which is derived from an extinct relative of cedars of the family Cupressaceae. By contrast, amber 100 million years old from the world's most diverse Cretaceous fossil deposit in northern Myanmar scans poorly using absorption contrast 176 , and better results are obtained using phase contrast at moderate energies and long scan times (for example, 80 kV for >20 h (Ref. 177 )). There is little molecular integrity of chitin in the exoskeleton of insects in amber 178 , so organismal inclusions are typically imaged as void spaces in the amber. Interestingly, the bones of small vertebrates in amber retain excellent X-ray contrast 176,179,180 whereas soft internal organs such as flight muscles in insects are commonly preserved as largely carbonized replicas but with subcellular fidelity 171 ; these can be easily segmented as they lie in a void space of the body cavity.
Earth sciences. The unique capability of X-ray CT to provide detailed 3D and time-resolved 3D data across length scales has opened many opportunities in the earth sciences. Soil scientists and sedimentologists use X-ray CT to characterize soil and sediment, their 3D structures and the related pore network 181 . The optically opaque and delicate nature of soil and sediment mean that CT is well suited for exploring how biogeochemical and structural heterogeneities at the pore scale determine their function and behaviour. X-ray CT and subsequent segmentation and analysis can provide key parameters characterizing soil aggregates, including particle sizes and shapes, contact points, free volume and pore throats as a function of time or local conditions. This information helps elucidate their effect on aggregate stability 182 , crack dynamics under repeated wetting-drying cycles 183 or the preferential transport of nutrients and contaminants along macropores. The nondestructive nature of X-ray CT is also invaluable in characterizing the various components and structures (textures) of extraterrestrial rocks 184 .
Petrography focuses on the detailed description and identification of rocks, where the mineral content and the textural relationships within a rock are described in detail, and is essential in classifying rock types. Currently, 3D petrography remains challenging owing to the small specimen (often a rock core) size that can be scanned at high resolution given that rock textures can extend over a wide range of length scales. To combat this, 3D data retrieved from different sample sizes, and therefore acquired at different resolutions, are often combined to generate multiscale 3D data 185 . In addition to structural information, 3D chemical characterization is also crucial in the earth sciences. As standard X-ray absorption CT is not able to provide detailed chemical information, these missing data can be partially obtained by correlative microscopy using complementary techniques such as 2D energy dispersive X-ray mapping in scanning electron microscopy, X-ray fluorescence or others. This chemical information can then be coupled to the internal structural features of the 3D scanned rocks [186][187][188][189][190][191] and merged into one digital model, providing multifaceted information at all scales of interest. This information can then be used as the input for image-based multiscale pore network models to predict dynamic processes inside rocks, such as fluid flow and reactive transport 192 .
Many geological applications such as hydrology, petroleum engineering, carbon dioxide sequestration, geothermal energy storage and water and soil remediation require a fundamental understanding of the effect of pore structure on fluid flow and mass transport. Time-resolved X-ray imaging can provide unique information regarding pore-scale transport processes (such as reactive transport, solute transport and precipitation) in real time at high spatial resolution using synchrotron microCT [193][194][195] as well as laboratory X-ray CT 196,197 (fIg. 5i and Supplementary Video 5). The real-time monitoring of rock and soil behaviour under different stimuli can be done by either continuous or time-lapse X-ray scanning using bespoke in situ devices 198,199 . This offers new opportunities in the earth sciences as the generated data can be used to understand transport processes and as the input for 3D image-based models.
As a complement to the general-purpose image segmentation and analysis software packages, custom-built in-house 3D analysis software code [200][201][202] specifically aimed at segmenting earth science data sets has been developed, with machine learning segmentation algorithms starting to emerge 203 .

Reproducibility and data deposition
Reproducibility is an important property for CT dimensional measurements. It corresponds to the closeness of agreement between the results obtained by replicate measurements on the same or similar objects, under Petrography The branch of petrology dealing with the description and classification of rocks, especially by microscopic examination.
specified conditions across different locations, operators and measuring systems 107 . In addition to reproducibility, repeatability -repeated multiple measurements on the same system -is an inherent requirement for all measurement methods. Well-defined scanning and analysis protocols ensure reproducibility and repeatability. Accuracy of measurements depends on the CT system as well as on all of the other possible error sources. To achieve good accuracy, both random and systematic errors need to be small 107 . The uncertainty of CT measurements depends on many factors, which may be grouped as shown in TABle 1. In addition to general improvements in the performance of CT systems, such as higher spatial resolution and augmented computing capability, metrological CT systems have undergone several advancements that have enhanced their precision and helped achieve metrological traceability. For example, metrology CT systems now include temperature-controlled cabinets and other means to reduce or compensate for errors induced by thermal effects during X-ray acquisition. Other specific hardware improvements to the X-ray machines include accurate displacement encoders and high-precision manipulators, with positioning errors depending also on the mass of the sample being measured. Some metrological CT systems are equipped with additional measuring sensors, for example mechanical or optical probing units, which are used to correct the errors in CT measurements and enable multisensor data fusion 204 . Such advanced correction tools are particularly useful for applications demanding higher accuracy, as conventional CT systems are subject to several potential errors and artefacts.
Further details on the influencing variables and their effects on CT measurement results can be found in the VDI/VDE 2630 guidelines 205,206 , which also discuss the main image artefacts. ASTM standards also provide guidelines for performance verification of CT systems 207,208 , whereas the International Organization for Standardization (ISO) is currently developing new standards for metrological performance verification 109 .
Metrological traceability is fundamental for the reliability of a measurement result, as accuracy cannot be assured without establishing traceability to the measurement unit. Traceability ensures that the measured quantity is related to the international definition of the unit with which it is expressed (that is, the metre for dimensional measurements) through an unbroken chain of calibrations 107 . To achieve traceability, not only are qualification and testing of CT systems 109 important requirements but calibration and uncertainty determination are also needed. Different methods are currently used or under development for calibration 209,210 and uncertainty determination 211,212 . In particular, the measurement uncertainty is task-specific as it depends on the actual measurement conditions, as documented in recent interlaboratory comparisons using calibrated reference objects 108,213,214 .
Spatial resolution is one of the factors determining measurement uncertainty, although just one of many (as is clear from the numerous influencing variables presented in TABle 1). Spatial resolution depends on several factors beyond the voxel size, including, for example, the focal spot size and drift (see Ref. 109 for more details). In addition to the factors that affect the spatial resolution in the tomogram, other factors influence the resolution of the obtained measurement data (also referred to as the metrological structural resolution 215 ); such additional factors include software operations that are performed in several phases of data processing and surface determination 216,217 . Recent research has also documented the variability introduced by different thresholding methods applied in segmentation and surface determination 111,218 .
Image data sets can be large: currently, ~50 Gb per volume for single scans and a few terabytes for 4D studies. This presents issues for the transportation and archiving of such data sets. Nevertheless, there are numerous image repositories emerging that are able to archive 3D image data across various fields (for example, Digital Rocks, Digital Morphology at the University of Texas, Digital Fish Library, ESRF heritage database for palaeontology, evolutionary biology and archaeology, Morphosource, MorphoMuseuM, Phenome10K, GigaByte, Mendeley Data and the The Materials Data Facility). Although there are no current standards for sharing CT data, the minimum requirement is to provide the voxel size of the data set and its format (usually assumed to be .tiff image stacks). Additional information relating to the scanner system used, voltage and current settings, the number of projection images used and the reconstruction algorithm should also be provided.

Limitations and optimizations
Dose effects. Although X-ray CT is widely accepted to be non-destructive, as discussed in the Introduction, the dose required to obtain a satisfactory tomogram increases as the reciprocal of the fourth power of the voxel size. This, and the fact that synchrotron sources are of extremely high flux, mean that both high doses and high flux can lead to radiation damage and artefacts, even for materials largely considered insensitive to damage. These can include localized heating-induced effects as well as structural damage, such as discolouration, chemical changes and, in the case of biological samples, damage to DNA. Beam damage happens when X-rays and matter interact by means of photoelectric absorption (which dominates at energies <30 keV), generating secondary photons or photoelectrons, and/ or sample heating. As a result, high-energy X-rays are generally less damaging than low-energy ones. With regard to sample heating, the high X-ray flux available at synchrotron sources mean that this can be significant especially for white beam nanoCT 219 but is typically not an issue for tube source CT. Structural damage to polymers and biological samples can be minimized by cooling samples to liquid helium temperature where structural damage becomes significant only at doses >10 8 Gy (grey), enabling CT at tens of nanometres resolution 220 . DNA damage in vivo has been illustrated in animal models at room temperature at much lower doses (~1-20 Gy) 221 , implying that DNA damage occurs for CT at much lower resolutions. For tube source microCT operating at 100 kV, the dose for 10-μm CT has been reported to be around 0.4 Gy (Refs 222,223 ), whereas for medical CT scanning a head scan might require a dose of around 0.06 Gy (Ref. 3 ). Because the effect of the radiation dose on the body changes with the radiation type and energy, the effective dose, measured in millisieverts, is often used to assess the risk to human health. Levels above 200 mSv have been shown to give rise to a small but significant increase in cancer risk 3 . In the case of subfossil bones, 200 Gy has been identified as the safe limit 165 , leading to the conclusions that CT voxel sizes should therefore be greater than 1 μm to limit the damage to fossil DNA and that the addition of a metallic filter in front of the source can have significant benefits for tube source CT, because it removes the lowest energy, and thus the most damaging, X-rays.
Phase contrast CT can lead to dose benefits over attenuation contrast CT 224,225 . The δ term (Eq. 1), which delivers phase contrast, decreases less rapidly with increasing energy than the attenuation term β, permitting the use of a higher energy and less damaging beam while not suffering as much loss in contrast. Indeed, under certain experimental conditions (for example, high-resolution scanning or scanning a sample composed of similar materials), phase contrast CT can also yield a better signal to noise ratio than attenuation contrast CT at the same dose or lower 226,227 .
Imaging artefacts. Unless recognized, and where possible accounted for, imaging artefacts can seriously affect the interpretation of X-ray tomograms. In this Primer, we mention a few of the most common types of artefacts and point the reader towards strategies for their minimization or correction.
Concentric ring artefacts (fIg. 7a) of alternating contrast can arise in reconstructions owing to the differential response of individual detector pixels, even after flat field correction. These can be eliminated during acquisition by translating the detector between projections 228 or, more commonly, corrected for during reconstruction. Beam hardening artefacts (fIg. 7b), evident as uneven contrast (cupping) between the middle and edges of high atomic number materials, arise when imaging with polychromatic X-ray radiation, because the softer X-ray radiation is preferentially removed from paths intersecting the sample centre compared with paths through the periphery. To reduce beam hardening, beam filtering is often used with an absorptive material (for example, a copper plate typically of 0.5 mm thickness) to pre-emptively absorb the low-energy X-rays and harden the beam before it reaches the sample. Limited projection artefacts (fIg.7c) are windmill-shaped artefacts (or bear claw artefacts in the case of helical scan patterns) that arise when too few projections are used to reconstruct the image. It is clear by comparing the reconstructed slices in fIg. 7c,e (right) that, for 30 projections, there are characteristic artefacts and the internal porosity cannot be discerned. As mentioned earlier, iterative reconstruction algorithms offer the potential for high-quality reconstruction when the data are very noisy and sparse; machine learning also can ameliorate the effects of undersampling 71 . Phase contrast artefacts are evident as light/dark fringes that can be seen at phase boundaries when the beam has some degree of coherence. These can aid boundary location but they distort the image contrast locally. The partial volume effect occurs when partially filled voxels towards the edge of objects take an intermediate greyscale. This can lead to problems when greyscale thresholding, especially if the feature of interest is only represented by a few voxels. Streaking artefacts (fIg. 7d) can have numerous causes, but the most common relates to almost complete attenuation (that is, photon starvation) by high-density objects or the limited dynamic range of the detector. Motion artefacts (fIg. 7e) arise from movement during the acquisition process and can be intrinsic (such as a heartbeat) or extrinsic (such as beam damage or the drying of a hydrated specimen). Artefacts can also arise if the centre of rotation is off-centre or the sample wobbles with respect to it. The latter can be corrected by realigning the projections in the sinogram during reconstruction. As mentioned earlier, iterative reconstruction methods can give high-quality reconstructions even when the data are highly under-sampled,

Grey
The unit or radiation dose absorbed, equal to the absorption of 1 J of radiation energy per kilogram of matter being irradiated.
Effective dose expressed in millisieverts, the dose calculated for the whole body taking into account not only the nature of the incoming radiation but also the sensitivities of all of the organs to radiation. allowing lower dose/faster time frame scanning 223 and thereby minimizing movement during a scan (see fIg. 6). Cone beam artefacts are specific to cone beam set-ups (fIg. 1b) and can introduce geometrical distortions -as shown in the straight sides of the image in fIg. 7f -and become increasingly serious with distance from the central slice. They arise because the filtered backprojection reconstruction method is strictly valid only for the central slice.
Field of view and spatial resolution issues. Modern detectors often have between 1,000 × 1,000 and 4,000 × 4,000 pixels. This creates a trade-off, as with all imaging methods, between the resolution and FoV, although this can be somewhat mitigated by stitching together multiple images leading to much larger tomograms 229 . Given that features of interest should often be at least three times, and ideally ten times, larger than the voxel size to positively be identified, this makes detecting small features such as cracks or critical defects (such as those introduced during additive manufacturing) a challenge in realistically sized components.
One way to mitigate this is to perform local (region of interest) tomography. Contrary to popular understanding 230 , having material outside the FoV need not introduce serious imaging artefacts; although there can be shifts in the contrast values, the geometry within the region of interest is not generally affected 231,232 . In many cases, the diameter of the object can be as much as ten times larger than the FoV without significant artefacts other than a slight cupping 233 . However, scanning a small section of a large part may not always be practical (depending on sample geometry), or for attenuating materials may require excessive scan times or very hard X-rays.
A major challenge is also posed by the size of data generated for high temporal and spatial resolution data. Time-resolved data sets can be many hundreds of gigabytes and present significant challenges in storing, analysing and visualizing the data. Consequently, analysing 3D and 4D data requires large computing power along with expertise in specialized software packages.

Outlook
The past 30 years have seen a dramatic increase in spatial resolution, a shortening of the time and a lowering of the dose needed to acquire CT scans through a combination of improved sources (both synchrotron and laboratory tube sources), detectors and reconstruction algorithms. There is little reason to believe that this progress will stall. Compact light sources 51 , liquid metal sources 50 , microstructured targets 234 and laser-driven sources 235 are increasing the attainable fluxes and phase contrast, and bridging the gap between tube and synchrotron sources, whereas nanoCT enables the investigation of microstructures too fine to be discerned by microCT. In line with such developments, the diversity of applications in CT continues to grow as its capabilities are being extended and recognized in new areas, for example in the food sciences, cultural heritage 2 and forensics 236,237 , where the traceability of the inspection is particularly useful for legally sensitive situations as the data can be kept on record. As CT capabilities continue to improve, other areas will emerge, particularly in the life sciences.
The frame rates of both synchrotron and tube source CT have increased markedly over recent years, enabling real-time imaging across a wide range of processes. This trend is being accelerated by new iterative algorithms able to produce high-quality images at lower doses and for fewer projections 70 . The drive towards faster acquisition will benefit from the use of multiple X-ray tube sources to collect many projections in rapid succession 238 , which could see CT as an online inspection tool for manufacturing 95 . For the monitoring of structural changes and deformation by digital volume correlation, the preliminary acquisition of a good quality scan and the subsequent calculation of the deformation field based on only a few radiographs opens up the possibility of faster mapping in the laboratory as opposed to at a synchrotron 239 .
At present, the development of automated procedures for the segmentation and analysis of 3D images requires a high level of expertise. Manual intervention is all too commonly required to segment complex low-contrast microstructures. Emerging machine learning approaches 83,203 promise to lower the level of expertise required to segment complex images (such as X-ray histotomography 147 ), as well as to automatically identify critical defects or features.
New imaging modalities and methods continue to emerge and advance. For example, the development of dual-energy CT, where two images are collected (either in sequence or simultaneously 240 ) at different accelerating voltages. This provides some level of elemental discrimination as well as increased sensitivity when imaging objects contain both highly and lowly attenuating phases. This approach has been taken further with the development of spectral CT, using detectors that apportion the detected photons to a few energy channels, and hyperspectral CT, using detectors having many energy channels. These techniques provide some level of elemental selectivity 241,242 . They are beginning to find application in medical imaging to enhance tissue contrast and have great potential in security and industrial scanning, as well as in earth and materials science where the ability to map elemental composition would be valuable. Diffraction-based tomographic methods [243][244][245][246][247] are being developed that are sensitive to local crystallography and can image discrete phases, grain structures, lattice parameter variations and the distribution of nanocrystalline versus amorphous phases that cannot be discriminated by conventional attenuation and phase contrast CT. Dark-field methods 248,249 and ptychography 250 have further extended the contrast modes and resolutions that can be achieved.
Finally, tomography is being increasingly combined with other methods to build up a more complete picture within correlative frameworks 116,251 , for example as a means of covering a wider range of length scales, to provide complementary information or to steer and direct subsequent destructive measurements 252 .

Digital volume correlation
A method of correlating the location of features between successive observations (here, computed tomography scans) in order to map material movement, deformation or strain in three dimensions.

Spectral CT
The acquisition of several computed tomography reconstructions with the collected photons apportioned to a small number of energy channels, on the basis of which some level of element differentiation can be undertaken.

Hyperspectral CT
Assignment of the detected photons to many energy channels, enabling computed tomography reconstructions as a function of energy, on the basis of which different elements can be differentiated, often on the basis of their characteristic absorption edges.

Ptychography
A computational imaging technique in which the image is computationally reconstructed from many coherent interference patterns.