High-Sensitivity X-ray Phase Imaging System Based on a Hartmann Wavefront Sensor

: The Hartman wavefront sensor can be used for X-ray phase imaging with high angular resolution. The Hartmann sensor is able to retrieve both the phase and absorption from a single acquisition. The system calculates the shift in a series of apertures imaged with a detector with respect to their reference positions. In this article, the impact of the reference image on the ﬁnal image quality is investigated using a laboratory setup. Deﬂection and absorption images of the same sample are compared using reference images acquired in air and in water. It can be easily coupled with tomographic setups to obtain 3D images of both phase and absorption. Tomographic images of a test sample are shown, where deﬂection images revealed details that were invisible in absorption. The ﬁndings reported in this paper can be used for the improvement of image reconstruction and for expanding the applications of X-ray phase imaging towards materials characterization and medical imaging.


Introduction
A wavefront sensor is a device capable of measuring the phase of the incoming light [1]. Several techniques have been proposed to measure the incident wavefront in the X-ray regime. For soft X-ray lasers Hartmann sensors have been tested with an array of holes [2][3][4][5], zone plate [6]. or refractive lenses [7]. Curvature sensors [8], which measure the Laplacian of the phase, and two-dimensional interferometers [9,10] based on two orthogonal phase gratings can also be implemented to measure the wavefront of an X-ray beam [11,12].
However, in general, Hartmann masks are the simplest to fabricate; are easy to scale up to areas of several centimeters; can be applied at higher X-ray energies; and are tolerant to defects, imperfections, and polychromatic beams. We focus on the implementation of a Hartmann wavefront sensor for X-ray phase imaging.
The Hartmann wavefront sensor consists of a hole array mounted at a certain distance from the detector plane. The incident X-ray beam is sampled by the aperture array, where each hole locally samples the incident wavefront generating a series of beamlets.
To measure the incident wavefront with the Hartmann wavefront sensor, the first step is to determine the location of the diffracted spots. The wavefront sensor measures the tilt for each aperture by comparing the measured positions of the diffracted spots to the positions of the diffracted spots for a reference input beam ( Figure 1). The displacement of each spot, divided by the mask-to-detector distance, gives a tilt that is the local derivative of the incoming wavefront. These tilts can be converted into local deflections for the two axis These tilt measurements are then converted into an absolute measure of the wavefront (phase) by performing an integration over all local tilts called wavefront reconstruction.
X-ray phase imaging can take advantage of using X-ray Hartmann wavefront sensor for either weakly absorbing or nearly homogeneous material (such as biological tissue) or for recording additional information on the sample. The first case is known to produce poorly contrasted absorption images, thus losing many details. Since the Hartmann sensor samples local gradients of the phase, it is demonstrated to render visible details invisible in absorption. The sensor records, at the same time, the phase and intensity (related respectively to the real and imaginary parts of the index of refraction). It generates two times more information than a classical absorption radiography.
As previously mentioned, this kind of sensor measures the tilt with respect to a reference position for each aperture. Since this step is the basic mechanism for implementing the proposed measures, we concentrate on the impact of the reference image on the deflection and absorption reconstruction. In particular, deflection and absorption images of the same sample are compared using reference images acquired in air and in water. Tomography can be additionally combined with phase imaging, allowing for a full spatial coverage at different depths inside the investigated specimen. Experimental results from tomography acquisitions are also shown for a test sample. Thanks to the Hartmann sensor capabilities, three-dimensional absorption and deflection images were reconstructed from a single tomographic acquisition.

Materials and Methods
The imaging system used for the experimental results is composed of an X-ray source and a Hartmann mask located in front of a Flat-Panel detector. The X-ray source is an Excillum liquid gallium metal jet. The spot size is 20 µm, and the emitted bremsstrahling includes the Kα of Gallium at 9.2 keV. The X-ray source has a brilliance of approximately of 5 × 10 11 photons/(s mm 2 mrad 2 0.1% B.W.) [13]. The Hartmann mask is composed of a regular pattern of about 1400 × 1400 square apertures.
The sensor has a field of view of 10 × 10 cm 2 and a theoretical deflection sensitivity of 1 µrad. For the measurements, we used a Flat-Panel detector with a 50 µm pixel size and a total size of 228 × 292 mm 2 . For the 2D images, shown in Section 3.2, the distance from the source to the sample was set at 25 cm and the distance from the source to the mask was set at 50 cm. For the tomographic acquisition, shown in Section 3.3, the distance from the source to the sample was set at 30 cm and the distance from the source to the mask was set at 60 cm. All of the images (absorption and deflection) were reconstructed using the WAVEV IEW TM metrology software developed by Imagine Optic. The reconstruction is performed using a zonal reconstruction algorithm based on the work of Southwell [14].
For the 3D reconstruction of the tomography, a filtered backprojection algorithm was applied to all the projections using the open-source toolbox TIGRE [15]. For the filtering procedure, the plugin Fast Filter available in ImageJ software was used. This plugin is based on unidirectional filters (mean, min, max, and median), i.e., filters that can be applied to rows or columns in an image. Filtering with a rectangular (n × m) kernel area is obtained by replacing the initial pixel values by the median of the pixels within the defined kernel.

Results
Experimental results related to the Hartmann system design for phase imaging applications are presented in this section. The system was designed by the company Imagine Optic, France. Two main aspects are discussed: the role of the reference image for phase and absorption reconstruction and the capabilities of the Hartmann sensor for deflection imaging of a test sample.

Impact of Moiré Fringes and Numerical Filtering
As previously explained, the detection process in the Hartmann sensor is based on the relative shift of each aperture position between one image taken without the sample (reference) and one acquired with the sample. In some cases, the projection of the Hartmann mask onto the detector grid generates moiré fringes. A moiré pattern is created by superimposing two patterns of regular geometry, such as two sets of evenly spaced lines or apertures [16]. To better understand the impact of moiré fringes, the full deflection image of the sample can be seen in Figure 2. The presence of black and white fringes deeply affects the image quality. For the single line plot reported on the right part of Figure 2, the signal coming from the sample is distorted by the moiré pattern. The deflection of the object is thus mixed with the artefact, complicating the image analysis. We thus used publicly available filters to remove the moiré fringes. The filtering procedure reduces the background signal that is superimposed to the sample one. Since the size of the filter is adjustable, considering that a large filter kernel does not decrease the visibility of the small details inside the sample, in Figure 3, we can see the effect of the filter on a raw deflection image (Figure 3a). The median filter, using a 200 × 200 pixel kernel, is shown in Figure 3b. The subtraction between the raw image and the filter is shown in Figure 3c. A magnification of the sample without the filter can be seen in Figure 3(a1) and with the filter in Figure 3(c1). The filter removes the background noise leaving the internal details unaltered.

Impact of Reference Image
It is important to note that, in phase reconstruction, the presence of the sample modifies the reference beam and acts as a diverging lens. If the object is embedded in a material (such as water, ethanol, paraffin etc.), the incident wavefront is modified by both the sample and its surrounding material. Several tests were performed to understand the impact of the sample preparation on the image reconstruction. The same sample was imaged with a spatial resolution of 37.5 µm on the sample plane, in air, and in an Ependorff tube filled with water. For the measurements in water, the corresponding reference image was acquired with one Ependorff tube filled with water and without the sample. One grape was used as a test sample, and the following tests were performed: • Test 1: Sample measured in air and reference taken in air, • Test 2: Sample measured in water and reference taken in air, • Test 3: Sample measured in water and reference taken in water.
Absorption and deflection images were reconstructed for each of these experimental conditions. The results from the absorption reconstruction are shown in Figure 4. The image acquired with the parameters defined in Test 1 can be seen in Figure 4(a1), that for Test 2 is in Figure 4(b1), and that for Test 3 is in Figure 4(c1). The same images after the application of a median filter (size 200 × 200 pixels) for artefact reduction are shown in Figure 4(a2), Figure 4(b2), and Figure 4(c2), respectively. When both the sample and reference image are taken in air (Figure 4(a2)), the object contours are visible and a slowly varying signal can be seen inside the sample and the internal structures are hard to differentiate. Inserting the sample in water and taking the reference in air (Figure 4(b2)), the signal is more homogeneous but the internal seeds are still hard to see. In the last figure (Figure 4(c2)), both the reference images and the sample were taken in water. The inner details of the object can be retrieved. The red arrows point to the seeds present inside the grape, which cannot be seen in the sample measured in air. Thanks to the Hartmann wavefront sensor, from the same raw dataset, it was possible to also reconstruct the deflection images of the sample for the two axes horizontal and vertical in the object plane ( Figure 5). Due to the symmetry of the chosen sample, the deflection reconstruction in the two axes gave similar outcomes. For this reason, only the deflection in the X-axis is reported in Figure 5. . Deflection reconstruction of one grape for the X-axis: (a1) sample measured in air and reference taken in air, (b1) sample measured in water and reference taken in air, and (c1) sample measured in water and reference taken in water. The same images after the application of median filter (size 200 × 200 pixels) for artefact reduction (a2,b2,c2). The arrows point at the internal seeds of the grape.
Moiré fringes appear in the images taken with the reference in air ( Figure 5(a1,b1)). The intensity of the moiré pattern decreases when the reference is acquired in water ( Figure 5(c2)). The same images were numerically treated with a median filter (size 200 × 200 pixels) to reduce the image artefacts. The results are shown in Figure 5(a2,b2,c2).
From the results shown in Figure 5, the impact of the moiré fringes are reduced on the images by applying simple data-processing techniques.

3D Imaging
The outcome of a tomographic experiment on a test sample is discussed in the following. The goal was to perform a tomographic acquisition on a test sample with an interesting inner structure for visualization in 3D. We decided to take the image of a snail, since it is composed of a calcareous shell coiled in a spiral pattern around a central axis. The spatial resolution on the sample plane was 37.5 µm.
The tomography was acquired with 1000 projections evenly separated and covering 360°. A picture of the set-up designed by Imagine Optic is shown Figure 6. The first step in the analysis was to treat the artefact on the raw projections to reduce the quantity of noise in the reconstructed volume. The Flat-Panel that was used as a detector is composed of four smaller screens joined together. This results in a slightly different gray level between different screens. Additionally, many dark lines, corresponding to dead lines on the detector, are visible (Figure 7a).
A median filter (kernel area 200 × 200 pixels) was applied on both the vertical and horizontal axes to reduce the number of artifacts on the raw image (Figure 7b). This procedure was applied to all the projections.
A non-uniform background can be seen on the raw projection data (Figure 7a). The artefacts were dramatically reduced after the application of the filter; in particular, it was possible to completely attenuate discontinuities in the background.
Every projection image was treated with a reconstruction program developed by Imagine Optic to obtain the absorption and the deflection images. The 3D reconstruction of both the absorption and the deflection images allowed us to further investigate the sample.
The 3D rendering was performed with the data analysis software Volume Graphics VGStudio Max 2.2.6. Three-dimensional rendered images of the absorption can be seen in Figure 8a) and deflection Figure 8b). Optimizing the rendering parameters, many small details can be seen on the surface of the shell in the deflection reconstruction (Figure 8b).
Additionally, the presence of a crack on the outside of the shell can be seen on the 3D rendering of the deflection (Figure 8b), while it is absent on the absorption reconstruction ( Figure 8b). The same rendering parameters were used for the two images.  The results shown in Figure 8 underline the need for reconstructing the same object with complementary signal (absorption, phase etc.) to reach a comprehensive knowledge on sample properties.

Discussion
The Hartmann wavefront sensor is a versatile tool that allows for the reconstruction of both phase and absorption images of the sample from a single acquisition. Due to its high angular accuracy, it can be used to resolve small deflections induced by an object inserted in the beam path. To apply the Hartmann sensor for phase imaging of light samples, such as the biological ones, a comprehensive study needs to be conducted. For biological sample, it is common to insert them inside a medium to prevent them from drying or to receive an excessive amount of heat when irradiated with X-rays for a long time. Any structure inserted between the source and the Hartmann mask deforms the wavefront. It is thus crucial to predict how the phase changes with the insertion of the sample holder and of the embedding material. We analyzed the image quality as a function of different reference images taken in air or in water. Both in absorption (Figure 4(c2)) and in deflection ( Figure 5(c2)), the sample visibility increases when the sample is inside water and the reference is taken in the same medium. This effect is less pronounced in air since the refraction index changes dramatically from the sample to the surrounding air creating a sharp edge and reducing the signal inside the sample.
In the deflection images, the occurrence of moiré fringes can be observed. This optical effect is intrinsically present in any optical system when two regular patterns are inserted in the beam path. The two patterns can either be in contact or have a finite spacing. The moiré pattern is a pure geometrical effect connected with the projection of a regular pattern on a second one placed after a certain distance. In the set-up described here, the elements (Hartmann mask and detector) are not perfectly aligned: in fact, due to the large dimension of the mask, its surface is slightly bent and thus not parallel to the detector plane. Additionally, since the flat-panel is composed of four different detectors combined together, a relative tilt with respect to the Hartmann mask can be seen. This means that the spatial frequencies sampled in the two planes are not the same, resulting in the visualisation of moiré fringes on the acquired images. This issue can be minimized with a precise mechanical adjustment of the set-up components.
Another important point is the three-dimensional visualization of the sample combined with the phase reconstruction. The deflection images revealed structures that were invisible in absorption (Figure 8b), i.e., the presence of a crack on the outside of a snail shell. The experimental data underline the need for reconstructing both phase and absorption images to retrieve complementary information of the analyzed sample. In the future, the reconstruction algorithm to calculate the phase from the deflections measurement needs to be optimized to visualize small details otherwise invisible.

Conclusions
The capabilities of phase imaging were shown both for 2D and 3D imaging. To obtain comprehensive knowledge about the studied object, it is crucial to compare images with multiple sources of contrast (absorption, deflection etc.). It was shown how small misalignment in the set-up component raises moiré fringes in the final detector image. This problem can be solved with a precise alignment of the mechanical components as well as with image processing. The findings reported in this paper can be used for expanding the applications of X-ray phase imaging towards materials characterization and medical imaging.