elsa : an elegant framework for tomographic reconstruction

elsa is a versatile framework in the landscape of X-ray tomography, offering a powerful toolkit for developing iterative reconstruction algorithms. It is primarily designed for challenging applications in classical attenuation X-ray computed tomography (CT) and advanced modalities like Phase-Contrast X-ray CT (PCCT) or Anisotropic Dark-field tomography (AXDT). elsa stands out with an extensive set of building blocks and a unified abstraction, providing the means for high-quality reconstructions across a spectrum of imaging modalities and applications. Designed as an operator-and optimisation-based framework, elsa takes a mathematical approach to model the reconstruction pipeline of imaging modalities. Through formulating optimization problems and a suite of iterative reconstruction algorithms, elsa addresses challenges in attenuation X-ray CT, PCCT, and AXDT. The core of elsa (developed in modern C++ with GPU acceleration) ensures efficiency, while its Python interface allows easy accessibility for students and researchers. Distinctively, elsa positions itself as a unique solution by supporting modern iterative reconstruction techniques for novel X-ray CT imaging modalities. The framework addresses challenges associated with X-ray CT, such as arbitrary trajectories, automatic differentiation, differential signals for PCCT, and spherical function valued reconstructions for AXDT, offering a simple abstraction for implementing tailored reconstruction methods.


Statement of need
The introduction of X-ray Computed Tomography (CT) in the 1970s revolutionized medical diagnostics, offering unprecedented insights into the human body's internal structures.Unlike traditional radiography, CT requires reconstructions through computation, which introduced the need for software frameworks.Popular frameworks include ASTRA (Aarle et al., 2016), SCICO (Balke et al., 2022), the Core Imaging Library (Jørgensen et al., 2021;Papoutsellis et al., 2021), and ODL (Adler et al., 2017).These standard reconstructions of attenuation X-ray CT can also be performed using elsa, see Figure 1.In recent years, one of the major challenges tackled by research is the reduction of X-ray dose.As X-rays induce harm in humans, reducing the dose as much as possible is vital.However, lowering the X-ray dose results in worse reconstruction quality.Many reconstruction techniques have been developed to maintain a high reconstruction quality with a reduced X-ray dosage.However, this still remains a challenging problem to this day.Figure 2 highlights this challenge on the 2DeteCT dataset (Kiss et al., 2023).It illustrates the intricacies of low-dose reconstruction and demonstrates the versatility of elsa in handling diverse optimization problems for different noise assumptions.(Kiss et al., 2023) visualizing the difference between high-dose and different low-dose reconstructions.The leftmost image displays a reconstruction using high-dose data (with a least squares data term), while the subsequent three images represent reconstructions using low-dose measurements, from left to right: with Gaussian, non-stationary Gaussian, and Poisson noise based data terms.The reconstructions can be reproduced using a script available in the elsa repository at examples/dataset/2detect_apgd_wls_nonneg.py.
Classical X-ray CT, reliant on X-ray attenuation, faces limitations in soft tissue contrast and spatial resolution.With the advent of modern imaging modalities, consideration of additional physical effects, such as refraction and scatter, introduce both opportunities and challenges.A particularly challenging example (AXDT) is shown in Figure 3, demonstrating the ability to reconstruct high-dimensional spherical scattering functions using elsa.Shown is a slice of the isotropic scattering component (spherical harmonics of degree 0, order 0), using different noise models for the data.On the left, the mean intensity data was (correctly) assumed to be Rician, while on the right, the dark-field signal was assumed to be Gaussian.The reconstructions can be reproduced using a script present in the elsa repository at examples/axdt/crossed_sticks2_dataset/main.py.
In this landscape, elsa is a distinctive framework focusing on iterative reconstruction techniques for modern X-ray CT imaging modalities.Offering a rich set of tools, elsa addresses challenges in fields like X-ray CT with arbitrary trajectories, automatic differentiation, differential signals for PCCT, and spherical function valued reconstructions for AXDT.Its unique contribution lies in supporting novel X-ray-based imaging modalities, while providing a versatile platform for tailored reconstruction methods.elsa has been integral to our group's research and vital to our scientific publications.Noteworthy application examples include robotic X-ray CT and trajectory optimization (Pekel et al., 2022a(Pekel et al., , 2022b(Pekel et al., , 2023)), as well as successful integration with deep learning approaches (Cheslerean-Boghiu et al., 2023).Recognized in scientific conferences (Frank et al., 2023;Lasser et al., 2019), elsa is an indispensable tool, contributing significantly to advancing the field of X-ray tomography.

Supported Features
Reconstruction problems are formulated as mathematical optimization problems within elsa, i.e., one minimizes a data fidelity term, augmented with regularization to incorporate prior knowledge.The framework automatically computes first and second derivatives for these problems.
elsa accommodates diverse data fidelity terms, such as (weighted) least squares and Poisson loglikelihood, and supports a variety of regularization techniques, including L2, sparsity-inducing L1, total variation, and Plug-and-Play (PnP) priors.
elsa implements multiple forward model approximations for attenuation X-ray CT, such as the Siddon's and Joseph's method, available for both CPU and CUDA.All our models support arbitrary acquisition trajectories in cone-beam geometry via projection matrices.For PCCT, the forward model employs differentiable Kaiser-Bessel functions and B-Splines, with additional support for spherical functions and spherical harmonics.
Developed in modern C++, elsa features an accessible Python interface.Comprehensive Python examples, such as those that produce the reconstructions in Figure 1 and Figure 2, accompany the software.The documentation, hosted at https://ciip.cit.tum.de/elsadocs/,includes API documentation, guides, and tutorials.elsa maintains code correctness, stability, and quality through continuous integration of changes with its high test coverage.

Figure 1 :
Figure 1: Example reconstructions of two different attenuation X-ray CT datasets.Left: Axial center slice of the walnut dataset from Meaney (2022).Right: Lateral center slice of the seashell dataset from Kamutta et al. (2022).The reconstructions can be reproduced using a script included in the elsa repository at examples/dataset/fips_apgd_nonneg.py.

Figure 2 :
Figure 2: Reconstruction of slice 29 of the 2DeteCT dataset(Kiss et al., 2023) visualizing the difference between high-dose and different low-dose reconstructions.The leftmost image displays a reconstruction using high-dose data (with a least squares data term), while the subsequent three images represent reconstructions using low-dose measurements, from left to right: with Gaussian, non-stationary Gaussian, and Poisson noise based data terms.The reconstructions can be reproduced using a script available in the elsa repository at examples/dataset/2detect_apgd_wls_nonneg.py.

Figure 3 :
Figure 3: Reconstructed wooden stick sample using Anisotropic X-ray Dark-field Tomography (AXDT).Shown is a slice of the isotropic scattering component (spherical harmonics of degree 0, order 0), using different noise models for the data.On the left, the mean intensity data was (correctly) assumed to be Rician, while on the right, the dark-field signal was assumed to be Gaussian.The reconstructions can be reproduced using a script present in the elsa repository at examples/axdt/crossed_sticks2_dataset/main.py.