Inline edge illumination X-ray phase contrast imaging through mask misalignment

: X-ray imaging is becoming more commonplace for inline industrial inspection, where a sample placed on a conveyor belt is translated through a scanning setup. However, the conventional X-ray attenuation contrast is often insufficient to characterize soft materials such as polymers and carbon reinforced components. Edge illumination (EI) is an X-ray phase contrast imaging technique that provides complementary differential phase and dark field contrasts, next to attenuation contrast. Combining multiple of these contrasts has been shown to improve industrial defect detection tasks. Unfortunately, conventional EI imaging is incompatible with an inline setup, as it requires moving part of the setup during acquisitions, while for inline scanning objects translate through a fixed inspection setup. Current solutions require either limiting the number of retrieved contrasts, or acquiring dedicated hardware. In this work, we demonstrate a method of inline EI imaging that does not limit the number of retrieved contrasts and does not require any new hardware. The method is validated through both simulation and experiment, demonstrating high flexibility and possible noise reduction, while successfully retrieving all three EI contrasts.


Introduction
Edge illumination (EI) is an X-ray phase contrast imaging (XPCI) method that provides both phase and dark field contrast, in addition to attenuation contrast [1].Phase contrast provides improved contrast for low absorbing materials compared to the attenuation contrast and dark field contrast reveals additional information on the material microstructure.A conventional EI setup, shown in Fig. 1(a), consists of two absorbing masks with slit-shaped apertures, where one mask is placed in front of the sample and the other in front of the detector.Laterally translating the sample mask while keeping the detector mask stationary generates a pixel-wise intensity modulation, called the illumination curve (IC), which is used to retrieve the different contrasts.
The application of EI radiography in non-destructive testing has already been shown to provide improved sample inspection [2,3].However, industrial inspection is often performed inline, i.e. with the sample placed on a conveyor belt and translated through a scanning setup, while an EI acquisition typically requires multiple projections at slightly shifted mask positions to retrieve the three contrasts [4].This makes the conventional EI setup incompatible with an inline setting, where all optical elements are expected to remain stationary.Barring this limitation, EI radiography is a prime candidate for inline XPCI, because of its robust setup and low source coherence requirements [5,6].Note that, in this work, inline refers to the conveyor belt geometry and not the propagation-based XPCI technique, which is also referred to as inline XPCI.
There are currently two strategies to achieve inline EI.One approach is to use a conventional EI setup in which the masks are positioned such that a single point on the slope of the IC is measured with a single-shot acquisition [7,8].A shortcoming of single-shot EI, however, is that only two of  the three available contrasts can be retrieved (typically attenuation and phase), reducing the added benefit of applying XPCI to the inspection process.Additionally, the single-shot model imposes the assumption of a homogeneous sample.A different approach is to use specialized, so-called asymmetric, sample masks [9,10].An asymmetric mask differs from the conventional mask design, where both EI masks have the same (projected) aperture pitch.Instead, an asymmetric sample mask is divided into groups of apertures, spaced with some fixed period, where the apertures within each group have a slightly adjusted pitch compared to the (symmetric) detector mask.This change in pitch causes the aperture alignment between the sample and detector mask, and thus the measured intensity, to differ for each consecutive detector column.The intensity modulation over the different detector columns is equivalent to the IC which is normally obtained through laterally translating the sample mask in a conventional setup.Downsides of asymmetric masks are that they cannot be employed for conventional non-inline 2D EI imaging, and they put a severe practical constraint on EI computed tomography (CT), as the sample would have to be scanned inline for each projection angle.Moreover, the number of mask apertures and their respective pitch is determined at the mask design phase, creating a rigid IC sampling scheme where the number of sampling points for each IC is fixed.
In this work, a method of inline EI radiography is presented that is based on purposefully misaligning the sample mask along the optical axis to create ICs along the detector columns (Fig. 1(b)).Although a similar approach was successfully tested in Talbot-Lau grating interferometry [11,12] and the concept has been theoretically suggested for EI [13], this method was, to the best of our knowledge, never experimentally validated for EI.The proposed approach combines the key advantages of the previously described inline EI scanning methods, as it uses regular EI masks while retaining all three available contrasts.IC sampling is also more flexible than for asymmetric masks, since the sample mask misalignment is tunable, which allows to alter the number of sampling points.The flexibility with respect to sampling points allows for a novel inline acquisition scheme including dithering (a method to increase spatial resolution in the scanning direction) to be applied.
The new inline EI setup geometry is first described, after which it is implemented in our FleXCT scanner [14,15].As the source spot size is known to affect the IC shape [13], the influence of both the misalignment magnitude and the spot size on the inline setup IC shape is studied.Next, the setup performance is validated through comparison of an inline EI scan with a conventional EI scan.Finally, both simulated and experimental results of a dithered inline acquisition are presented.

Conventional EI
In a conventional EI setup (see Fig. 1(a)), the sample and detector masks are aligned with respect to each other and to the detector plane [1,16].After alignment, the sample mask is laterally shifted to record ICs.Due to a finite source spot and detector blurring, the IC shape can be modeled as a sum of Gaussian profiles [4,17].This model can be simplified by using only a single term in the sum, giving a Gaussian IC shape defined as with A the IC amplitude, µ its mean position, σ 2 the variance, and b an intensity offset caused by X-rays leaking through the mask bars.Comparing the flat field and sample IC parameters for the same pixel, a process called phase retrieval, yields the transmission, refraction and dark field contrasts [4].The transmission contrast can be converted into attenuation contrast through the Beer-Lambert law and the refraction contrast is the differential phase contrast, which can be numerically integrated to deliver the phase contrast.
where T stands for sample transmission and α is the refraction angle caused by the sample.M = z sd /z so is the geometric magnification of the sample (and also approximately of the sample mask), with z sd and z so the source-detector and source-object distances, respectively.The object-detector distance is represented by z od and σ 2 DF is the dark field contrast, which is measured as the angular beam broadening.The subscripts s and f indicate sample and flat field IC parameters, respectively.

Conversion to inline EI
The only additional requirement of the new inline EI setup compared to the conventional setup is that after alignment, i.e. when the sample and detector mask apertures perfectly overlap, the sample mask can be translated along the optical axis.Doing so, the magnification of the sample mask changes (M in Eq. ( 3) and ( 4)).The sample mask aperture pitch (p s in Fig. 1), however, is designed for one specific magnification.Hence, changing the magnification will cause the projected sample mask aperture pitch to no longer match that of the detector mask (p d in Fig. 1).As a result, the alignment between sample and detector mask apertures will vary over consecutive detector columns, effectively creating a moiré pattern on the detector plane.
The intensity modulation of this moiré pattern can be interpreted as an IC profile spread out across multiple detector columns (see the intensity profile in Fig. 1(b)), where every detector column acts as a different sampling point on the IC.Thus, while the number of IC sampling points in a standard EI scan is fixed by the chosen number of sample mask steps, the number of IC sampling points in our inline EI setup is determined by the chosen sample mask misalignment.Therefore, the misalignment can be tweaked to tune the desired number of IC sampling points for each specific use-case, where larger sample mask misalignments provide fewer IC points.For example, decreasing the misalignment, i.e. increasing the number of IC sampling points, increases the number of required projections but also improves the IC fitting procedure.
After an inline EI acquisition, the projections have to be reshuffled in order to construct ICs for each piece of the scanned sample.Imagine a pixel-sized sample that is scanned inline by translating it in steps of one pixel.The first projection will capture the sample in the first pixel column, the second projection in the second pixel column, etc.To construct the proper IC for this sample, the first column of the first projection has to be combined with the second column of the second projection, etc.The same process applies for larger samples and different sample step sizes.The i th column of the j th projection has to be combined with the columns of the previous/subsequent projections that illuminate the same portion of the sample.
The mask misalignment dictates the IC width, i.e. the number of columns covered by each IC (as will be demonstrated in the experiments).Depending on the chosen misalignment, the IC for each portion of the sample might consist of more points than in a conventional EI scan.In the case of an over-sampled IC, either the sample step size can be increased, reducing the total acquisition time at the cost of IC points, or the sample step size can be tweaked to include dithering (see below).
Once the ICs are constructed, the Gaussian profiles can be fit using e.g. the gpufit toolkit [18].Depending on the FOV and misalignment magnitude, multiple ICs are present across the projection image (see Fig. 6).While these surplus ICs do not provide additional sample information, they can be used to increase the statistics of an inline acquisition by averaging the results of multiple ICs into a single image, as is also done in [9].This indicates that, given a fixed FOV, there is a trade-off between the IC width (i.e. the number of columns covered by each IC) and the total number of ICs that fit in the FOV.

Dithering in inline EI
Standard EI acquisitions often include dithering, a technique where projections at several sub-pixel sample steps are combined to increase the image resolution in the direction of the mask stepping.Dithering allows one to increase the spatial resolution from the (demagnified) pixel size to the sample mask aperture width (again in the direction of the mask stepping) [19].The dithering principle can be applied straightforwardly to inline EI by setting the sample step size to the aperture width.However, this would substantially slow down the acquisition.Alternatively, if the inline IC is sufficiently over-sampled, the sub-pixel dither steps can be included in the sample stepping scheme, such that consecutive detector columns not only record a different IC sampling point, but also a different sample dither step, as illustrated in Fig. 2. Effectively, a trade-off is made between the number of IC points in each dither step and the total number of dither steps, i.e. the spatial resolution, where the product of both has to equal the number of IC points in the original non-dithered IC.For example, if a sample would normally be translated by steps of one demagnified pixel over a total of 50 IC points, dithering can be included by translating it instead by steps of a demagnified pixel plus a dithering step.In this example scenario, five dither steps could be introduced, yielding five ICs with each 10 sampling points and each IC imaging a slightly different portion of the sample to increase the spatial resolution.This way, a dithered image can be acquired using the same number of projections, i.e. for the same scanning time, as a lower resolution non-dithered image.The only constraint of this alternative dithering method is that there should be enough total IC sampling points to divide among the different dither steps and that the data recombination technique described above is properly adjusted to account for dithering.

Experiments
All experiments were performed using the FleXCT scanner described in [14], which was outfitted with the EI setup described in [15].The EI mask parameters were optimized to function for a setup magnification of 1.5 and a source-detector distance of 1.8 m, hence with a source-sample mask distance of 1.2 m.The experimental setup is shown in Fig. 3.After aligning the masks according to [16], setup misalignment was induced by shifting both the sample mask and sample stage along the optical axis towards the source.All acquisitions were performed in a step-and-shoot manner, due to the long exposure times required for each projection.
First, flatfield projections at different mask misalignments were acquired to visualize the IC moiré patterns and to verify that conventional phase retrieval through IC fitting could be applied.Then, the influence of the source spot size on the moiré IC width was investigated by varying the source power.Next, a qualitative comparison was made between an inline acquisition and a conventional EI scan, where the inline acquisition results were calculated for both a single IC and the average of three neighboring ICs.Finally, a new dithering acquisition scheme was tested, first through simulations [20] and then through experiment, allowing optimization of the spatial resolution without requiring additional projections.

Different mask misalignments
As a first validation of the new setup, flat field projections were acquired for a misalignment magnitudes of 5, 10 and 20 mm, all towards the X-ray source.The X-ray source energy and power were set to 60 kVp and 40 W, respectively, and each projection consisted of 3 averages at 2 s exposure time.The resulting intensity profiles were examined both as a function of detector column and equivalent mask step, with the equivalent mask step representing how much the sample mask would have to be stepped in a standard (aligned) EI setup to obtain the same IC intensity.The equivalent mask step between two neighboring pixel columns is defined as with SSMD the aligned source-sample mask distance, d mis the induced sample mask misalignment and p SM the sample mask period.While the IC width across the detector columns is expected to scale inversely with the mask misalignment, the equivalent mask step intensity profile is the one used in the IC fitting and is expected to be largely independent of the misalignment magnitude.

Different source spot sizes
The FleXCT source spot size scales roughly linearly with source power, where the source power in Watts roughly corresponds to the source full-width at half-maximum (FWHM) in micrometers.
Hence, the effect of the source spot size on the IC shapes was investigated by acquiring projections at different source powers between 40 W and 100 W. The sample mask misalignment was kept constant at 50 mm towards the source, while the source energy, exposure time and number of averages were kept identical to the previous experiment.As the source power was increased while keeping the exposure time constant, the total X-ray flux between projections also increased.

Comparison with conventional EI scan
Next, a wooden, beryllium and hollow carbon cylinder (see Fig. 4) were scanned using both a conventional and inline EI setup.The scans were performed at an energy of 40 kVp and 50 W source power, while acquiring 3 averages at 3 s exposure time per projection.For the conventional EI setup, 11 equally spaced sample mask steps were taken in the [−50 µm, 50 µm] interval (relative to perfect sample and detector mask alignment).The inline scan was performed at 25 mm sample mask misalignment towards the source, providing relatively sharp ICs to limit the number of required detector columns, and consisted of 49 projections with sample translation steps of four pixel widths, translating the sample across three adjacent IC profiles.Each inline IC consisted of 44 detector columns, resulting in 11 IC points for each portion of the sample due to the four pixel sample step size.For the inline flatfield IC, as it does not depend on the sample step size, the full 44 point ICs were used, which had equally spaced equivalent mask steps approximately in the [−47 µm, 47 µm] interval.The effect of using multiple ICs was investigated by comparing the results for a single IC with those of combining the three scanned ICs.Phase retrieval was performed using Eqs.( 2) -( 4) and for the case of multiple ICs the average was taken over the retrieved contrasts.

Inline dithered acquisition
The inline dithering method was first evaluated using the CAD-ASTRA simulation toolkit [20][21][22] to investigate how to properly recombine the data from all projections into a single image.The  steps the translation step was one demagnified pixel plus one fifth of a demagnified pixel (≈124 µm), where the one fifth of a pixel represents what would be the dither step in a conventional EI acquisition.The scanned surface mesh sample, a collection of ellipsoids, is shown in Fig. 5(a).After the simulation experiment, analogous inline scans were performed with the FleXCT system.The scanned marker sample is shown in Fig. 5(b).The sample mask was set at 15 mm misalignment towards the source, resulting in IC profiles spanned over 90 detector columns, and the source energy and power were set to 60 kVp and 60 W, respectively.A single central IC was considered.Again, a data set without dithering and one with five dither steps was acquired, with sample steps of respectively ≈103 µm and ≈124 µm.The sample step sizes were defined the same as in the simulation experiment and 420 total sample steps were recorded per data set.

Different mask misalignments
An example flat field projection for 10 mm of sample mask misalignment (towards the X-ray source) is shown in Fig. 6.Intensity profiles of the central detector row for 5, 10 and 20 mm sample mask misalignment are presented in Fig. 7, where the left panel shows intensity as a function of the detector columns, while the right panel shows intensity as a function of the equivalent mask step for the central IC profiles in the left panel.The results show confirmation of the expectation that, while the misalignment magnitude indeed affects the IC width on the detector, it does not influence the IC shape when plotted against the equivalent mask step.Rather, it influences the number of IC sampling points.

Different source spot sizes
The influence of the source power (which was used as a proxy for the source spot size) on the IC shape, the IC fit parameters, and on the overlap between neighboring ICs is shown in Fig. 8. From the fit parameters in Fig. 8(b) it is clear that increasing the source power increases both the IC amplitude (due to increased flux) and variance (due to increased spot size), where the latter is also represented graphically in Fig. 8(a).Higher source powers also cause the tails of neighboring ICs to increasingly start overlapping, as shown in Fig. 8(c).

Comparison with conventional EI scan
In Fig. 9, conventional and inline EI scan results are presented for the test sample shown in Fig. 4. The dashed lines indicate the detector row used for the line profiles.For the inline scan, both   (c) Neighboring ICs (markers) and their fits (dashed lines).

Inline dithered acquisition
The refraction contrasts of the inline EI dithering experiments are presented in Fig. 10.The images on the left show results from simulated data of the sample in Fig. 5(a), obtained using CAD-ASTRA, while the images on the right show results from a FleXCT scan of the marker shown in Fig. 5(b).A comparison is shown between no dithering and five dithering steps, where the top row shows the full obtained image and the bottom row contains a zoom-in on the indicated regions.A clear resolution improvement can be observed in the images obtained using dithering, but the FleXCT result also contains double edges.

Discussion
The left panel in Fig. 7 shows how the number of ICs in the FOV increases and their width decreases for larger sample mask misalignments, i.e. the IC shape as a function of the detector columns is not constant between different mask misalignments.However, the retrieved contrasts, based on comparing the fit parameters of the ICs (Eqs.( 2) to (4)), should not depend on the chosen mask misalignment.To achieve a constant IC shape, the intensity can be represented instead as a function of the equivalent mask step, as shown in the right panel of Fig. 7.In this view, changing the mask misalignment does not change the shape of the IC but rather changes the number of points it is sampled with.For example, the central IC profile in the left panel of Fig. 7 for 5 mm mask misalignment is spread out over 251 detector columns, while the 20 mm misalignment central IC profile shrunk down to 62 columns.While only radiographs are considered in this paper, the flexibility in selecting the number of IC sampling points can be used together with the reconstruction method detailed in [23] to explore the possibility of performing inline EI-CT acquisitions.The ICs in the right panel have the same number of sampling points as those in the left panel, but as the ICs all have the same shape this will only affect the IC sampling density.Note that even 62 points are still many more IC sampling points than the 5 to 15 points conventionally used in a standard EI scan.Furthermore, the shape of the IC is only expected to remain approximately constant, as it will also be influenced by factors such as the projected aperture width, which scales together with the mask misalignment.However, this was not found to affect the IC shape for the range of mask misalignment values used in the presented experiments.
Misalignment along the optical axis can be achieved by either moving the sample mask towards the X-ray source or towards the detector.While in theory both movements should give equivalent results, in practice a misalignment towards the source is preferred.Mask misalignment towards the detector reduces the projected sample mask size on the detector, hence changing the relevant detector area, while for misalignment towards the source the detector area is fixed by the detector mask size.
The plots in Fig. 8 show how the IC width broadens for increasing source focal spot sizes.These results confirm the findings in [13], where an asymmetric sample mask was used to obtain similar results.As the source power was used as a proxy for spot size, Fig. 8(b) also shows an increase in IC amplitude caused by the increased flux.The variability in the mean IC position is believed to originate from an asymmetric spot size increase when increasing the source power, resulting in the spot to be projected to a slightly shifted location on the detector.From Fig. 8(c) it can be seen that for source powers higher than 80 W neighboring IC tails start to overlap, which will result in less reliable fits as the signals of neighboring ICs start to mix with each other.This fitting issue is exemplified by the decreased offset value for 100 W source power in Fig. 8(b), where the Gaussian fit could no longer properly distinguish between variance and offset.
Qualitatively, the 2D images presented in Fig. 9 look very similar.However, it shows from the line profiles that the inline scan results exhibit a slightly smoother signal, especially for the dark field, which is attributed to the higher number of flatfield IC sampling points (44 in the inline scan versus 11 in the standard scan) reducing noise induced variance in the fitting process.When including the overhead in the conventional setup of mounting the sample after taking a flat field, the acquisition times of the conventional and inline setups were roughly equal for a single inline IC, with the inline acquisition time increasing linearly with the number of scanned ICs.Inline EI scans can be sped up by moving from step-and-shoot to continuous acquisitions, if sufficient X-ray flux is available.In this work, all experiments were performed using the step-and-shoot method due to the long exposure times required for each projection within our relatively low flux scanning system.While for the specific inline setup used here the inline scan required more projections than the conventional scan to fully translate the sample past the three inline ICs, the inline flatfield ICs were constructed from a single projection (usually the first or last projection of the inline acquisition) and thus caused no significant overhead to the scanning time.It can be seen that averaging the results from three ICs further reduces the noise in the line profiles.The actual number of ICs in the FOV that can be included in the final image will depend on the sample mask misalignment, with larger misalignments resulting in more (but narrower, i.e. less densely sampled) ICs.Furthermore, due to increased mask shadowing [24,25] and general X-ray flux decrease for increasing source cone angles, the IC profiles at the mask edges will look different from the central IC profiles and it is not yet understood if these edge ICs can still be used to reduce the image noise.For the results shown in Fig. 9(c), the three chosen ICs were central in the mask FOV.
The results in Fig. 10, especially the zoom-ins, show the resolution increase obtained by including dithering in the inline stepping.While the refraction contrast is shown here to illustrate the point, in general all three contrasts gain an improved resolution by including dithering.The marker sample scanned in the FleXCT system shows some double edges, which is attributed to the sample not being perfectly still during the acquisition and/or the sample steps not being calculated precise enough (due to small variations between the expected and the actual sample position).This is supported by the fact that in the CAD-ASTRA simulation results, which allowed complete control over sample location and movement, no double edges are present.

Conclusion
A novel method to perform inline EI acquisitions, based on purposefully misaligning the sample mask along the optical axis, is presented.The method requires no new hardware components and allows all three XPCI contrasts to be retrieved, thereby providing a flexible method with no additional cost to perform inline EI scans.The IC shape was found to be independent of the misalignment magnitude when plotted against the equivalent sample mask step (i.e. the sample mask step required to obtain the same IC intensity in a standard EI setup), making the phase retrieval process independent of the mask misalignment.For source spots larger than 80 µm FWHM the tails of neighboring ICs were shown to start overlapping, complicating the IC fitting process.Comparing results of an inline with a conventional EI scan, qualitatively nearly identical profiles were found, with smoother profiles observed for the inline results when averaging over multiple ICs.Finally, a specialized inline acquisition scheme was successfully applied to obtain dithered images.
Disclosures.The authors declare no conflicts of interest.
(a) A conventional EI setup.(b) The misaligned EI setup.

Fig. 1 .
Fig. 1.A conventional (top) and misaligned (bottom) EI setup (not to scale).The misalignment along the optical axis is represented by z mis .The intensity profiles on the right represent a flat field projection.

Fig. 2 .
Fig. 2. Illustration of how dithering can be performed with the inline EI setup by taking sample steps of a demagnified pixel plus the dither step size.The bottom row shows the ICs obtained for each dither step by sub-sampling from the full IC above.

Fig. 3 .
Fig. 3. Top view of the EI FleXCT setup, with labeled components.
FleXCT geometry was mimicked in CAD-ASTRA, including the pixel size of 150 × 150 µm 2 , and source-detector and source-sample mask distances of respectively 1.8 m and 1.2 m.The sample was placed 55 mm behind the sample mask.Projections were simulated for a sample mask misalignment of 23 mm towards the source and a detector of 150 by 57 pixels, where the misalignment and pixel columns were chosen to fit exactly one IC in the FOV.The source size was set to 30 µm FWHM and 10 000 rays were cast per pixel in the phase-sensitive direction.A data set without dithering and a data set with five dither steps were generated.Each data set consisted of 195 projections with translated sample positions.In the case of no dithering the sample translation step was one demagnified pixel (≈103 µm), while for the case of five dither (a) CAD-ASTRA mesh (b) FleXCT marker sample.

Fig. 7 .
Fig. 7. Normalized intensity profiles for different sample mask misalignment magnitudes.The left panel shows intensity as a function of the detector column, whereas the right panel shows the central ICs in the left panel as a function of the equivalent mask step.
Fit parameters for ICs in (a).

Fig. 8 .
Fig. 8. IC profiles and their fit parameters for different source powers (i.e. spot sizes), as well as the increasing overlap between neighboring ICs for increasing source powers.The sample mask misalignment was 50 mm and the source energy was set to 60 kVp.The color coding in (c) indicates independently fitted neighboring ICs.

Fig. 9 .
Fig. 9. Phase retrieved images and line profiles of the sample shown in Fig. 4. Inline scan results are shown for a single IC and the average from three ICs.

Fig. 10 .
Fig. 10.Refraction contrast with and without dithering, obtained from the inline EI CAD-ASTRA simulation (left) and FleXCT scan (right).The scanned samples are shown in Fig. 5.The bottom row images show a zoom-in on the marked region in the top images.