X-ray flat-panel detector geometry correction to improve dimensional computed tomography measurements

To improve the accuracy of dimensional x-ray computed tomography (CT), error sources have to be characterised and accounted for. A variety of error sources have been comprehensively described in the literature. However, the influence of geometrical distortion of the flat-panel detector has rarely been considered. In this paper, the deviation from nominal geometry of a flat-panel x-ray detector was characterised using a calibrated ball plate. In-plane deviations were separated from the detector topography by varying the source–detector distance, resulting in a 3D detector geometry. A correction model for arbitrary source–detector distances was developed, which reduced the maximum errors of sphere centre-to-centre distances in scale-corrected CT measurements from  ±3.9 µm to below  ±0.8 µm. This fivefold improvement emphasises the importance of such correction for dimensional CT.


Introduction
X-ray computed tomography (CT) is increasingly used for dimensional measurements. To improve the accuracy of such measurements and estimate the corresponding measurement uncertainties, the relevant influence factors need to be characterised and accounted for. A substantial number of error sources have already been identified and comprehensive literature is available [1,2]. Major influence factors are machine geometry deviations [3,4], artefacts originating from the interactions between x-rays and the object material (e.g. beam-hardening and scattering) and the reconstruction and analysis algorithms [5].
A rarely considered error source is image distortion of the x-ray detection system. It is usually assumed that the flat-panel detectors typically employed consist of a perfectly flat and regular pixel grid [6]. Image distortions and their compensation have been comprehensively described for diffraction measurements at synchrotrons employing image intensifiers [7], fibreoptically coupled image sensors [8], flat-panel detectors [9], and modular directly converting detectors [10]. To this end, radiographs of high-Z metal foils with periodic hole structures up to 20 keV [7,8,10] and diffraction patterns of reference powders up to 80 keV [9] were measured. It is emphasised that metal foils are not well suited to characterising radiographic setups working above 100 kV, because they produce too little contrast and thus have a low signal-to-noise ratio.
In contrast to image intensifiers, which have pincushion distortion of up to several millimetres [11][12][13], the geometry distortions of the scintillator-based flat-panel detectors used in radiographic imaging systems were usually considered negligible [6]. The only study known to us that corrects geometric detector distortions for dimensional CT was performed by Weiss et al [14], who measured flat-panel detector distortions of up to ±0.15 pixel (0.05 pixel on average) per coordinate using a calibrated ball plate. The deviations were attributed to angular misalignments of the columnar CsI scintillator. Correcting them reduced the maximum measurement deviations in scale-corrected CT scans for sphere centre-to-centre distances from 3.2 µm to 2.0 µm. Another study also reported that the assumption of a flat detector plane with constant pixel pitch failed, but did not correct for it [15].
In this paper, we describe a procedure based on a calibrated ball plate to characterise the distortions of x-ray flat-panel detectors, whose achievable accuracy was estimated using radiographic simulations and error separation techniques. We found considerably larger deviations than the previous study [14], which furthermore depended on the x-ray sourcedetector distance (SDD). This effect could only be explained by a non-flat topography of the detector and was separated from an SDD-independent in-plane distortion. A distancedependent correction model was crucial to achieve accurate measurements using an x-ray CT system with a variable SDD.

Metrology computed tomography system: METAS-CT
The home-built metrology CT system employed (METAS-CT) is designed for the highest geometrical [16] and thermal stability [17], rendering it ideal for high-resolution scans of small workpieces with dimensions of a few millimetres. The system consists of a sub-microfocus transmission x-ray tube, an air-bearing positioning system, and a high-resolution flat-panel detector. Detailed information on the CT system components are provided in [16]. The flat-panel detector employed is a Varex Imaging (formerly Perkin Elmer) XRD 1611 CP3 with a 4096 × 4096 pixel matrix and a pixel pitch of 100 µm (409.6 mm × 409.6 mm). It has a Tl-doped CsI scintillator with an approximate thickness of 200 µm that is directly deposited onto the amorphous-Si photodiode array. The analogue-digital converter of the detector has a bit-depth of 16 bit, resulting in images with 65 536 grey levels.

Ball plate design and tactile calibration
A tactile calibrated ball plate (see figure 1) was used as a reference object to determine the detector distortions. The ball plate consists of an 8 mm thick Al plate with a regular 11 × 11 grid of conical holes with a spacing of 37 mm. Al was selected for its mechanical stability, high thermal conductivity reducing temperature gradients, and low contrast in the radiographs. One hundred and twenty-one steel spheres (grade 5, KGM Kugelfabrik GmbH & Co. KG) with a nominal diameter of 10 mm and specified form deviations below 0.13 µm were glued into the conical holes. They provide a high radiographic contrast and can be considered perfect spheres due to their low form deviations. The plate dimensions were chosen such that the spheres cover the whole detector area. To align the plate in front of the detector, two gauge blocks were attached to the sides of the plate.
The 3D position of every steel sphere was calibrated on a SIP ORION 6 tactile coordinate measurement machine (CMM) retrofitted with a Leitz tactile probe head. The expanded measurement uncertainty was estimated to be 1 µm per coordinate. These traceably calibrated sphere positions were used to calculate reference values for the detector distortion measurement. The orientation of the two gauge blocks relative to the object coordinate system, formed by three spheres located in three corners of the plate, was calibrated as well. It must be noted that the gravitational forces acting on the plate and therefore its shape differ between the horizontal three-point support for the tactile calibration and the vertical suspended configuration in front of the detector for the radiographic measurements. Finite element analyses (AUTODESK Inventor) showed that the bending of the plate on an optimised three-point support results in x-and y -displacements below 0.5 µm and z-displacements below 8 µm. The combination of the bending and the tactile measurement uncertainty results in maximum deviation of the sphere centre positions of 0.05 pixel in the radiographs.

Ball plate radiographic measurement
The detector image distortion was determined by comparing the calibrated sphere centres with the actual position in the radiographs, as described in section 2.4. To this end, the plate was suspended in front of the detector using thin steel cable, as shown in figure 2(a). The orientation of the ball plate around the z-axis (see figure 2(a) for the coordinate system) was adjusted to less than a degree using a spirit level. Its orientation around the x-and y -axes was determined using the two gauge blocks in combination with a tactile probe attached to the movable sample stage of the CT. Using the tactile calibrated orientation of the gauge blocks relative to the ball plate coordinate system, the plate was aligned parallel to the detector. For this purpose, three plastic screws acting as spacers were used.
Radiographs of the ball plate were recorded at an x-ray tube acceleration voltage of 120 kV and a target power of 10 W (see figure 2(b)). At these settings, the focal spot of the x-ray tube is well below 10 µm, i.e. ten times smaller than the detector pixels, and can thus be considered a point source.
To block low-energy x-rays, a 0.1 mm Cu filter was used.
To examine the dependence of the detector distortion on the SDD, the ball plate was measured at eight equidistant SDDs ranging from 497 mm to 1397 mm. The exposure times were adjusted between 5.7 s and 30 s to keep the average grey value of the images approximately constant. The radiographs were offset and flat-field corrected, and at least 30 radiographs were recorded and averaged per distance. Additionally, the dependence of the distortion on the detector temperature was studied. The water-cooling system of the detector is usually at a setpoint of 16 °C, keeping the heat flux into the CT system close to zero and the average detector temperature at 19.0 °C [17]. The measurement was repeated at a water temperature setpoint of 21 °C (ΔT = 5.0 °C), resulting in an average detector temperature of 22.6 °C (ΔT = 3.6 °C). The ball plate temperature, being close to the detector, changed from 20.3 °C to 21.3 °C (ΔT = 1.0 °C) and the temperature gradient diagonally across the plate remained below 0.05 °C on average. Because the plate is made of Al, which has a high thermal conductivity, it is assumed that its thermal expansion is homogeneous and thus equivalent to a higher magnification. Since the distance between the plate and the detector is a fit parameter for the evaluation of the measured data (see section 2.4), such scaling errors are accounted for.

Data analysis and simulations
To determine the detector distortion, the measured sphere positions in the radiographs (actual) were compared to the positions derived from the calibrated values (reference). Let r n,act be the measured actual sphere position of sphere n on the detector and r n,ref its reference position on the detector, calculated by forward-projecting the calibrated 3D position using the CT geometry. The distortion is defined by w n = r n,act − r n,ref . The following paragraph describes how r n,act and r n,ref were determined and assesses the accuracy of the method by radiographic simulations. All data analysis was performed in Python 3.7.
First, gradient magnitude maps of the radiographs were calculated in order to segment the edges of the sphere projections. The gradient at pixel (i, j) was calculated with finite, central differences and its magnitude g ij is given by the standard Euclidean vector norm. To reduce the influence of noise, an empirical gradient threshold was applied, setting smaller gradient magnitudes to zero. To avoid interference from malfunctioning detector pixels, a defective-pixel map of the detector was used to exclude them, and pixels adjacent to them, from the analysis.
Due to the cone-beam arrangement, the projection of a sphere onto the detector is an ellipse, with its major axis always oriented radially towards the orthogonal projection of the x-ray source [18]. For further analysis, it was assumed that the x-ray source is a point and its orthogonal projection coincides with the centre of the detector. Thus, each ellipse was described by four parameters, which are the centre of the ellipse c = (c x , c y ), the major axis a and the linear eccentricity e (the distance between the centre of the ellipse and its foci). The image was divided into 121 sub-images, each containing an ellipse. The parameters of each ellipse were determined with an algorithm adapted from [19]. The implemented algorithm utilizes the definition of an ellipse as the set of all points for which the sum of the distance to the two foci is equal to twice the major axis. The parameters were determined by minimizing (scipy.optimize.minimize) the function (1) where N is the total number of pixels with a gradient magnitude bigger than zero in the sub-image, r ij is the position of pixel (i, j), and f 1 and f 2 are the two foci of the ellipse. The gradient magnitude g ij was used as a weighting factor. The coordinate system used is defined in figure 2(a), its origin being located in the centre of the detector. To remove outliers caused by detector noise, the fit was iterated three times. Points for which the summed distance to the two foci deviated by more than 20% from 2a were excluded after each iteration.
To determine the centre of the sphere projection, which differs from the ellipse centre, the procedure described by Deng et al was used [18]. The projected centre of sphere m is given by: with c being the ellipse centre, r the radius of the sphere (known by the tactile calibration described in section 2.2), and z s the distance between the sphere centre and the detector plane. Given the position and orientation of the ball plate, z s can be calculated. However, the exact position and orientation of the plate are not known in advance. Thus, the Deng correction was iteratively applied in a later step, when they are fitted (see below). The position of the projected sphere centre on the radiograph depends on the CT geometry and the position and orientation of the ball plate. The SDD is known from a CT geometry calibration [20] and the positions of the spheres relative to each other are calibrated on a tactile CMM. However, the accurate position and orientation of the ball plate are unknown. First, the reference position of each sphere was calculated by forward-projecting the CMM-calibrated 3D position on the detector, based on an initial guess of the ball plate orientation and position. The plate orientation and position were then determined by minimizing the summed squares of the distances between the reference and actual positions. In this step, the Deng correction from equation (2) was applied to the actual positions. It is emphasised that fitting the plate orientation and position could mask certain detector dist ortions. From the sets of actual positions obtained from the radiographs r n,act and forward-projected reference positions from tactile calibration r n,ref , the distortions w n were calculated. To extend the distortions determined at discrete sphere positions to every pixel of the detector, an interpolation algorithm based on radial basis functions was used (scipy.interpolate.Rbf).
Two possible mechanisms responsible for the image distortion were separated. The first mechanism was interpreted as the topography of the flat-panel detector, i.e. its flatness or out-of-plane deviations. Due to the cone-beam arrangement, a non-flat detector leads to an SDD-dependent radial distortion of the radiographs. It is emphasised that this is a model description, since the active surface of the detector cannot be accessed to measure the topography directly. As shown in figure 3, w topo,ij is the distortion at pixel (i, j) induced by the topography d ij : where | r ij | is the radial distance of the actual position to the detector centre. The sign is such that d ij > 0 corresponds to pixels lying further away from the x-ray source. The second mechanism leading to distortions is an irregular pixel grid, i.e. in-plane distortions. This distortion is independent of the geometry of the CT system. In contrast to topography-induced distortion, the constant distortion can be oriented in an arbitrary direction. For the total distortion of the detector, we can thus write: with e r,ij being the normal vector in the radial direction at point (i, j) and e t,ij the normal vector in the tangential direction. w const,r,ij is the constant detector distortion in the radial direction and w const,t,ij the constant distortion in the tangential direction. To determine the radial component, the first term of equation (4) is fitted on the measured radial distortions at different SDDs. The second term of equation (4) is the average tangential distortion measured at the different SDDs. Figure 4 shows the radial distortion as a function of the SDD for three different positions on the detector. It shows that distortions caused by the topography become more pronounced at shorter SDDs.
For the distortion map, the distortion vectors were stored at the actual position because the local distortion w ij depends on the topography d ij at that specific position (see figure 3). This is essential for the analysis of the topography. For image correction, however, the distortion vector needs to be stored at the reference position. Assuming that the above-determined distortion map is converted, the distortion at reference position (k, l) was defined as w kl = Ä w x,kl , w y,kl ä . The grey value of pixel (k, l) in the corrected image is equal to the grey value at position (i, j) = Ä k + w x,kl , l + w y,kl ä in the distorted image and was obtained by bilinear interpolation from a lookup table (scipy.interpolate.interpn). It is emphasised that the distortion map could also be approximated by an analytical function to save storage space. However, a lookup table was chosen for computational performance reasons.
The above section did not address the conversion of a map with the distortion vectors stored at the actual positions to a map with the vectors stored at the reference positions. For a map with the distortion vector written at the actual position,   (4), are provided. the distortion at pixel (i, j) is equal to w ij = (w x,ij , w y,ij ). To convert this map, the distortion vector w ij has to be written to pixel (k, l) = (i − w x,ij , j − w y,ij ). Since this is a noninteger value, a computationally expensive interpolation step is required. Because the map conversion is repeated prior to each CT scan, the following approximation was used. The error induced by not changing the position where the constant part of the distortion is stored is assumed to be negligible, because the gradient of the constant detector distortion was below 7 × 10 −4 pixel pixel -1 . For the topography-induced dist ortion, the following approximation was made: with g r,kl being the radial component of the gradient of the detector topography at the reference position (k, l). w topo,kl can be derived from geometric considerations (see figure 3) and combination with equation (5): where | r kl | is the radial distance of the reference position (k, l).
The total distortion at reference position (k, l), used to correct the radiographs, was calculated by combining the constant distortion and the SDD-dependent distortion derived from equation (6): − → w kl ∼ = w topo,kl + w const,r,kl e r,kl + w const,t,kl e t,kl .
To evaluate the limitations of the analysis routine, the ray tracing radiographic simulator aRTist 2 (BAM [21]) was used.
Radiographs of a CAD model of the ball plate were simulated employing a polychromatic transmission-type x-ray source and a distortion-free detector modelled using the DetectorCalc module with the scintillator thickness and flat-field noise levels as input. After analysis with the above-described routine, the distances between the fitted nominal positions and the reference positions were calculated. Since the simulated detector has no distortion, all distances are expected to be zero. However, the values range up to 0.04 pixel (average deviation 0.02 pixel), implying that the position of the sphere cannot be determined more accurately. Simulations with different settings (e.g. different energies, noise settings or ball plate orientations) always resulted in residual deviations of a few hundredths of a pixel.

Detector distortion and topography
Using a calibrated ball plate and the method described in section 2, the detector distortions for several SDDs were determined. The distortions were modelled using a combination of a non-flat topography of the detector and a constant in-plane distortion of the pixel grid. It is emphasised that the topography changes the image distortion for different SDDs, due to the change of the cone-beam angle, whereas the in-plane distortion remains constant. The detector topography is shown in figure 5. It is convex, with the detector's vertical edges being curved away from the x-ray source. The peak-to-peak flatness of the flat-panel detector was 0.99 mm. The exclusion of extrapolated regions of 200 pixels at the edge changed the flatness deviation only by 14%. Since CT-scanned objects rarely cover the edge regions of the detector, the distortion in these regions is less critical. It is emphasised that the mounting and the specific detector type is likely to have a critical influence on the flatness of the detector plane.
The constant in-plane distortion, i.e. the SDD-independent part of the distortion, is shown in figure 6. The maximum inplane distortion was ±0.13 pixel (±13 µm) per coordinate and 17 µm in magnitude. This is comparable to the deviations measured by Weiss et al of about ±19 µm per coordinate (±0.15 pixel at a pixel size of 127 µm [14]). The structure of the constant distortion indicates that the dominant contribution originates from pixel anisotropy, i.e. different pixel pitches in the x-and y -directions, of about 10 −4 . This effect could be due to tensions induced by the curvature of the detector surface.
By combining the topography and the constant distortion using the above-described model, a distortion map can be calculated for an arbitrary SDD. Figure 7 shows the calculated distortion map for an SDD of 1 m. At this distance, the maximum distortion was about 0.95 pixel (95 µm) in magnitude, excluding regions with extrapolated values. The contribution from the topography dominated the in-plane distortion and is more pronounced at smaller SDDs, i.e. larger cone-beam angles. To assess the accuracy of the model to interpolate for different SDDs, the difference between the calculated and the measured map for the shortest SDD of 497 mm, resulting in the largest distortions, was determined. Excluding extrapolated edge regions, the distortions differed by 0.06 pixel at most, which was comparable to the accuracy of the analysis routine evaluated in section 2.4. To assess the repeatability and separate the detector distortions from errors introduced by gravitational ball plate deformation during tactile calibration, an error separation technique was applied. To that end, radiographs of the ball plate were recorded in two orientations, rotated by 90° around the z-axis (see figure 2(a) for the coordinate system). Excluding the edge regions, where values were extrapolated, the magnitude of the residual vectors were below 0.04 pixel and 0.01 pixel on average. These differences were attributed to the influence of the plate bending during tactile calibration (section 2.2) and the accuracy of the analysis routine (section 2.4).
To investigate the influence of temperature on detector distortion, measurements were performed at detector temperatures of 19.0 °C and 22.6 °C (detector water-cooling system at 16 °C and 21 °C, respectively). A maximal influence on the total distortion of 0.15 pixel in magnitude was found. This corroborates the importance of a stable detector temperature, which is also critical for the stability of the CT geometry and the pixel grey values [17]. Furthermore, large temperature swings can cause scaling errors, due to thermal expansion of the detector and the resulting change in pixel pitch.
Finally, the dependence of the distortion on the x-ray tube acceleration voltage was investigated. A significant angular misalignment of the scintillator's CsI columns, as hypothesized in [14], would lead to an energy dependency that would alter the distortion for different materials and x-ray penetration   thicknesses. This is due to the fact that the energy changes the penetration depth of the x-rays into the scintillator [15]. Distortion maps were measured with a 0.1 mm Cu filter and tube acceleration voltages (average x-ray energies) of 80 kV (45 keV), 120 kV (60 keV), and 190 kV (80 keV). No significant systematic dependence of the distortion on the accelerating voltage was found (maximum differences in dist ortion of magnitude 0.04 pixel), indicating that no significant contribution to the distortion originated from angular misalignment of the columnar CsI scintillator.

Dimensional CT performance evaluation using a multi-sphere standard
To independently validate the developed detector distortion correction, a CT scan of a calibrated multi-sphere standard, consisting of an Al tube with 17 steel spheres attached [20], was performed and the sphere positions measured (figure 8). The sphere positions were calibrated on a tactile micro-CMM [22], with an expanded measurement uncertainty of 0.13 µm for sphere centre-to-centre distances. The x-ray source was operated at 120 kV with 15 W target power, resulting in a nominal resolution below 7 µm. A 30 µm Al filter in front of the tube target blocked infrared radiation that could heat up the multi-sphere standard. Three thousand radiographs were acquired on a circular trajectory (360°) in a stop-and-go manner, with an exposure time of 2900 ms each. The sourcerotary axis distance was 73.6 mm and the SDD 1050 mm, resulting in a magnification of 14.3 and a voxel size of 7 µm. Radiographs were reconstructed using the filtered backprojection algorithm implemented in CERA 5.1 (Siemens). The resulting voxel data were imported into VG STUDIO MAX 3.2 (Volume Graphics) for segmentation and analysis. The data were segmented using an advanced surface determination algorithm employing the maximum of the local grey value gradient. Subsequently, spherical primitives were fitted to the data to locate the centre positions of the spheres. The 136 distances between the 17 spheres were calculated from the CT and the reference tactile calibration data. The data were corrected for scaling errors by subtracting a least squares fitted line, which intercepts the origin. Comparing the tactile reference data to the CT data enables the determination of the measurement error as a function of the sphere-to-sphere distances with and without detector distortion correction. As shown in figure 9, the scale-corrected maximum deviation to the calibrated values decreased from ±3.9 µm to ±0.8 µm after dist ortion correction, while the standard deviation was reduced from 1.04 µm to 0.33 µm. The residual errors in the corrected data were primarily attributed to residual CT geometry misalignment and thermal drift of the x-ray tube during the scan, the FDK reconstruction algorithm [5] and streak artefacts altering the form of the spheres, noise in the grey values limiting sub-voxel interpolation, and the uncertainty of the detector distortion correction applied.

Conclusions
We have developed a method to measure and correct x-ray flat-panel detector geometry using a calibrated ball plate. A constant in-plane distortion was separated from an SDDdependent part, described as non-flat detector topography. The method enabled the correction of radiographs for arbitrary SDDs and improved the errors of high-accuracy CT measurement of a calibrated multi-sphere standard from ±3.9 µm to ±0.8 µm.
Excluding extrapolated regions near the detector edge, the observed total detector distortion ranged up to 1.8 pixel or 180 µm (0.67 pixel on average) for an SDD of 0.5 m and up to 0.69 pixel or 69 µm (0.22 pixel on average) for an SDD of 1.4 m. These distortions are bigger than those observed in previous studies [14]. It is however emphasised that they are likely to depend on detector type and mounting forces. A certain dependence on temperature, and independence from x-ray beam energy, was observed. Therefore, temperature control is essential for accurate CT measurements. Future work includes further reducing the uncertainty of the method, e.g. by modelling and correcting ball plate deformations due to different orientations during tactile calibration and radiographic measurement or studying the stability of the distortion over longer periods of time. Furthermore, for other detector types with thicker scintillators, x-ray energy-dependent scale errors, which arise from the finite scintillator thickness, should be accounted for [15].
In conclusion, even though flat-panel detectors have far lower geometrical distortions than image intensifiers [6], their distortion should be considered in high-accuracy metrology CT applications. In cone-beam CT systems with a variable x-ray source and detector arrangement, an SDD-dependent correction is essential.