As mentioned in the previous chapter, the SYRMA-3D experimental setup encompasses a novel CdTe photon-counting detector. This imaging tool can offer great advantages over conventional X-ray detectors but, at the same time, requires careful characterization and specific processing to attain high-quality artifact-free images. In this context, the main goals of the present chapter are to provide the detector characterization and to demonstrate the effectiveness of the implemented pre-processing procedure. Many of the contents presented in the following have been published in  [1].

4.1 Photon-Counting Detectors: An Overview

In recent years high-Z large-area single-photon-counting detectors have become appealing for imaging applications both in synchrotron and conventional sources experiments  [2]. These detectors offer remarkable advantages over conventional indirect detection and charge integration systems. Properly operated high-Z single-photon-counting detectors show minimum electronic noise (i.e. noise is Poisson dominated), energy discrimination of photons (i.e. spectral performances) and high detective efficiency  [3, 4]. Moreover, unlike scintillator-based detectors where an increase in the efficiency typically leads to a decrease in the spatial resolution due to the scintillating process regardless of the pixel dimension, in direct conversion devices the spatial resolution is mainly limited by the pixel size  [5]. The aforementioned features make these detectors suitable for low dose phase-contrast imaging experiments, where both high efficiency for limiting the dose and high spatial resolution to detect phase effects (e.g., edge enhancement) are needed.

At present, however, the data processing of large area high-Z single-photon-counting detectors is still challenging. In fact, given the limited area of a single sensor (typically few \(\mathrm {cm^2}\)) a large field of view is obtained via a multi-module architecture employing arrays or matrices of sensors  [6, 7]. These arrangements lead to the presence of non-negligible gaps between the sensors and, when the sample footprint is bigger than a single module, to the use of close-to-edge pixels which often show worse efficiency, stability and gain constancy. Moreover, when dealing with modular detectors, both the alignment of the sensors, possibly leading to image distortions, as well as the energy threshold equalization among the modules can be critical. In addition, these detectors usually suffer from local charge-trapping effects due to impurities in the sensor’s crystalline structure. Charge trapping is in general, dependent on the polarization time and on the exposure  [8,9,10,11], leading to severe ring artifacts in CT applications, where the scan duration may be in the order of several seconds or more  [12]. In absence of a dedicated pre-processing procedure, all these effects cause artifacts which alter significantly the image quality, possibly impairing its scientific or diagnostic significance.

4.2 Pixirad-8

The imaging device used in the SYRMA-3D experimental setup is a large-area CdTe photon-counting detector (Pixirad-8), produced by Pixirad s.r.l., an INFN spin-off company  [1, 13, 14]. The basic building block of the detector features a pixelated solid-state CdTe sensor which is connected to a matching CMOS readout ASIC via the flip-chip bonding technique. Pixirad-8 is made up by an array of 8 modules tiled together, each one with an active area of 30.7 \(\times \) 24.8 \(\mathrm {mm^2}\), leading to a global active area of 246 \(\times \) 24.8 \(\mathrm {mm^2}\). The pixels are arranged on a honeycomb matrix with 60 \({\upmu }\)m pitch, corresponding to a pixel-to-pixel spacing of 60 \({\upmu }\)m in the horizontal direction and 52 \({\upmu }\)m in the vertical direction, leading to an overall matrix dimension of 4096 \(\times \) 476 pixels  [12]. Each pixel is associated with two independent discriminators and 15-bit counters which can be used either in color or in dead-time-free mode. The first mode, suitable for polychromatic X-ray spectra applications, allows to set two different energy thresholds, thus enabling spectral imaging  [15]. Conversely, when the second mode is selected, which is always the case throughout this work, both discriminators are set to the same threshold and one counter is filled while the other is being read, thus providing a virtually dead-time-free acquisition. This modality allows to perform continuous acquisitions where the organ is constantly irradiated without delivering unnecessary radiation dose and not needing any beam-shutter/detector synchronization.

Considering a beam energy of 30 keV and a detector threshold of 5 keV, resembling the working condition for the images presented in this work, the detector is linear up to approximately \(2\times 10^5\) counts/pixel/s, corresponding to \(6.4\times 10^7\) counts/\(\mathrm {mm^2}\)/s, as shown in the left panel of Fig. 4.1. Moreover, given the CdTe sensor thickness of 650 \(\upmu \)m, the detector has an absorption efficiency higher than 99.9% up to 40 keV. When the detector threshold is set to half of the beam energy in order to limit multiple counts due to charge-sharing effects, the detector noise is found to follow the Poisson statistics, i.e. it is equal to the square root of the counts, as reported in the right panel of Fig. 4.1.

Fig. 4.1
figure 1

Pixirad linearity with a beam energy of 30 keV and a threshold of 5 keV (left panel): points are the experimental data and solid line represents an ideal linear response. Standard deviation as a function of the mean counts in 50 pixels regions with a beam energy of 30 keV and threshold of 15 keV (right panel): scattered points are experimental data and line is the ideal Poissonian noise. Reproduced from  [14] by permission of IOP Publishing

Fig. 4.2
figure 2

Module-by-module threshold scan (left panel) and corresponding differential spectra (right panel), obtained with a beam energy of 38 keV. The origin of 4 peaks in the differential spectra, labelled with letters A-D, is explained in text

Pixirad-8 allows to define only a global energy threshold, so it sets the same threshold for all the modules. Anyway, when a multi-module architecture is involved, differences among the detector blocks may arise, leading to discrepancies in the energy response larger than the intrinsic energy resolution of each sensor. With the aim of testing the threshold homogeneity, a threshold scan at a fixed beam energy of 38 keV has been carried out and the mean count values of each module have been plotted as a function of the global energy threshold (Fig. 4.2, left panel). From the plot it is clear that no relevant differences among the modules are found below 9 keV while, for higher thresholds, one of the modules (ASIC 7) yields systematically higher counts. This phenomenon can be better understood considering the differential counts spectra as a function of the threshold (Fig. 4.2, right); the energy response of ASIC 7 is shifted towards higher energies (maximum difference of about 8 keV), hence highlighting a discrepancy in the threshold calibration of module 7 with respect to the others. The threshold discrepancy or miscalibration of one or more modules may represent a problematic issue when dealing with (polychromatic) spectral imaging while it is way less critical for monochromatic imaging. In addition, in the case of SYRMA-3D project, images are acquired in most cases at low threshold energies (3 keV), where the response of all the modules is homogeneous. As a further remark, it should be noted that each of the differential spectra features 4 peaks (from A to D in figure) which demonstrate the energy resolving capabilities of the detector and provide an interesting insight into the involved physical processes:

  • peak A, also defined as full-energy peak, represents the impinging photon energy which is entirely deposited and collected within a single pixel. Of note, the observed discrepancy between the photon energy (38 keV) and the peak position (around 35 keV) is arguably due to a slight inaccuracy in the global threshold calibration provided by the manufacturer, which becomes less noticeable at lower energies. Of note, in case of spectral imaging applications requiring an accurate determination of threshold values, the global threshold can be re-calibrated  [15].

  • peak B identifies the detection of the Cadmium fluorescence photons (Cd \(K-\)edge is at 27 keV, \(K_{\alpha }\) transition energy is 23 keV) produced inside the sensor;

  • peak C reflects the local energy deposition due to the absorption of a primary photon and the following fluorescence photon escape (\(\mathrm {38\ keV-23\ keV=15\ keV}\));

  • peak D is due to the energy released locally by the \(K-\)shell photoelectron (\(\mathrm {38\ keV-27\ keV=11\ keV}\)).

4.3 Pre-processing Procedure: Description

The SYRMA-3D collaboration put a great effort in the realization of a multi-step pre-processing procedure dedicated to the Pixirad-8 detector to obtain ‘clinical-like’ images not containing potential confounding factors due to the presence of artifacts. As a general remark, it is worth noting that the relevance and the interplay among various sources of artifacts are dependent on the specific application. For instance, time-dependent effects as charge trapping may be of little or no importance for fast planar imaging, while being detrimental in CT; on the contrary, the effect of insensitive gaps between detector modules can be easily compensated for in CT, where lost information is recovered at different projection angles, while it can be critical in planar imaging. For this reason, albeit being specific for the SYRMA-3D experiment, the implemented pre-processing procedure has a modular structure allowing to adapt or modify each module independently to cope with specific experimental requirements. In the following, a detailed description of this procedure is given and the effects of each step both on projections and reconstructed images are documented.

The term pre-processing refers to all the elaborations on raw data needed, regardless of the acquisition parameters, to compensate for detector-related artifacts, yielding, in this case, a set of corrected projections ready to be phase-retrieved and reconstructed. The modular structure of the pre-processing procedure comprises five steps, namely dynamic flat fielding, gap seaming, dynamic ring removal, projection despeckling and around-gap equalization. Each of these steps require as input several parameters that have been optimized on actual breast specimens datasets, in order to mimic a realistic clinical scenario.

For the sake of computational efficiency and portability, the code is implemented in C language. The complete processing of a typical experimental dataset comprising 1200 16-bit raw projections, with a dimension of 2300 \(\times \) 70 pixels each, requires about 4 minutes on a 8 cores Intel Core i7-6700 CPU @ 3.40 GHz including loading and saving operations.

4.3.1 Dynamic Flat Fielding

The flat-fielding procedure is common to most of the X-ray imaging applications and it serves multiple purposes, namely to correct beam shape and intensity inhomogeneities, to equalize different gain levels among pixels and to perform an image normalization, preparing planar projections for CT reconstruction. The standard flat fielding consists of a pixel-by-pixel division of each projection image with a constant flat image (i.e. acquired without the sample). Defining P(xyt) as the projection image, with \(x,\ y\) the pixel coordinates and t the projection index proportional to the acquisition time, and \(\bar{F}_0(x,y)\) the constant flat image, the corrected image with a standard procedure will be

$$\begin{aligned} f_{\mathrm {static}}(x, y; t)=\frac{P(x, y; t)}{\bar{F}_0(x,y)}\ \end{aligned}$$
(4.1)

Given a fixed detector frame rate, the statistical noise of \(\bar{F}_0(x,y)\) is decreased by computing the average of \((2w+1)\) flat images, where w determines the width of the averaging window

(4.2)

The choice of an odd number as the window width has been made for the sake of notation coherence: in the following most of the presented filter windows are centered in a pixel of interest so that an odd filter dimension is required. With this procedure, hereinafter referred to as static flat fielding, the presence of a detector gain time dependence in the projection images cannot be compensated since the flat image is not time dependent. On the contrary, the implemented dynamic flat-fielding approach requires as many flat-field images as the number of projections so that the denominator of Eq. (4.1) can be substituted with a moving average of \(2w+1\) flat images

(4.3)

In this way, if the gain time dependence is reproducible, each flat image has both a high statistics and the same time dependence as the projection images. The flat fielded projections will be

$$\begin{aligned} f_{\mathrm {dynamic}}(x, y; t) =\frac{P(x, y; t)}{\bar{F}(x, y; t)}\ \end{aligned}$$
(4.4)

In order for this approach to be used, a slow time dependence of gain is assumed so that, within the moving average window \(2w+1\), the flat images are considered to be constant. Namely, given a 30 Hz frame rate and a window \(2w+1=11\) frames, the gain should not vary significantly for times in the order of 1 s. In addition, the fluctuations of the beam are assumed to be small in the time scale of the acquisition: this requirement is generally fulfilled at the Elettra synchrotron operated in top-up mode, where \(\mathrm {1\ mA}\) of ring current is injected every 20 minutes, having a baseline of 140 to \(\mathrm {180\ mA}\) at 2.4 GeV.

As a further remark, it is worth mentioning that a different approach to dynamic flat fielding exists, and it is based on principal component analysis  [16]. This technique, often used to compensate for instabilities due to vibrations or drifts in the beam, generally requires a smaller number of flat-field images to capture intensity variations, being advantageous when the scan time is long and/or the number of projections is high (see Sect. 7.2.2). Anyway, in the specific case discussed in this chapter, the scan time is short and the acquisition of as many flat-field images as the number of projections would add only 40 s to the whole examination workflow. Moreover, as it will be clear in the next section, the detector gain variations are relatively smooth and the acquisition of many flat-field images has proven to be insightful in understanding the time-dependence of the mentioned detector gain drifts.

4.3.2 Gap Seaming

As most of multi-module single-photon-counting devices, the Pixirad-8 detector has a small gap (3 pixels wide) between adjacent modules which needs to be filled within the pre-processing procedure. The selected approach is a linear interpolation with a rectangular 9 \(\times \) 8 pixels kernel. For each pixel within the gap, the interpolation window is chosen to be half in the left module and half in the right one (regions A and B in Fig. 4.3), then the mean value of each half is computed and the gap-pixel value is defined as the weighted average of the two mean values

(4.5)

where \(N_A=N_B\) is the normalization factor while the weights u(x) and v(x) are the normalized distances between the pixel within the gap and the regions A and B. Despite its simplicity, this procedure represents a good compromise between image quality and computational load. Nevertheless, more sophisticated approaches, such as the inpainting technique described in  [17], may be considered if wider gaps or high-contrast sample details crossing two modules are present.

Fig. 4.3
figure 3

Illustration of the gaps seaming procedure. The gray region represents the gap while the rectangle is the interpolation window used for the pixel of interest (dashed line). The figure is not to scale

4.3.3 Dynamic Ring Removal

Ring artifacts are produced by gain inhomogeneities at the pixel level and they are commonly encountered in tomographic reconstruction. In most of the cases the pixel (or group of pixels) producing the ring has a constant gain offset with respect to its neighbors, so that a single equalization is sufficient to remove or at least mitigate the artifact. In this case, despite the application of the dynamic flat fielding, some pixels still show a time dependent gain, resulting in rings with a non-constant intensity. To compensate for these artifacts a dynamic (i.e. depending on the projection index) equalization factor has to be used. The implemented ring-removal algorithm makes use of the alpha-trimmed filter, which is a hybrid of the mean and median filters  [18]. For each pixel, this filter takes a window of nearest neighbors, sorts their values, excludes the largest and the smallest values and replaces the pixel with the average of the remaining ones. Let g(i) be a one-dimensional image, h and c two integers which represent, respectively, the filter window and the confidence window half widths, with \(h\,\ge \,c\). The alpha-trimmed filter algorithm can be described as follows:

  • For each pixel i, consider the window of its \(2h+1\) neighbors

    $$\begin{aligned} w(j)=g(i+j)\ ,\ \ \ -h\le j\le h \end{aligned}$$
    (4.6)
  • Sort the values of w in ascending order

    $$\begin{aligned} w_s=\text {sort}(w) \end{aligned}$$
    (4.7)
  • Substitute the pixel i with the average of \(w_s\) within the confidence window of size \(2c+1\)

    (4.8)

Basically, in this average we are excluding the \(h-c\) smallest values and the \(h-c\) largest values. Note that if \(c=0\) the alpha-trimmed filter reduces to the median filter, while if \(c=h\) it reduces to the mean filter. In a two-dimensional or three-dimensional image, the alpha-trimmed filter can be applied along each dimension: we will call \(S_x[g]\), \(S_y[g]\) and \(S_t[g]\) the images filtered along the dimensions x, y and t respectively. Furthermore, we define the filter applied along two or three dimensions as the composition of two or three one-dimensional alpha-trimmed filters, as for instance \(S_{xy}[g]\)=\(S_x[S_y[g]]\).

Given f(xyt), the three-dimensional matrix describing the whole set of projections, and \(G^\sigma _t[f]\), the convolution of the image f with a Gaussian function of standard deviation \(\sigma \) along the projection axis t, the ring removal algorithm consists of the following steps:

  • First apply the alpha-trimmed filter to the projections along the dimension t, then filter them with a Gaussian convolution along the same dimension

    $$\begin{aligned} f_1(x,y;t)=G^{\sigma }_t[S_t[f]](x,y;t) \end{aligned}$$
    (4.9)

    where \(\sigma \) should be a significant fraction of the number of projections.

  • Apply the alpha-trimmed filter to \(f_1\) along the dimensions x and y

    $$\begin{aligned} f_2(x,y;t)=S_{xy}[f_1](x,y;t) \end{aligned}$$
    (4.10)
  • \(f_1\) is smooth along the dimension t by construction. It is also expected to be a smooth function along the dimensions x and y, therefore \(f_2\) and \(f_1\) should be close to each other, unless there is an equalization problem. Evaluate the equalization correction factor as

    $$\begin{aligned} \alpha (x,y;t)=f_2(x,y;z)/f_1(x,y;t) \end{aligned}$$
    (4.11)
  • Apply the correction factor to obtain the ring-corrected image

    $$\begin{aligned} f_{\text {rc}}(x,y;t)=\alpha (x,y;t)f(x,y;t) \end{aligned}$$
    (4.12)

In our implementation, we are using \(2h+1=10\), \(2c+1=5\) for all dimensions and \(\sigma =N_p/10\). Here we remark that the main advantage of this algorithm is that the equalization factor \(\alpha \) varies with the projection index, allowing to cope with non-constant ring artifacts. The results of this approach will be compared with two of the most known filters which tackle the ring-removal problem from different perspectives, namely the one proposed by Rivers  [19, 20], based on a moving average filtering, and the one proposed by Münch, based on a combined wavelet-Fourier filtering  [21].

4.3.4 Projection Despeckling

In each projection image few (about 0.5%) pixels with an abnormal number of counts, either lower or higher than the neighboring pixels, are present. Their appearance is not reproducible neither in space nor in time and their content cannot be correlated with the actual number of impinging photons. To remove these speckles, which cause streak artifacts in the reconstructed image, they first need to be recognized and then replaced. The procedure is based on a slightly different version of the alpha-trimmed filter described in the previous section, modified in order to filter only the bad pixels: for each pixel position i the average \(\bar{f}(i)\) and standard deviation \(\sigma (i)\) of the pixels comprised within a confidence window are computed, then the pixel of interest is replaced only if its value differs from the mean value more than \(N\sigma (i)\), N being a parameter of the filter. In this way N acts as a filter sensitivity threshold, where if \(N\rightarrow 0\) all the pixels are filtered, as in the implementation reported in Sect. 4.3.3, while if \(N\rightarrow \infty \) no pixels are modified. Moreover, when calculating the average and standard deviation the \(h-c\) smallest values and the \(h-c\) largest values are excluded, meaning that pixels with either abnormally high or low counts can be easily discarded. For the projection despeckling, the filter window is a \(5\times 5\) pixels square and the confidence window is a \(3\times 3\) pixels square, while the optimization of the parameter N is reported in the results Sect. 4.4.

Fig. 4.4
figure 4

Illustration of the equalization procedure: pixels of the projection t within the volume C are those to be equalized. See text for the complete description. The figure is not to scale

4.3.5 Around-Gap Equalization

The fifth and last step of the pre-processing is a dedicated procedure for equalizing the pixels around the gaps between modules. This further equalization is required since many adjacent columns of close-to-edge pixels show a sub-optimal gain behaviour. This effect involves a large number of pixel columns (30–40 columns across the gap), hence the action of the ring removal filter, which operates with a 10 pixels window, is not sufficient. This procedure is based on a moving average along the projection axis and it is described as follows:

  • Given a projection t, a volume C of width \(2c=40\) pixels, height equal to the full height of the projection and depth \(N_p/3\), where \(N_p\) is the number of projection, is selected across the gap between 2 modules. Other two volumes (A and B) with the same height, depth and a width of \(2a=10\) pixels are selected adjacent to C (see Fig. 4.4).

  • The mean value along x and t axis is computed for the volumes A and B

    (4.13)
  • The mean value along t is computed for the volume C

    (4.14)
  • The equalization factor is computed as

    $$\begin{aligned} \text {eq}(x,y; t)= \frac{u(x)\bar{f}_A(y; t) + v(x)\bar{f}_B(y; t)}{\bar{f}_C(x,y; t)}\ \ \end{aligned}$$
    (4.15)

    where the weights u(x) and v(x) are the normalized distances between the pixel within the gap C and the regions A and B, as defined in Sect. 4.3.2.

  • The image is multiplied by the equalization factor

    $$\begin{aligned} f_{\text {around}}(x,y; t) = f(x,y; t)\text {eq}(x,y; t)\ \ \end{aligned}$$
    (4.16)

In order for this procedure to be effectively used, the pixels within the regions A and B must not show a sub-optimal behavior. Moreover, as mentioned for the dynamic flat fielding and ring removal steps, the around-gap fixing equalization factor depends on the projection index, thus allowing to compensate for slow gain variations of close-to-gap pixels.

4.4 Pre-processing Procedure: Results

The effectiveness of the described procedure is tested on a breast surgical specimen with a diameter of 10 cm containing an infiltrating ductal carcinoma with a maximum dimension of 2.5 cm (sample B of Chap. 6). The sample is imaged at 32 keV and detector threshold set to 3 keV, delivering 20 mGy of mean glandular dose over 1200 equally spaced projections spanning an angle of 180 \(\deg \). The projections, either with or without the phase retrieval, are reconstructed via a standard FBP with Shepp-Logan filtering.

In order to compare the flat fielding procedures in the projection space, two sets of 1200 flat projections were acquired with different photon fluences: one is collected with a low photon fluence to simulate the sample attenuation, the other, acquired with a 4 times higher statistics, is used for the flat fielding. This choice is made to uncouple the effects of time and exposure on the detector’s gain, thus having two datasets with the same acquisition time (i.e. acquired after the same time from the polarization of the CdTe sensor) but different exposures. In panels (a), (b) of Fig. 4.5, a detail of the first projection normalized with the static and the dynamic flat field approach is shown: at the center of both images a cluster of pixels with a gain lower than the neighboring ones is present. Observing the same region at a later time, it is evident that the cluster exhibits a gain variation which is more pronounced for the static flat fielding, in panel (c), with respect to the dynamic flat fielding, in panel (d). Focusing on the intensity plots as a function time, in panels (e)–(f), of a group of pixels within the cluster, it is clear that the gain variation of the statically flat fielded (\(\sim \)55%) dataset is significantly higher with respect to the one (\(\sim \)20%) of the dynamically flat fielded projections. Moreover, as it should be expected, the latter shows a smoother time-dependence which can be better compensated by the ring-removal procedure. The effects of each uncompensated crystal defect can be traced through the tomographic reconstruction process. In Fig. 4.6, panel (a), detail of the reconstructed image corresponding to a row through the defective pixel cluster obtained with the static flat fielding is shown: a bright streak-like artifact embedded within a partial ring artifact, due to the uncompensated gain variation, is observed. Panel (b) reports the same detail when the dynamic flat field approach is used: in this case the streak is barely visible while the ring has been removed. In both images the whole pre-processing procedure has been applied in order to highlight only the effect of the flat fielding in the final reconstruction.

Fig. 4.5
figure 5

Comparison between static and dynamic flat-fielding procedures in the projection space using two flat dataset with different statistics. In (a) and (c) the first and last projections when the static flat field is applied, in (b) and (d) the first and last projections when the dynamic flat field is applied. In (e) and (f) the average intensity of the bad pixel cluster (dashed line in (a)) as a function of time for the static and dynamic flat field respectively. Smoothed line is produced through moving average with a with a 100 points window

Fig. 4.6
figure 6

Detail of a reconstruction obtained applying the static (a) and the dynamic (b) flat fielding. The arrow indicates a streak artifact clearly visible in (a) while it is barely visible in (b)

Panels (a), (c) in Fig. 4.7 show, respectively, the sinogram and the tomographic reconstruction of the sample where only the flat fielding has been applied. The sample was imaged using 4 modules of the detector, thus in the sinogram only 3 gaps are visible, producing marked ring artifacts in the reconstruction. The artifacts cover only half of circumference because the projections are acquired over 180 degrees. In panels (b), (d) both the sinogram and the reconstruction are reported after the gap seaming: given the small size of the gaps (3 pixels wide) the interpolation does not introduce significant artifacts, thus preserving the anatomical information. Nevertheless, the resulting image is still affected from the presence of several artifacts which need to be corrected.

Fig. 4.7
figure 7

Sinograms and reconstructions obtained before (a), (c) and after (b), (d) the gap seaming

Fig. 4.8
figure 8

Sinograms and reconstructions obtained applying Rivers (a), (d), Münch (b), (e) and dynamic (c), (f) ring removal filters. Sinograms are inverted and displayed on a logarithmic scale for better visualizing the action of the filters. The arrows in both the sinograms and the reconstructions indicate uncompensated ring artifacts

Fig. 4.9
figure 9

Histograms for the despeckling filter optimization. In a the non filtered spectrum (long-dashed line) is compared with the filtered ones (solid line for N = 15, shirt-dashed line for N = 3), in (b) also the median filtered spectrum (shirt-dashed line) is reported

Panels (a), (d) of Fig. 4.8 show the sinogram and the reconstruction where the Rivers ring-removal filter  [19, 20] has been applied with a window width of 11 pixels, while in panels (b), (e) the Münch filter  [21] has been applied with a decomposition level 5 and a width of the Gaussian bandpass function of 3. From the sinograms, it can be seen that neither the Rivers nor the Münch filter are optimal: in both cases most of the rings are only partially compensated resulting in arc (i.e. partial ring) artifacts. In particular, focusing on the Rivers approach where a constant equalization factor is used, the artifacts appear to be brighter at the top of the sinogram, well corrected in the central part and darker at the bottom. Again, this is due to the time gain variation which occurs to some pixels as previously described. The Münch filter yields slightly better results on the rings but it introduces a low spatial frequency modulation strongly affecting the image quality. Comparing these results with panels (c), (f), obtained with the procedure described in Sect. 4.3.3, it is clear that the latter yields the best results, substantially removing most of the ring artifacts. It is worth noticing that the main advantage of this approach is the presence of an equalization factor varying with the projection index.

As reported in Sect. 4.3.4, the parameter N of the despeckling filter should be optimized in order to remove only the bad pixels. For this purpose a dataset of 1300 flat projections has been acquired and subdivided into two datasets consisting of the even and the odd projection, respectively. Then, the even projections were divided, pixel by pixel, by the odd projections. In this way the gain dependence from time and exposure is matched, and the distribution of the bad pixels alone can be studied. The gray level histogram of the resulting dataset is plotted in panel (a) of Fig. 4.9 (black dashed line): if no bad pixels are present, the distribution should be a Gaussian centered around one, whose width is only dependent on the photon statistics. On the contrary, the presence of bad pixels widens the distribution on both sides. The despeckling filter is expected to suppress the tails of the distribution without affecting the width of the Gaussian, i.e. the statistical noise. By varying continuously the filter parameter N it is found out that values around 15 satisfy this request (blue solid line) while, for lower N (e.g., N = 3, red dashed line), the statistical noise is reduced, meaning that a certain level of correlation among pixel is introduced and the image is unnecessarily smoothed. The same overcorrection effect is observed when applying common despeckling filters, such as the median filter, as reported in panel (b). Once the parameter N has been optimized, the despeckling filter can be applied to the projections. Panels (a), (b) in Fig. 4.10 show a detail of the sinogram before and after the application of the filter, respectively: the bad pixels have been removed without affecting the image noise and texture. The effect of the filter on the reconstruction is reported in panels (c), (d) of Fig. 4.10, where in the unfiltered image several striking artifacts due to bad pixels are visible. Here, it has to be remarked that the optimization of the parameter N is crucial since an excessive smoothing of the projections may disrupt the edge-enhancement effect, which is one of the key features of PB breast CT.

Fig. 4.10
figure 10

Sinograms and reconstructions before (a), (c) and after (b), (d) and the application of the despeckling filter. Arrows indicate some of the streaks in the reconstruction

The last step of the pre-processing procedure is the around-gap equalization. In facts, referring to panel (a) in Fig 4.11, two wide rings corresponding to the regions around the gaps between modules, can still be observed. Once the equalization procedure is applied the rings are removed and the final reconstructed image, shown in panel (b), is free from major artifacts.

Fig. 4.11
figure 11

Reconstructions before (a) and after (b) the around-gap equalization

Fig. 4.12
figure 12

Detail of a reconstruction without (a), (b) and with (c), (d) the phase retrieval. In (a), (c) only the flat fielding and gap seaming steps are applied, in (b), (d) the whole pre-processing procedure is used

Fig. 4.13
figure 13

Final reconstruction obtained subsequently applying the pre-processing procedure and the phase-retrieval

After the projections have been pre-processed, the (two-materials, \((\delta _1-\delta _2)/(\beta _1-\beta _2)=869\)) phase-retrieval algorithm is applied. Noticeably, the phase-retrieval algorithms produces a remarkable increase in the contrast-to-noise-ratio, thus highlighting also uncompensated artifacts which may be barely visible in the phase-contrast images. In panels (a), (c), of Fig. 4.12 a detail of the reconstruction processed only with the first two steps of the pre-processing procedure (namely, flat fielding and gap seaming) is reported with and without phase retrieval: in both cases severe ring artifacts are observed but, when phase retrieval is applied, streak artifacts arising from uncompensated speckles become evident, definitely impairing the image quality. Conversely, when the whole pre-processing is applied, both images without and with phase-retrieval, in panels (b), (d), do not report significant artifacts. In this context, it should be stressed that the optimization of the pre-processing procedure must account also for the subsequent image processing (e.g., phase retrieval) in order to yield a high quality image. In Fig. 4.13 the final result of the data processing, comprising the pre-processing and the phase-retrieval procedure, is shown: the extension, shape and boundaries of both the tumoral and glandular tissue (light gray) embedded in the adipose background (dark gray) are clearly visible without artifacts.

In addition to the images presented in this chapter, the pre-processing procedure has been successfully applied to a great variety of breast-like samples, spanning from test objects to a number of surgical specimens, within a wide range of beam energies, fluences and detector thresholds  [22,23,24,25,26]. As a general remark, it is the author’s belief that high-Z single-photon-counting detectors will be widely used in future CT applications, especially in medical imaging, due to their high-efficiency, low noise and spectral performances: in this framework, the pre-processing procedure presented in this chapter may represent a useful scheme to be extended to other imaging contexts.