TomoPhantom, a software package to generate 2D–4D analytical phantoms for CT image reconstruction algorithm benchmarks

of computerized tomographic imaging,

Phantoms Tomography Image reconstruction Iterative methods Open-source a b s t r a c t In the field of computerized tomographic imaging, many novel reconstruction techniques are routinely tested using simplistic numerical phantoms, e.g. the well-known Shepp-Logan phantom. These phantoms cannot sufficiently cover the broad spectrum of applications in CT imaging where, for instance, smooth or piecewise-smooth 3D objects are common. TomoPhantom provides quick access to an external library of modular analytical 2D/3D phantoms with temporal extensions. In TomoPhantom, quite complex phantoms can be built using additive combinations of geometrical objects, such as, Gaussians, parabolas, cones, ellipses, rectangles and volumetric extensions of them. Newly designed phantoms are better suited for benchmarking and testing of different image processing techniques. Specifically, tomographic reconstruction algorithms which employ 2D and 3D scanning geometries, can be rigorously analyzed using the software. TomoPhantom also provides a capability of obtaining analytical tomographic projections which further extends the applicability of software towards more realistic, free from the ''inverse crime'' testing. All core modules of the package are written in the C-OpenMP language and wrappers for Python and MATLAB are provided to enable easy access. Due to C-based multi-threaded implementation, volumetric phantoms of high spatial resolution can be obtained with computational efficiency.

Motivation and significance
The variety of image processing techniques, such as, reconstruction, denoising, deblurring, inpainting, and segmentation require simulated ground truth data in order to numerically verify, benchmark and evaluate the proposed methods. The ground truth data can have various specific to acquisition hardware characteristics, which also can be the focus of image processing methods. In many situations, however, over-simplistic or unsuitable simulated data are used for testing.
In computerized tomographic (CT) imaging [1], the well-known Shepp-Logan (SL) phantom [2] has been routinely used for reconstruction methods benchmarking for more than 40 years. Consisting of 10 ellipses of constant intensity (see Fig. 1), the SL phantom does not suit the diversity of objects for different imaging tasks (CT imaging supports many applications in materials science and medical imaging). For instance, in emission tomography [3], the investigated objects are intrinsically piecewise-smooth, so the use  of the SL phantom would be an inaccurate approach. Similarly, in plasma tomography [4] or optical tomography [5,6], the object of interest can be represented by smooth, continuously differentiable Gaussian functions. In material science, it is common for a sample to comprise both piecewise-constant and piecewise-smooth objects [7].
One approach to test various CT reconstruction methods is to use phantoms which are generated directly from the experimental data [8,9]. Unfortunately, the spatial resolution of such datasets is normally fixed, there is a limited selection of scanned objects is available and large data storage is frequently required for 3D high-resolution data. Alternatively, one can build a parameterized phantom by using analytical geometrical objects in accordance to some mathematical formulae. This enables a customizable approach to select a desired discretization for a model with taskspecific objects. Importantly, this approach does not require large storage since reproducible models can be built ''on-the-fly'' from the library of object descriptors (parameters).
Recently, an open-source software package XDesign [10] has been released that provides access to analytical phantoms mainly based on application to X-ray CT (XCT). XDesign is written in the Python language and supports 2D objects, including circles, triangles and triangular meshes. It can generate analytical projection data (sinograms) from custom designed phantoms and has integrated image quality metrics, which can be useful when assessing various reconstruction algorithms. However, XDesign lacks the capability of creating 3D phantoms, which is essential for testing cone-beam reconstruction methods [9]. Furthermore, XDesign delivers only piecewise-constant models which are illsuited for many applications as explained above. XDesign has been developed in conjunction with TomoPy software [11] which delivers a large variety of data analysis and reconstruction tools for synchrotron X-ray imaging.
Another related software syris [12], provides access to basic 3D objects with no control of customization. syris delivers a significant contribution towards realistic physical modeling behind the image formation. Additionally, syris offers simple temporal modeling, i.e. the generation of 3D+time data. Syris has a Python interface and some core parts are written in OpenCL with GPU acceleration.
Here we present the TomoPhantom package which provides a number of complementary features to the existing capabilities of both XDesign and syris. The core modules are written in the C-OpenMP language, and wrappers for Python and MATLAB interfaces are provided. The C-based implementation enables computationally efficient generation of 2D/3D high resolution phantoms with temporal capability and also corresponding projection data. Notably, projection data are calculated following analytical Radon transform derivations applied to elementary functions [13,14]. This approach is different to conventional numerical calculation of projections for the forward X-ray acquisition model using ray-tracing algorithms [15]. Analytical projections are exact and discretized over a different grid which normally used for projection and backprojection steps in reconstruction methods.
TomoPhantom enables a convenient testing environment for novel reconstruction methods, therefore avoiding the ''inverse crime'' issue [16] (data simulation using the same grid). Overall, the use of exact projections and known ground truth is especially beneficial for benchmarking of iterative reconstruction algorithms [17]. In TomoPhantom is distributed with a library of pre-built enumerated models (a list of unique parameters) that one can refer to during benchmarking or testing of numerical algorithms. Some models also include classical phantoms (see Fig. 1) in 2D and 3D representations. With a plethora of reconstruction methods, there is a need of a robust benchmark system and TomoPhantom contributes to the issue.
Another important capability of TomoPhantom is the customizable temporal extension to available models. It is possible to generate 2D+time and 3D+time phantoms with desirable spatial and temporal resolution. This feature is especially useful when one needs to test reconstruction methods employing temporal information. The temporal capability in TomoPhantom is introduced through a special syntax in the library file. This is different from syris implementation, where temporal capability is given as a demonstration.

Software description
Here we provide information on the architecture of TomoPhantom software and discuss its main characteristics.

Software architecture
In Fig. 2 we show a block-diagram of TomoPhantom v.1.1. All core modules are developed in the C-OpenMP language, while the wrappers enable easy access to software from MATLAB and Python environments. We use Cython for Python and the C-MEX interface for MATLAB in order to wrap the C code. To compile the C code one