Predicting the noise in hybrid (phase and attenuation) x-ray images acquired with the edge illumination technique

Purpose: To analyze the noise performance of the edge illumination phase-based x-ray imaging technique when applying “ single-shot ” phase retrieval. The latter consists in applying a sample-speci-fic low-pass filter to the raw data, leading to “ hybrid ” images in which phase and attenuation contrast are merged with each other. The second objective is to compare the hybrid images with attenuation-only images based on their respective signal-to-noise ratio (SNR). Methods: Noise is propagated from the raw images into the retrieved hybrid images, yielding analytic expressions for the variances and noise power spectra of the latter. An expression for the relative SNR between hybrid and attenuation images is derived. A comparison with simulated data is performed. Experimental data are also shown and discussed in the context of the theory. Results: The the relative merit between on Generally, the loss the here much outweighing the reduction in photon numbers. Conclusions: Association of Physicists in Medicine


INTRODUCTION
X-ray imaging plays an indispensable role in various fields, ranging from medicine to biomedical science to materials testing. It also finds application in security, cultural heritage, and the manufacturing industry. Conventionally, contrast in x-ray imaging is generated from differences in attenuation. However, for some samples these differences are small, or the entire sample can exhibit weak attenuation. In these cases, conventional x-ray imaging leads to poor contrast, and, unless a high-radiation dose is delivered, to a poor signal-tonoise ratio (SNR). The development of phase-based x-ray imaging, where phase effects are included into the image formation process and contrast is no longer generated only from attenuation, has proven beneficial to those samples. 1 In x-ray imaging, a sample is typically characterized by its complex refractive index, n(k) = 1Àd(k)+ib(k), where k is the wave number. The complex refractive index describes a material's ability to attenuate the x-ray beam (via b, which is proportional to the linear attenuation coefficient) as well as to shift its phase (via the decrement from unity of the real part, d). Within the diagnostic energy range, d can be up to three orders of magnitude larger than b, 2,3 implying that greater contrast can be achieved if phase effects are exploited.
However, image quality is determined by the SNR rather than by contrast alone. Therefore, noise must be quantified alongside contrast to understand how a phase-based x-ray imaging system performs relative to one that only exploits attenuation.
Different experimental techniques have been developed to include phase effects into the image formation process. [4][5][6][7][8][9][10][11][12][13] Raw images acquired with these techniques show a combination of phase contrast and attenuation (the latter is always present in x-ray images, although it can be negligible for weakly attenuating samples). While attenuation is an area signal, phase contrast is typically strongest at boundaries and interfaces within a sample, that is it enhances edges, which can make these "mixed" images difficult to interpret. For this reason, much effort has been dedicated to developing phase retrieval techniques 9,14-16 through which the two contrast channels can be separated into individual images that both show area contrast. Phase retrieval is also a prerequisite for tomographic imaging, as "mixed" images typically cannot be cast as line integrals (while the opposite applies to separated phase and attenuation images).
The edge illumination technique, 12 which this paper is concerned with, is one of the several technical realizations of phase-based x-ray imaging, and one of few methods compatible with weakly coherent radiation. 13 In order to isolate phase contrast images with this technique, for a long time it had been considered necessary to collect a minimum of two raw images under slightly modified experimental conditions and process them according to a dedicated extraction algorithm. 15,16 However, the acquisition of multiple raw images is unpractical, and, especially when performing tomographic scanning, leads to long scan times. This is because the need to repeatedly modify the setup during acquisitions is incompatible with continuous tomographic scans ("fly-scans"), which are much faster than step-and-shoot scans as they do not require dead times for motor movements.
To overcome this problem, we have developed a "singleshot" retrieval method for the edge illumination technique that requires only one raw image, instead of two or more images, as input. 17 This method, explained below, does not provide separate phase and attenuation images as such, but it converts the edge-nature of the phase contrast into area contrast and merges it with the attenuation. The retrieved images are therefore easier to interpret (in the same way that isolated phase and attenuation images are). Moreover, the retrieved images can be cast as line integrals, thus enabling tomographic scanning. 18 Due to the simultaneous exploitation of phase and attenuation contrast, images retrieved via the "single-shot" method can be considered a hybrid of both.
The SNR provided by the edge illumination technique has been studied for the traditional, two-image phase retrieval method. 15,19 The noise transfer was found to be strongly dependent on the experimental setup, as well as key acquisition parameters such as the lateral sampling step, which determines spatial resolution. It has also been found that phase retrieval affects the noise in the isolated phase images, in the sense that it alters the noise power spectrum (NPS), leading to a different noise texture. This is consistent with studies of the noise performance of other phase-based x-ray imaging techniques. [20][21][22][23][24] In this paper, we study the noise performance of the edge illumination technique when the "single-shot" retrieval method is applied. We derive analytic expressions that enable a prediction of the noise in the retrieved hybrid image as a function of the noise in the raw image. The purpose of this is twofold: 1. The analytic expressions will inform the design of future edge illumination setups. The aim is to achieve an optimal performance of the technique, in the sense that the noise transfer from raw images into the retrieved hybrid images is minimal. 2. The analytic expressions will enable a comparison between retrieved hybrid images and their attenuation counterparts when acquired with the same number of incident photons, as a function of a sample's complex refractive index. In this sense, the expressions will guide the decision as to whether to use hybrid or attenuation imaging for a specific sample.
The paper is organized as follows. In Sections 2.A and 2.B, we provide descriptions of the edge illumination technique and the "single-shot" retrieval method. In Sections 2.C and 2.D, we derive the analytic expressions. This includes propagating the noise from raw images through the "single-shot" retrieval into the retrieved hybrid images, as well as theoretically comparing the SNR in hybrid images to that in attenuation images. In Section 3, we present simulated data that support the theoretical predictions. Experimental data are also shown, and their role in supporting the theory discussed. The paper ends with a discussion and a conclusion on the implications of the results.

2.A. The edge illumination technique
A schematic of an edge illumination setup is shown in Fig. 1(a). A mask upstream of the sample ("sample mask") splits the x-ray beam into an array of beamlets. A second mask in front of the detector ("detector mask") creates insensitive areas (edges) between pixels. By slightly offsetting the two masks, a fraction of each beamlet falls onto each detector mask aperture, while the remaining fraction falls onto a septum. This creates sensitivity to refraction (i.e., the macroscopic manifestation of the phase shift); while initially each pixel measures a certain (reference) intensity, the presence of the sample introduces small directional changes to the beamlets, which lead to either an increased or decreased intensity per pixel. A raw image acquired with such a setup can be described as: here N is the number of photons per beamlet (upstream of the sample). The sample is described via the attenuation, A = 2k∫bdz, and refraction, R ¼ ðz 2 =kÞ Á @U=@x it induces; Φ = k∫ddz is the phase shift. C is the so-called illumination curve, which is measured in the absence of the sample by step-scanning the sample mask laterally across one period and recording the intensity per scanning step. The resulting curve [an example is shown in Fig. 1(b)], here plotted after being divided by N, reaches its maximum when the apertures of both masks are aligned and tails off as the offset between them increases. The curve's maximum value depends on the apertures in the two masks; generally, the wider the detector mask apertures, the closer the maximum is to 1 [although Fig. 1(a) suggests that each beamlet is fully contained inside one detector mask aperture when both masks are aligned, in reality the beamlets are blurred due to the finite source size, and the beamlets' tails may fall onto the neighboring absorbing septa]. For the acquisition of an image, the sample mask is kept in a fixed position, x m , which is called the working point. Typically, x m corresponds to the steepest point on either slope of the illumination curve, as here the largest refraction signal is achieved.
Although the edge illumination technique has been developed to detect refraction (in addition to attenuation), the experimental setup can be transformed into an attenuationonly imaging device by removing the detector mask and Medical Physics, 47 (9), September 2020 aligning the beamlets with the pixels' centers. In that sense, the setup is versatile and allows for tailoring the imaging approach to the specific characteristics of the sample. One of the purposes of this paper is to provide guidance as to when it is better to use hybrid (i.e., phase plus attenuation) or attenuation-only imaging.
A particularity of the edge illumination technique relates to sampling. Due to the use of beamlets, raw images are sampled at discrete locations: x j ¼ x 0 þ jd, with a sampling step d of approximately the sample mask period. In practice, a smaller d can be achieved through a process called "dithering," by which multiple raw frames of the sample are acquired and combined. In each frame, the sample is shifted laterally by a fraction of the sample mask period. In that case, d is equal to the sample shift. Dithering can be performed in a step-and-shoot manner 25 (the sample is kept stationary while the detector is integrating and shifted before the next frame is acquired) or continuously 26 (the sample is moved continuously without interruption while the individual frames are acquired). When applying step-and-shoot dithering, care must be taken to apply a sufficiently small dithering step to satisfy the Nyquist sampling criterion. 27 When applying continuous dithering, the sample movement acts as a smoothing filter, making this consideration less critical. Like in other phase-based x-ray imaging techniques, raw images acquired with the edge illumination technique contain a combination of attenuation and phase contrast, the latter in the form of refraction. In previous work, 17,18 it was shown that the edge contrast (refraction) can be converted into area contrast and merged with the attenuation via the following formula: which essentially consists of applying a dedicated low-pass filter to the raw image (this retrieval indeed shares similarities with the well-known Paganin retrieval method for propagation-based x-ray phase imaging 28 ). Here, F denotes the onedimensional Fourier transform (in ordinary frequency notation) and q is the spatial frequency. In quantitative terms, the retrieval recovers an image of the phase shift, Φ; however, as explained above, the retrieved image contains contributions from phase and attenuation, hence I U should be considered a hybrid of both and will in the following be referred to as such.
Equation (2) is strictly valid only if the refractive index decrement, d, and the attenuation coefficient, b, are proportional to each other across the sample and the proportionality constant is known (although the latter can be found via trial-and-error if unknown). While these conditions are true only for quasi-homogenous samples, previous experiments have shown that the retrieval also works for samples composed of different but similar materials. 18 For a given experimental setup and acquisition parameters, the filter: is a function of the d/b-ratio of the sample. As can be seen in Table I, materials vary widely in their d/b-ratio. Therefore, the retrieval process is highly sample specific.

2.C. Noise propagation
In this section, we derive analytic expressions to predict the noise in the retrieved hybrid images, I U , as a function of the number of photons per beamlet, N, and the setup and the acquisition parameters. This will be achieved by propagating the noise from the raw images, I raw , through the retrieval [Eq.
(2)] into I U . Noise will be described via the NPS and variance (r 2 ).
Several assumptions are made to simplify the derivation of the analytic expressions: 1. noise in the raw images, I raw , is Poisson distributed and there is no correlation between the noise in different pixels; 2. the sample is characterized by a constant d/b-ratio [to satisfy the condition under which Eq. (2) has been derived]; 3. the working point, x m , corresponds to the steepest point on either slope of the illumination curve; 4. the x-ray beam is monochromatic; 5. the detector has a "perfect" (square) response function and 100% efficiency; 6. raw images are acquired with continuous dithering (the sampling step is denoted by d).
We are limiting the analysis to a background region of a raw image where A = R = 0. The assumption of Poisson noise implies that: r 2 I raw ¼ NCðx m Þ. Due to the assumption of uncorrelated noise, the NPS is constant and extends up to the highest accessible spatial frequency, 1/(2d). According to Parseval's theorem: NPS I raw ¼ NCðx m Þd. Next, we examine how noise is propagated through the filtering operation. The filter modulates the NPS 29 : where the notation: was used. Therefore, Again by Parseval's theorem, the variance of the filtered image is given by: As the next step in the retrieval process, the logarithm is applied to the filtered image as well as a scaling factor [see Eq.
(2)]. Both operations are applied on a pixel-by-pixel basis and, Medical Physics, 47 (9), September 2020 thus, do not change the shape of the NPS, although the variance is changed. By applying error propagation, the variance and NPS of the retrieved hybrid image, I U , can be estimated as: A more compact expression for the variance can be found by solving the integral in Eq. (8): Equation (10) is the first key result of this paper. It predicts the noise in a hybrid image as a function of the number of photons per beamlet, N, and the setup and acquisition parameters. Thereby, it informs the design of experimental setups that lead to minimally noisy hybrid images.

2.D. Comparison with attenuation images
The availability of an analytic expression for the variance of I U allows for a comparison, in terms of the SNR, between the hybrid approach and attenuation-only imaging. For simplicity, we assume that attenuation images are acquired with the same edge illumination setup (the only difference being that the detector mask is removed). We also assume that the number of photons per beamlet, N, is the same. We define the SNR in a hybrid image as: SNR I U ¼ ðkdTÞ=ðr I U Þ, where T is the sample thickness. Analogously, the SNR in an attenuation image, I A , is defined as: SNR I A ¼ ð2kbTÞ=ðr I A Þ. Due to the assumption of uncorrelated Poisson noise, the variance in I A is given by: r 2 I A ¼ 1=N. By inserting r 2 I U [Eq. (10)] and r 2 I A into SNR I U and SNR I A , we can calculate the relative SNR of hybrid and attenuation images: Equation (11) is the second key result of this paper. It shows that, for a given experimental setup, the relative performance of hybrid and attenuation imaging is highly dependent on the sample material, represented by the d/b-ratio.

3.A. Simulated data
The theoretical predictions made by Eqs. (9), (10), and (11) are compared to simulated results. The noise in the background of a raw image, I raw , was simulated by evaluating Eq. (1) for A = R = 0 and applying Poisson noise to the data (assuming N ¼ 10 4 , unless otherwise stated). The illumination curve, C, which is required for evaluating Eq. (1), was simulated using an experimentally validated wave optics model of the edge illumination technique. 31 The sampling step, d, was 40 lm unless otherwise stated. All other parameters used in the simulation are listed in Table II; these were chosen so as to match the experiment for which data are reported in Section 3.B (as the only differences, a monochromatic beam and a "perfect" detector were simulated to match the assumptions that underpin the theory). All simulations were repeated 100 times and averaged to obtain meaningful outcomes.
First, we compared the theoretically predicted NPS of hybrid images [Eq. (9)] with simulated ones for four different d/b-ratios. To cover a broad range of sample materials, d/ b = 200, 500, 1000, and 2000 were considered. The results are shown in Fig. 2; a good agreement between theory and simulation can be observed.
Next, the theoretical expression for the variance in hybrid images [Eq. (10)] was evaluated, first as a function of the number of photons per beamlet, N, then as a function of the d/b-ratio, and the results compared to simulated data. The plots are shown in Fig. 3; again, a good agreement can be observed.
As a final step, Eq. (11) was evaluated as a function of the d/b-ratio, predicting the relative SNR between hybrid and attenuation images. To generate simulated results, the SNR in hybrid and attenuation images was again defined as SNR I U ¼ ðkdTÞ=ðr I U Þ and SNR I A ¼ ð2kbTÞ=ðr I A Þ. Noisy attenuation signals were simulated by first applying Poisson noise to a constant signal with a mean value of N ¼ 10 4 and then taking the logarithm. The results are shown in Fig. 4. Besides a good agreement between theory and simulation, a number of observations can be made. First, SNR rel increases with increasing d/b-ratio. This is not surprising, as materials with a high d/b-ratio typically exhibit weak attenuation, hence attenuation imaging leads to a relatively poor SNR for such samples. In this sense, Eq. (11) confirms what is often cited as the rationale behind phase-based x-ray imaging, namely that the inclusion of phase effects into the image formation process can lead to a higher SNR, which in turn provides a better image quality and superior detection capabilities. As stated previously, one of the purposes of this paper is to guide the decision as to what type of images (hybrid or attenuation) to acquire with an edge illumination setup for a specific sample. Such guidance can be derived from the break-even point, that is, the d/b-ratio for which SNR rel ¼ 1.
As shown by Eq. (11), the break-even point depends on the experimental setup. This is in line with previous work, 15,30 for example it has been shown that the refraction sensitivity is driven by the sample-to-detector distance, z 2 , and the steepness of the illumination curve at the working point, x m , the latter being a function of the source size and the apertures in the sample mask. Figure 4 highlights that the break-even point also depends on the sampling step, d, which is proportional to spatial resolution. It can be seen that the smaller the sampling step, the smaller the d/b-ratio for which SNR rel ¼ 1. In other words, the higher the resolution, the better the relative performance of hybrid over attenuation imaging. This can be explained by analyzing the low-pass filter that underpins the retrieval of hybrid images [Eq. (3)].
The smaller the sampling step, the larger the portion of noise that is located at higher spatial frequencies. Since the filter's magnitude is lower at higher frequencies irrespective of the d/b-ratio, more noise is suppressed when the sampling step is small; hence, less noise is transferred into the retrieved images.

3.B. Experimental data
Experimental data were acquired with an edge illumination setup that featured a Rigaku 007-HF Micro Max x-ray  Table II. Note that the periods of the sample and detector masks cover two detector pixels when magnified to the detector plane ("line-skipping" configuration); hence, the effective detector pixel size along the lateral direction was 100 lm (approximately 80 lm when scaled to the plane of the sample).
The phantom was composed of a polymethyl methacrylate (PMMA) rod of 4 mm diameter and a drawing pin (brass) of 1 mm diameter (Fig. 5). It was chosen since PMMA and brass have very different d/b-ratios 3 ; at 18 keV (which is approximately the mean energy of the polychromatic Mo spectrum produced by our source), ðd=bÞ PMMA = 1768 and ðd=bÞ brass % 22 (the exact value varies slightly with the zinccopper ratio of brass, which, for the drawing pin that we used, was unknown to us). First, raw images were taken with the detector mask in place and a sample mask offset of x m ¼ À9:4 lm (to retrieve hybrid images). Second, raw images were taken without the detector mask and the beamlets aligned with the pixels' centers (to obtain attenuation images). In both cases, images were acquired with three different sampling steps, d = 20 lm, 40 lm, and 80 lm and an exposure time of 1.5 s per frame. This involved scanning the sample continuously with a speed of 14, 28, and 56 lm/s across one sample mask period (hence, the images were composed of four, two, and one frame, respectively). One dark field and ten flat field images, which were averaged, were acquired and used for offset and background corrections. Hybrid images were retrieved according to Eq. (2), and attenuation images were obtained by applying the negative logarithm to the respective corrected raw data. Results are shown in Fig. 6. Figure 7 further shows line profiles across the drawing pin (brass; left-hand side column) and PMMA rod (right hand side column) extracted from the hybrid and attenuation images; these profiles are only based on a single row of pixels, no averaging was performed. All profiles are plotted on the same scale to enable a visual comparison between them.
Before interpreting these data, it should be noted that our experimental setup violates some of the assumptions made to derive the theory presented above. First, the flat panel Medical Physics, 47 (9), September 2020 detector in our system is not a photon counter. It features a CsI scintillator and suffers from relatively high cross talk between pixels, which violates the assumption of uncorrelated Poisson noise. Unlike in the theoretical model, where raw data were assumed to have a constant NPS, the cross talk imposes a correlation of the noise between neighboring pixels, which corresponds to a nonconstant NPS. The cross talk can be modeled as applying a Gaussian filter to the uncorrelated raw data; this implies that the NPS tails off at higher spatial frequencies. Consequently, the relative contribution of high-frequency noise is lowered. Since the filter used in the hybrid retrieval has a similar effect, the hybrid images are likely to be less affected by the cross talk, while the opposite holds for the attenuation images where no low-pass filter is applied, leading to a less straightforward comparison between them. Second, the x-ray beam emitted by our Mo source is polychromatic. This has an effect on the d/b-ratio. Although an effective energy can be used to assign d eff and b eff , the effective energy for both is generally different, 32 making it difficult to assign the correct ðd=bÞ eff . Due to these violations, our experimental results can only be considered a qualitative reflection of the theory. A quantitative experimental verification of the theory would require that a single-photon counting detector and a monochromatic x-ray beam are employed.
Nevertheless, when comparing the hybrid and attenuation profiles for brass and PMMA, several observations can be made. While a good agreement in the signal shape can be seen, it is important to note that the profiles contain different amounts of noise. The hybrid profiles of brass appear noisier than their attenuation counterparts. On the contrary, the hybrid profiles of PMMA are much less noisy than the attenuation profiles. This is in agreement with the theory (in a qualitative sense). On the one hand, for a highly attenuating material like brass, attenuation images provide a very good SNR, to an extent that hybrid imaging can only perform worse (because the fraction of photons per pixel is reduced for a working point on the mid-slope of the illumination curve). This aligns with the theoretical result that the relative SNR between hybrid and attenuation images is <1 for low d/ b-ratios (Fig. 4). On the other hand, for materials with weak attenuation like PMMA, hybrid images provide a better SNR than attenuation images, matching the result that the relative SNR is >1 for higher d/b-ratios. In order to support these observations with quantitative values, we have calculated the standard deviation in the background regions of the profiles (to the left of the respective rod). The results are displayed in Table III. Although the analysis may be somewhat obscured by interpixel variations (e.g., where flat-fielding has not entirely removed variations in the detector response), the values are largely in line with the above.

DISCUSSION
We have provided analytic expressions that predict the noise (in terms of the NPS and variance) in hybrid (phase and attenuation) x-ray images, which can be retrieved from raw images acquired with the edge illumination technique via the application of a sample-specific low-pass filter. Our theory shows that the amount of noise is related to virtually all experimental and acquisition parameters, as well as to the imaged sample itself via the d/b-ratio [Eq. (10)]. This has been a key result as it provides guidance for designing an edge illumination setup that leads to minimally noisy images for a specific sample. Equation (10) has further enabled us to theoretically compare hybrid images to attenuation images (which can also be acquired with the edge illumination technique by removing the detector mask). It was shown that that the relative merits of these two types of images again depends on the experimental parameters and the sample itself. The latter is not surprising, as for highly attenuating samples attenuation images typically provide a high SNR, making the inclusion of phase effects unnecessary. More precisely, for highly attenuating samples, the availability of phase contrast is outweighed by the fact that in hybrid imaging fewer photons reach the detector (typically around 50%, a consequence of the need to illuminate each pixel with only a part of each beamlet, to generate the so-called "edge illumination" configuration). In contrast, the hybrid approach can lead to a Before calculating the standard deviation of the hybrid profiles, these were divided by (1/2)Á(d/b) (using values relating to the respective material) in order to obtain results on the same scale.
Medical Physics, 47 (9), September 2020 substantial increase in SNR for weakly attenuating samples. In this case, the fact that in the hybrid approach fewer photons contribute is counterbalanced by the availability of phase contrast and the low-pass filtering operation, which smooths the noise without blurring the signal. In fact, for high d/b-ratios the filter's band-pass region is substantially narrower than for low d/b-ratios, enhancing the noise-reducing effect.

CONCLUSIONS
We would anticipate that our theory will be most useful for samples with "intermediate" d/b-ratios, where it is not obvious whether hybrid or attenuation images will provide the better SNR. In such cases, our theory may also help to choose and/or optimize the experimental setup in such that way that SNR is maximized. We believe that the edge illumination technique, which can easily be transformed from a phase-sensitive modality into one that only senses attenuation, opens up opportunities for highly samplespecific imaging. Since for weakly attenuating materials the hybrid imaging approach provides an option to increase SNR without increasing the exposure or using contrast agents, scans may be performed at a lower (or optimized) radiation dose.
Before concluding, we would like to emphasize again that several assumptions were made in the derivation of the analytical expressions and that the equations are applicable strictly only if these conditions are met. However, as reflected by the experimental results reported in this paper, our theory appears to apply at least in a qualitative fashion also when some of these assumptions are relaxed.

ACKNOWLEDGMENTS
This work was supported through a UKRI/EPSRC Prosperity Partnership (EP/T005408/1). C. K. Hagen is supported by the Royal Academy of Engineering (RAEng) under the Research Fellowship scheme. A. O. is supported by the RAEng under the Chair in Emerging Technologies scheme.