Introduction

X-ray computerized tomography (CT) remains the most popular and the most widespread tomography method used in medicine. The tomographic images are obtained by applying a method of projection acquisition and an appropriate image reconstruction algorithm. The key problem arising in computerized tomography is image reconstruction from projections which are received from an X-ray scanner of a given geometry. There are several well-known reconstruction methods to solve this problem. The most popular reconstruction algorithms are methods using convolution and back-projection [13] and the algebraic reconstruction technique (ART) [47]. Besides those methods, there exist some alternative reconstruction techniques. The most worthy of emphasis seem to be neural network-based algorithms. Neural networks are used in different implementations, for example, in image processing [810], in particular in computerized tomography. Reconstruction algorithms based on supervised neural networks have been presented in various papers, for example [1114]. Other structures representing the so-called algebraic approach to image reconstruction from projections and based on recurrent neural networks have been studied by several authors [1517]. Their approach can be characterized as a unidimensional signal reconstruction problem. In this case, the main disadvantage is the extremely large number of variables arising during calculations. The computational complexity of the reconstruction process is proportional in that approach to the square of the image size.

In this paper, an original approach to the reconstruction problem will be developed, based on original transformation methodology [18, 19]. The most important improvement of our reconstruction method, in comparison to the previous publication, is an adaptation of the discrete Radon transform (DRT) concept (see e.g. [20, 21]) in the fully original way. This methodology provides the so-called “grid-friendly” angles at which the projections are performed. Because this concept limits the number of the performed during investigation projections, we develop our approach and provide a new idea—the modified (extended) “grid-friendly” methodology which lifts that limitation. In this paper, we present a comparison of the equiangular interval sampling procedure with the “grid-friendly” and the modified “grid-friendly” methodologies for specifying the projection angles. We can decrease in this way the artifacts in reconstructed image without any cost: geometry of tomographic scanner do not need to be changed and reconstruction algorithm needs only some small reformulations. It is worth to emphasise, that these reformulations do not cause the algorithm to become more computationally complex.

In our approach, a recurrent neural network [22] is proposed to design the reconstruction algorithm. Owing to the 2D methodology of the image processing in our approach, we significantly decreased the complexity of the tomographic reconstruction problem. The applied recurrent neural network proposed to solve the reconstruction problem is designed in a fully analytical way. We show how all parameters of this network can be obtained, in particular the weights of the network, and what roles these parameters play. The calculations of these weights will be carried out only once before the principal part of the reconstruction process is started. Additionally, because the number of neurons in the network does not depend on the resolution of the projections performed earlier, we can quite freely modulate the number of projections carried out.

The reconstruction method presented in this paper, originally formulated by the author, can consequently be applied to the fan-beam scanner geometry of the tomography device, as is described later in this work.

The paper is organized as follows. The reconstruction method is presented in “Neural network reconstruction algorithm” section. The acquisition of the fan-beam projections (“Parallel beam collection” section), the rebinning procedure (“Back-projection operation” section) and the neural network reconstruction algorithm (“Reconstruction using a recurrent neural network” section) will be depicted in subsequent subsections. “Fan-beam reconstruction algorithm” section describes the performance of the computer simulations and presents the most important results. “Experimental results” section gives some conclusions.

Neural network reconstruction algorithm

The image processing procedure in our reconstruction method resembles one of the transformation algorithms—the ρ-filtered layergram method [2]. In our approach, instead of 2D filtering, we implemented a recurrent neural network. This network performs the function of an “energy pump”, which carries out the reconstruction process from the blurred image obtained after the back-projection operation. The principal idea of the presented reconstruction method using the recurrent neural network is shown in Fig. 1, where the rather theoretical parallel beam geometry of the scanner is taken into consideration.

Fig. 1
figure 1

Neural network image reconstruction algorithm using parallel beams

Parallel beam collection

Only a limited number of parallel projection values \( p^{p} \left( {s,\alpha^{p} } \right) \) are chosen for further processing. Firstly, we determine the values of the angles \( \alpha^{p} \). Let \( \hat{p}^{p} \left( {l,\psi } \right) \) denote discrete values of parallel projections taken at angles indexed by the variable ψ. In our approach, according to the concept of the discrete Radon transform (DRT) [20, 21], we propose only grid “friendly” angles of parallel projections. The motivation for this approach is the better adjustment of the rays in the parallel beam crossing the discrete image to the grid of pixels in this image, if at every angle of projection every ray crosses at least one pixel. In this case, we propose \( \psi_{gf} = - \left( {{\text{I}} - 1} \right)/2, \ldots ,0, \ldots ,\left( {3\left( {{\text{I}} - 1} \right)/2} \right) - 1 \) where \( 2\left( {{\text{I}} - 1} \right) \) is the number of projections. Considering the above condition, the discrete values of parameter α p are as follows:

$$ \alpha_{{\psi_{gf} }}^{p} = \left\{ {\begin{array}{*{20}c} {\arctan \left( {\frac{{2\psi_{gf} }}{{{\text{I}} - 1}}} \right) - \frac{\pi }{2}} \hfill & {\text{for}} \hfill & {\psi_{gf} = - 64, \ldots ,64} \hfill \\ {{\text{arcctan}}\left( {\frac{{ 2\left( {{\text{I}} - 1 - \psi_{gf} } \right)}}{{{\text{I}} - 1}}} \right) - \frac{\pi }{2}} \hfill & {\text{for}} \hfill & {\psi_{gf} = 65, \ldots ,191} \hfill \\ \end{array} } \right. . $$
(1)

The proposed distribution of the projection angles is approximately equiangular in the range of \( \alpha^{p} \in \left[ { - 3\pi /4,\pi /4} \right) \), as is depicted clearly in Fig. 2 for the case of \( {\text{I}} = 129 \).

Fig. 2
figure 2

The choice of “grid-friendly” parallel projection angles

The number of “grid-friendly” projection angles is strictly limited and is equal to 256 for a half rotation around the investigated object and 512 for the full rotation. One can introduce a certain modification of the above approach to avoid this limitation, by multiplying the value 256 (512) by k. We evolve Eq. 1 into the following expanded form

$$ \alpha_{{\psi_{mgf} }}^{p} = \left\{ {\begin{array}{*{20}c} {\arctan \left( {\frac{{2\psi_{mgf} }}{{k \cdot \left( {{\text{I}} - 1} \right)}}} \right) - \frac{\pi }{2}} \hfill & {\text{for}} \hfill & {\psi_{mgf} = - k \cdot 64, \ldots ,k \cdot 64} \hfill \\ {{\text{arcctan}}\left( {\frac{{ 2\left( {{\text{I}} - 1 - \frac{{\psi_{mgf} }}{k}} \right)}}{{{\text{I}} - 1}}} \right) - \frac{\pi }{2}} \hfill & {\text{for}} \hfill & {\psi_{mgf} = k \cdot 64 + 1, \ldots ,k \cdot 192 - 1} \hfill \\ \end{array} } \right.. $$
(2)

Alternatively, as a comparative case, we can choose the equiangular set of parallel projections taken at angles indexed by variable ψ e , where \( \psi_{e} = 0, 1, \ldots, \Uppsi_{e} - 1 \), where Ψ e is the number of projections. In this simplified case, the discrete angles of projections are given by the following relationship

$$ \alpha_{{\psi_{e} }}^{p} = \psi_{e} \Updelta_{\alpha } , $$
(3)

where \( \Updelta_{\alpha } = \pi /\Uppsi_{e} \) is the angle, given in radians, by which the tube-screen pair is rotated after each projection.

The topological differences between both concepts of projection angle determination are depicted in Fig. 3 for the case of a reconstructed image having a resolution 5 × 5 (only the rays lying on the symmetry lines of given projections are depicted).

Fig. 3
figure 3

Topology of “grid-friendly” parallel projection angles (a) and equiangular positioning of the parallel beam scanner (b)

Now we determine a uniform sampling on the screen at points \( l = - \left( {{\text{L}} - 1} \right) / 2, \ldots ,0, \ldots ,\left( {{\text{L}} - 1} \right) / 2 \), where L is an odd number of virtual detectors, from the projection obtained at angle α p ψ . It is easy to calculate the distance between each parallel ray from the origin in the (x,y) space if these detectors are symmetrically placed on the screen. The distance is given by

$$ s\left( {i,j} \right) = l \cdot \Updelta_{s} , $$
(4)

where \( \Updelta_{s} \) is the sample interval of the virtual projections on the screen. Taking into consideration the sample of parameters s and α p of the parallel projections, we can write

$$ \hat{p}^{p} \left( {l,\psi } \right)\, \hat =\, p^{p} \left( {l \cdot \Updelta_{s} ,\alpha_{\psi }^{p} } \right). $$
(5)

In this way, we obtained all the imaginary parallel projections \( \hat{p}^{p} \left( {l,\psi } \right) \) given on the grid \( l = - \left( {{\text{L}} - 1} \right) / 2+ 1, \ldots ,0, \ldots ,\left( {{\text{L}} - 1} \right) / 2 , \) \( \psi_{gf} = - {\text{I}}/2, \ldots ,0, \ldots ,\left( {3{\text{I}}/2} \right) - 1 \) (or alternatively \( \psi_{e} = 0,1, \ldots ,\Uppsi_{e} - 1 \)), which will be used in the following steps of the reconstruction procedure.

Back-projection operation

After the next step of our reconstruction algorithm for parallel beams, namely the back-projection operation [1, 2], we obtain a blurred image which can be expressed by the following formula

$$ \tilde{\mu }\left( {x,y} \right) = \int\limits_{0}^{\pi } {p^{p} \left( {s,\alpha^{p} } \right){\text{ d}}\alpha^{p} } . $$
(6)

Because we have only a limited number of the virtual parallel projection values, it is necessary to apply interpolation. In this case, a projection value mapped to a certain point (x,y) of the reconstructed image is given by the equation

$$ \bar{p}^{p} \left( {s_{xy} ,\alpha^{p} } \right) = \int\limits_{{{ - }\infty }}^{\infty } {p^{p} \left( {s,\alpha^{p} } \right) \cdot I\left( {\dot{s} - s} \right)} {\text{ d}}s, $$
(7)

where \( I\left( {\Updelta s} \right) \) is an interpolation function and \( s_{xy} = x{ \cos }\alpha^{p} + y{ \sin }\alpha^{p} \).

In the presented method, we consider the discrete forms of the images \( \mu \left( {x,y} \right) \) and \( \tilde{\mu }\left( {x,y} \right) \). That means these continuous functions of the images will be substituted by their discrete equivalents \( \hat{\mu }\left( {i,j} \right) \) and \( \hat{\tilde{\mu }}\left( {i,j} \right) \), respectively, where \( i = 1,2,\ldots, {\text{I}} \); \( j = 1,2,\ldots, {\text{J}} \); I and J are the numbers of pixels in the horizontal and vertical directions. Thus, the discrete approximation of Eq. 7 is given by the expression

$$ \hat{\bar{p}}^{p} \left( {i\Updelta_{s}^{p} { \cos }\psi \Updelta_{\alpha }^{p} + j\Updelta_{s}^{p} { \sin }\psi \Updelta_{\alpha }^{p} ,\psi } \right) \cong \Updelta_{s}^{p} \sum\limits_{l} {\hat{p}^{p} \left( {l,\psi } \right) \cdot I\left( {i\Updelta_{s}^{p} { \cos }\psi \Updelta_{\alpha }^{p} + j\Updelta_{s}^{p} { \sin }\psi \Updelta_{\alpha }^{p} - l\Updelta_{s}^{p} } \right)} , $$
(8)

which is convenient from a computational point of view. In (8), \( I\left( {\Updelta s} \right) \) is an interpolation function, \( \Updelta s = i\Updelta_{s} { \cos }\alpha + j\Updelta_{s} { \sin }\alpha - l\Updelta_{s} \). If we use the linear interpolation function [2]

$$ I_{L} \left( {\Updelta_{s}} \right) = \left\{ \begin{array}{ll} \frac{1}{{\Updelta_{s} }} \left( {1 - \frac{{\left| {\Updelta_{s}} \right|}}{{\Updelta_{s} }}} \right) & {\text{for }}\left| {\Updelta_{s}} \right| \le \Updelta_{s} \\ 0 & {\text{for }}\left| {\Updelta_{s}} \right| > \Updelta_{s} \\ \end{array} \right. , $$
(9)

Eq. 8 has only two terms and can be reformulated as [1]

$$ \hat{\bar{p}}^{p} \left( {s_{ij} ,\psi } \right) \cong \hat{p}^{p} \left( {l^{ \downarrow } ,\psi } \right) + \left( {\frac{{s_{ij} }}{{\Updelta_{s}^{p} }} - l^{ \downarrow } } \right)\left( {\hat{p}^{p} \left( {l^{ \uparrow } ,\psi } \right) - \hat{p}^{p} \left( {l^{ \downarrow } ,\psi } \right)} \right), $$
(10)

where \( s_{ij} = i\Updelta_{i} { \cos }\psi \Updelta_{\psi }^{p} + j\Updelta_{j} { \sin }\psi \Updelta_{\psi }^{p} ,\,l^{ \downarrow } \)is the highest integer value less than the value of variable s ij , \( l^{ \uparrow } = l^{ \downarrow } + 1 \).

In practice only a limited number of projections are performed. In particular, if we use “grid-friendly” methodology, at angles \( \alpha_{\psi }^{p} \), where \( \psi = - \left( {{\text{I}} - 1} \right)/2, \ldots ,0, \ldots ,\left( {3\left( {{\text{I}} - 1} \right)/2} \right) - 1 \) (I—size of the processed image), then we can approximate the integration over the angle \( \alpha^{p} \) by a finite sum. In consequence, Eq. 6 takes the following form

$$ \hat{\tilde{\mu }}\left( {i,j} \right) = \sum\limits_{{\psi_{gf} }} {\Updelta_{{\alpha_{{\psi_{gf} }}^{p} }}^{p} \cdot \hat{\bar{p}}^{p} \left( {s_{ij} ,\alpha_{{\psi_{gf} }}^{p} } \right)} , $$
(11)

where \( s_{ij} = i\Updelta_{s}^{p} { \cos }\alpha_{{\psi_{gf} }}^{p} + j\Updelta_{s}^{p} { \sin }\alpha_{{\psi_{gf} }}^{p} \), \( \Updelta_{{\alpha_{{\psi_{gf} }}^{p} }}^{p} = \alpha_{{\psi_{gf} }}^{p} - \alpha_{{\psi_{gf} - 1}}^{p} \). It is a very similar case if we use the modified “grid-friendly” set of projection angles specified by Eq. 2, that is

$$ \hat{\tilde{\mu }}\left( {i,j} \right) = \sum\limits_{{\psi_{mgf} }} {\Updelta_{{\alpha_{{\psi_{mgf} }}^{p} }}^{p} \cdot \hat{\bar{p}}^{p} \left( {s_{ij} ,\alpha_{{\psi_{mgf} }}^{p} } \right)} . $$
(12)

Alternatively, in the case of the equiangular approach, we perform projections at angles \( \alpha_{{\psi_{e} }}^{p} \), where \( \psi_{e} = 0,1, \ldots ,\Uppsi - 1 \) and we can approximate the integration in Eq. 6 over the angle \( \alpha^{p} \) as follows

$$ \hat{\tilde{\mu }}\left( {i,j} \right) = \Updelta_{\alpha }^{p} \sum\limits_{{\psi_{e} = 0}}^{\Uppsi - 1} {\hat{\bar{p}}^{p} \left( {s_{ij} ,\alpha_{{\psi_{e} }}^{p} } \right)} . $$
(13)

The discrete image obtained after the back-projection operation \( \hat{\tilde{\mu }}\left( {i,j} \right) \) includes information about the original image \( \hat{\mu }\left( {i,j} \right) \) blurred by a geometrical term. Our task is to reconstruct the original image from the given form of \( \hat{\tilde{\mu }}\left( {i,j} \right) \) using a recurrent neural network [22]. Before we start the design process of this network, it is necessary to formulate the discrete reconstruction problem, and in particular to calculate the coefficients representing the geometrical term distorting the original image. In our approach, we take into consideration the interpolation function used during the back-projection operation.

Reconstruction using a recurrent neural network

Due to relationships (6), (7) and the definition of the Radon transform it is possible to define the image, obtained after the back-projection operation, in the following way

$$ \tilde{\mu }\left( {x,y} \right) = \int\limits_{0}^{\pi } {\left( {\int\limits_{{{ - }\infty }}^{\infty } {\left( {\int\limits_{ - \infty }^{\infty } {\int\limits_{ - \infty }^{\infty } {\left( {\mu \left( {\ddot{x} ,\ddot{y}} \right) \cdot \delta \left( {\ddot{x}{ \cos }\alpha^{p} + \ddot{y}{ \sin }\alpha^{p} - \dot{s}} \right){\text{ d}}\ddot{x}{\text{d}}\ddot{y}} \right)} } \cdot I\left( {s_{xy} - \dot{s}} \right)} \right)} {\text{ d}}\dot{s}} \right){\text{ d}}\alpha^{p} } .$$
(14)

where \( s_{xy} = x{ \cos }\alpha^{p} + y{ \sin }\alpha^{p} \). After some reformulations of the Eq. 14, approximation of the integrations by a finite sums, we obtain relationship the following relation (see e.g. [18, 19]),

$$ \hat{\tilde{\mu }}\left( {i,j} \right) \cong \sum\limits_{{\ddot{i}}} {\sum\limits_{{\ddot{j}}} {\hat{\mu }\left( {\ddot{i}} ,{\ddot{j}} \right) \cdot h_{{ij\ddot{i}\ddot{j}}} } ,} $$
(15)

where

$$ h_{{ij\ddot{i}\ddot{j}}} \cong \left( {\Updelta_{s} } \right)^{2} \sum\limits_{{\psi_{fg} }}^{{}} {\Updelta_{{\psi_{fg} }}^{p} \cdot \hat{I}\left( {\ddot{i}\Updelta_{s} { \cos }\alpha_{{\psi_{fg} }}^{p} + \ddot{j}\Updelta_{s} { \sin }\alpha_{{\psi_{fg} }}^{p} - i\Updelta_{s} { \cos }\alpha_{{\psi_{fg} }}^{p} - j\Updelta_{s} { \sin }\alpha_{{\psi_{fg} }}^{p} } \right)} . $$
(16)

Since the interpolation function \( \hat{I}\left( {\Updelta s} \right) \) is even, we can write

$$ h_{{\ddot{i}\ddot{j}ij}} = h_{{ij\ddot{i}\ddot{j}}} \cong \left( {\Updelta_{s} } \right)^{2} \sum\limits_{{\psi_{fg} }}^{{}} {\Updelta_{{\psi_{fg} }}^{p} \cdot \hat{I}\left( {\left| {i - \ddot{i}} \right|\Updelta_{s} { \cos }\alpha_{{\psi_{fg} }}^{p} + \left| {j - \ddot{j}} \right|\Updelta_{s} { \sin }\alpha_{{\psi_{fg} }}^{p} } \right)} . $$
(17)

Therefore, we are able to formulate a very convenient relationship between the original image and the image obtained after the back-projection operation, in the form of

$$ \hat{\tilde{\mu }}\left( {i,j} \right) \cong \sum\limits_{{\ddot{i}}} {\sum\limits_{{\ddot{j}}} {\hat{\mu }\left( {\ddot{i} ,\ddot{j}} \right) \cdot h_{\Updelta i,\Updelta j} } } , $$
(18)

where

$$ h_{\Updelta i,\Updelta j} \cong \left( {\Updelta_{s} } \right)^{2} \sum\limits_{{\psi_{fg} }}^{{}} {\Updelta_{{\psi_{fg} }}^{p} \cdot \hat{I}\left( {\left| {\Updelta i} \right| \cdot \Updelta_{s} { \cos }\alpha_{{\psi_{fg} }}^{\text{p}} + \left| {\Updelta j} \right| \cdot \Updelta_{s} { \sin }\alpha_{{\psi_{fg} }}^{\text{p}} } \right)} $$
(19)

for the “grid-friendly” choice of projection angles (see Eq. 1) or

$$ h_{\Updelta i,\Updelta j} \cong \left( {\Updelta_{s} } \right)^{2} \sum\limits_{{\psi_{mfg} }}^{{}} {\Updelta_{{\psi_{mfg} }}^{p} \cdot \hat{I}\left( {\left| {\Updelta i} \right| \cdot \Updelta_{s} { \cos }\alpha_{{\psi_{mfg} }}^{\text{p}} + \left| {\Updelta j} \right| \cdot \Updelta_{s} { \sin }\alpha_{{\psi_{mfg} }}^{\text{p}} } \right)} $$
(20)

for the modified “grid-friendly” projection angles (see Eq. 2).

Alternatively, in the case of the equiangular approach to determining the projection angles, we obtain the following equivalent of Eq. 19

$$ h_{\Updelta i,\Updelta j} \cong \left( {\Updelta_{s} } \right)^{2} \Updelta_{\alpha }^{p} \sum\limits_{{\psi_{e} = 0}}^{\Uppsi - 1} {\hat{I}\left( {\left| {\Updelta i} \right| \cdot \Updelta_{s} { \cos }\alpha_{{\psi_{e} }}^{p} + \left| {\Updelta j} \right| \cdot \Updelta_{s} { \sin }\alpha_{{\psi_{e} }}^{p} } \right)} . $$
(21)

As one can see from Eq. 18, the original image of a given cross-section of the object, obtained in the way described above, is equal to the amalgamation of this image with a geometrical distortion element expressed by formulas (19), (20) or (21). The number of \( h_{\Updelta i,\Updelta j} \) coefficients is greatly reduced and the values of these coefficients are easily calculated. The h Δij coefficients are used to determine the weights in the recurrent neural network.

The recursive neural network structure for 1D signal reconstruction was proposed for the first time in [23] and later in [15, 24]. The network realizes the image reconstruction from projections by the deconvolution of relationship (22). The problem of deconvolution can be reformulated to the following optimisation problem, basing on the maximum likelihood (ML) methodology:

$$ \hat{\mu }^{ * } = \arg \mathop { \min }\limits_{\mu } \left( {\sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}} {f\left( {e_{ij} \left( {\hat{\mu }} \right)} \right)} } } \right), $$
(22)

where \( \hat{\mu }^{ * } \)—the optimal image (reconstructed image), \( \hat{\mu } = \left[ {\hat{\mu }\left( {i,j} \right)} \right] \)—the matrix with elements from image being reconstructed, \( f\left( \bullet \right) \)—the activation function, and

$$ e_{ij} \left( {\hat{\mu }} \right) = \sum\limits_{{\ddot{i} = 1}}^{\text{I}} {\sum\limits_{{\ddot{j} = 1}}^{\text{J}} {h_{\Updelta i,\Updelta j} \hat{\mu }\left( {\ddot{i}},{\ddot{j}} \right) - \hat{\tilde{\mu }}\left( {i,j} \right)} } . $$
(23)

If the value of the coefficient v tends to infinity or is suitably large, then the solution of the optimisation problem (22) tends to the optimal one. Our research has shown that the following activation function yields the always stable reconstruction process (other possible forms of this function are presented in [24]):

$$ f\left( {e_{ij} } \right) = \nu \cdot \lambda \cdot {\text{lncosh}}\left( {\frac{{e_{ij} }}{\lambda }} \right),\,\lambda > 0 $$
(24)

where λ is a slope coefficient, v is a suitable large positive acceleration coefficient.

In our experiments we have never observed any divergent iterative reconstruction process using activation function (24) (at suitably chosen in experimental way parameters v and λ). That means the iterative realisation of the neural reconstruction algorithm is robust even if we change the reconstructed image. The main motivation to use this form of activation function was a property of its derivation used in reconstruction process. This derivation takes the following form:

$$ f^{\prime}\left( {e_{ij} } \right) = \frac{{\partial f\left( {e_{ij} } \right)}}{{\partial e_{ij} }} = \nu \cdot { \tanh }\left( {\frac{{e_{ij} }}{\lambda }} \right) = \nu \cdot \frac{{1 - \exp \left( { - 2e_{ij} /\lambda } \right)}}{{1 + \exp \left( { - 2e_{ij} /\lambda } \right)}}. $$
(25)

Thanks to the saturation effect of the function (25) outside the range e ij  \(\in({-\lambda ,\lambda })\), it is possible to avoid instabilities in the reconstruction process when there is a drastic increase in the value of any of the variables used in the calculations.

Now we will formulate the energy function which will be minimized by the constructed neural network. Simultaneously, we will realise the task of deconvolution (see Eq. 18). The energy function is given by

$$ E^{t} = \sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}} {f\left( {e_{ij} \left( {\mu^{t} } \right)} \right)} } . $$
(26)

In order to find the minimum of function (26) we determine the derivative

$$ \frac{{{\text{d}}E^{t} }}{{{\text{d}}t}} = \sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}} {\sum\limits_{{\ddot{i} = 1}}^{\text{I}} {\sum\limits_{{\ddot{j} = 1}}^{\text{J}} {\frac{{\partial f\left( {e_{ij} \left( {\mu^{t} } \right)} \right)}}{{\partial e_{ij} \left( {\mu^{t} } \right)}}} } } \frac{{\partial e_{ij} \left( {\mu^{t} } \right)}}{{\partial \hat{\mu }^{t} \left( {\ddot{i},\ddot{j}} \right)}}\frac{{\partial \hat{\mu }^{t} \left( {\ddot{i},\ddot{j}} \right)}}{{{\text{d}}t}}} , $$
(27)

If we let (see [18, 19])

$$ \frac{{{\text{d}}\hat{\mu }^{t} \left( {\ddot{i},\ddot{j}} \right)}}{{{\text{d}}t}} = - \sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}} {\frac{{\partial f\left( {e_{ij} \left( {\mu^{t} } \right)} \right)}}{{\partial e_{ij} \left( {\mu^{t} } \right)}}\frac{{\partial e_{ij} \left( {\mu^{t} } \right)}}{{\partial \hat{\mu }^{t} \left( {\ddot{i},\ddot{j}} \right)}}} } = - \sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}} {f^{\prime}\left( {e_{ij} \left( {\mu^{t} } \right)} \right) \cdot h_{\Updelta i,\Updelta j} } } $$
(28)

then Eq. 27 takes the form of

$$ \frac{{{\text{d}}E^{t} }}{{{\text{d}}t}} = - \sum\limits_{{\ddot{i} = 1}}^{\text{I}} {\sum\limits_{{\ddot{j} = 1}}^{\text{J}} {\left( {\frac{{{\text{d}}\hat{\mu }^{t} \left( {\ddot{i},\ddot{j}} \right)}}{{{\text{d}}t}}} \right)^{2} } } . $$
(29)

One can see that the values of Eq. 29 are always less than or equal to zero, that is \( \frac{{{\text{d}}E^{t} }}{{{\text{d}}t}} \le 0 \). Therefore, if \( \frac{{{\text{d}}E^{t} }}{{{\text{d}}t}} = 0 \) then it means that \( \frac{{{\text{d}}\hat{\mu }^{t} \left( {i,j} \right)}}{{{\text{d}}t}} = 0 \) and the minimum of E is obtained. Our calculation tends to this state and when \( \frac{{{\text{d}}\hat{\mu }^{t} \left( {i,j} \right)}}{{{\text{d}}t}} \cong 0 \) we can stop the reconstruction process.

The neural network performing the minimization task consists of two layers with the same topology of neurons. The structure is shown in Fig. 4.

Fig. 4
figure 4

Structure of the recurrent neural network: a topology of the neurons in the net; b scheme of connections in the net

Fan-beam reconstruction algorithm

The principal idea of the presented reconstruction method using the recurrent neural network is shown in Fig. 5, where the target fan-beam geometry of the collected projections is taken into consideration.

Fig. 5
figure 5

Neural network image reconstruction algorithm using fan-beams

The first step in the reconstruction procedure described is the collection of all the fan-beam projections using a scanner, as depicted in Fig. 6.

Fig. 6
figure 6

Fan-beam geometry of the scanner

A given ray from a fan-beam is involved in obtaining a particular projection value \( p^{f} \left( {\beta ,\alpha^{f} } \right) \), where the projection value is obtained at angle \( \alpha^{f} \) and β is the angle of divergence of the ray from the symmetry-line of the fan-beam. In real scanners, only samples \( p^{f} \left( {\beta_{\eta } ,\alpha_{\gamma }^{f} } \right) \) of the projections are measured, where usually \( \beta_{\eta } = \eta \cdot \Updelta_{\beta } \) are equiangular rays, \( \eta = - \left( {{\rm H} - 1} \right)/ 2,\ldots ,0,\ldots ,\left( {{\rm H} - 1} \right)/ 2 \)are indexes of these rays, α f γ  = γ · Δ f α are particular angles of the X-ray source at which the projections are obtained, \( {\text{and}}\gamma = 0, 1, \ldots,\Upgamma - 1 \) are the indexes of these angles. For simplicity, we can define the discrete values of the projections as \( \hat{p}^{f} \left( {\eta ,\gamma } \right) = p^{f} \left( {\eta \cdot \Updelta_{\beta } ,\gamma \cdot \Updelta_{\alpha }^{f} } \right) \).

In the next step of our reconstruction algorithm, we perform the rebinning operation, which re-sorts the fan-beam projection values \( \hat{p}^{f} \left( {\eta ,\gamma } \right) \) obtained in the previous step into equivalent parallel projection data [1]. Referring to Fig. 7, we can find the relationships between the parameters in both of the scanner geometries considered, as

$$ p^{p} \left( {s,\alpha^{p} } \right) = p^{f} \left( {\beta ,\alpha^{f} } \right) = p^{f} \left( {{\text{arc sin}}\left( {\frac{s}{{{\text{R}}_{\text{f}} }}} \right),\alpha^{p} - {\text{arc sin}}\left( {\frac{s}{{{\text{R}}_{\text{f}} }}} \right)} \right). $$
(30)
Fig. 7
figure 7

Geometric relationship between parallel and fan X-ray beams

After defining the parameters of the virtual parallel projections (see Eqs. 1, 4) we can start the rebinning operation. Unfortunately, in a lot of cases there is a lack of equivalences for parallel rays in the set of fan-beam projections. As a remedy we use an interpolation, in the simplest way—bilinear interpolation. In this case an estimation of the parallel projection \( \hat{p}^{p} \left( {l,\psi } \right) \) can begin by identifying the neighbourhood of the fan-beam projection given by

$$ p^{f} \left( {{\text{arc sin}}\left( {\frac{{l \cdot \Updelta_{s} }}{{{\text{R}}_{\text{f}} }}} \right),\alpha_{{\psi_{gf} }}^{p} - {\text{arc sin}}\left( {\frac{{l \cdot \Updelta_{s} }}{{{\text{R}}_{\text{f}} }}} \right)} \right) = \hat{p}^{p} \left( {l,\psi_{gf} } \right). $$
(31)

The neighbourhood is determined based on four real measures from a whole set of fan-beam projections: \( \hat{p}^{f} \left( {\eta^{ \uparrow } ,\gamma^{ \uparrow } } \right)\,\hat{p}^{f} \left( {\eta^{ \uparrow } ,\gamma^{ \downarrow } } \right),\,\hat{p}^{f} \left( {\eta^{ \downarrow } ,\gamma^{ \uparrow } } \right),\,\hat{p}^{f} \left( {\eta^{ \downarrow } ,\gamma^{ \downarrow } } \right), \)where \( \eta^{ \downarrow } \) is the highest integer value less than

$$ \eta^{p} = \frac{\beta }{{\Updelta_{\beta } }} = \frac{{{\text{arc sin}}\left( {\frac{{l \cdot \Updelta_{s} }}{{{\text{R}}_{\text{f}} }}} \right)}}{{\Updelta_{\beta } }},$$
(32)

\( \eta^{ \uparrow } = \eta^{ \downarrow } + 1,\,\gamma^{ \downarrow } \) is the highest integer value less than

$$ \gamma^{p} = \frac{{\alpha^{f} }}{{\Updelta_{\alpha }^{f} }} = \frac{{\alpha_{{\psi_{gf} }}^{p} - {\text{arc sin}}\left( {\frac{{l \cdot \Updelta_{s} }}{{{\text{R}}_{\text{f}} }}} \right)}}{{\Updelta_{\alpha }^{f} }}, $$
(33)

γ  = γ  + 1. In order to calculate a linear interpolated value \( \hat{p}^{p} \left( {l,\psi_{gf} } \right) \) the following expression is used

$$ \hat{p}^{p} \left( {l,\psi_{gf} } \right) = \left( {\gamma^{ \uparrow } - \gamma^{p} } \right) \, \left[ {\left( {\eta^{ \uparrow } - \eta^{p} } \right)\hat{p}^{f} \left( {\eta^{ \downarrow } ,\gamma^{ \downarrow } } \right) + \left( {\eta^{p} - \eta^{ \downarrow } } \right)\hat{p}^{f} \left( {\eta^{ \uparrow } ,\gamma^{ \downarrow } } \right)} \right]^{{}} + \left( {\gamma^{p} - \gamma^{ \downarrow } } \right) \, \left[ {\left( {\eta^{ \uparrow } - \eta^{p} } \right)\hat{p}^{f} \left( {\eta^{ \downarrow } ,\gamma^{ \uparrow } } \right) + \left( {\eta^{p} - \eta^{ \downarrow } } \right)\hat{p}^{f} \left( {\eta^{ \uparrow } ,\gamma^{ \uparrow } } \right)} \right] $$
(34)

Having all the required parallel projection values, we can then perform the reconstruction procedure for parallel beams. In our case, this is a method using a recurrent neural network, as was explained in “Neural network reconstruction algorithm” section.

Experimental results

It is very useful, for various reasons, to simulate projection data. Idealized projection measurements obtained in this way allow us to develop and evaluate the reconstruction algorithms we have designed. One of the most widespread of this kind of simulation method is the use of a head phantom model, the so-called Shepp–Logan mathematical phantom [6, 1]. In our experiments, we used the Shepp–Logan model extended in an original way to 3D space, similar to the approach presented in [25]. Our 3D phantom consists of ellipsoids, whose parameters are described in Table 1.

Table 1 Parameters of the ellipsoids used to construct our mathematical phantom

A view of the mathematical model of a skull phantom is depicted in Fig. 7—the size of the processed image was fixed at \( {\text{I}} \times {\text{J}} = 129 \times 129 \) pixels. Such a resolution of the image seems to be a good choice, taking into account the balance between the reconstructed image quality and the real time of calculation during the computer simulations.

Figure 8b, c show two cross-sections of the 3D mathematical phantom. These images will be used in our experiments to evaluate the designed neural reconstruction algorithm both for parallel projections and for fan-beam projections.

Fig. 8
figure 8

Mathematical model of the phantom given in Table 1: a a view in the xz plane; b cross-section in the plane A; c cross-section in the plane B

It is quite easy to reformulate the above model for fan-beam projections using the following relationship

$$ p^{f} \left( {\beta ,\alpha^{f} } \right) = p^{p} \left( {s,\alpha^{p} } \right) = p^{p} \left( {{\text{R}}_{\text{f}} { \sin }\beta ,\alpha^{f} + \beta } \right). $$
(35)

During the simulations, we established 170 measurement points (detectors) on the screen as virtual parallel projections. We chose the number of these projections to be 512 rotation angles because this number is suitable for the approach with “grid-friendly” projection angles. In other experiments, the number of projections was modified.

Before we start the reconstruction process, it is necessary to evaluate the coefficients \( h_{\Updelta i,\Updelta j} \). This is only done once, for all the possible further processing approaches: with equiangular rotation, with only “grid-friendly” projection angles and the expanded “grid-friendly” technique. Using the linear interpolation functions from Eqs. 19, 20 and 21, the values of these coefficients are presented in Fig. 9. Because of the very fine differences between the three approaches analysed, we only present one chart showing a general view of the coefficients h Δij and an enlargement showing details of the chart around the origin. In the cases of the equiangular sample and the modified approach with “grid-friendly” methodology, we used 7200 projection angles to calculate the coefficients h Δij and in the case of the “grid-friendly” approach only 512 angles. A more in-depth discussion of the number of necessary projections performed during calculation of the coefficients h Δij is presented below.

Fig. 9
figure 9

Values of coefficients \( h_{\Updelta i,\Updelta j} \): a the general view; b values around origin, where Δj = 0

Having obtained the coefficients h Δij , we can start the next step of the reconstruction procedure and perform the back-projection operation using relationships (11), (12) or (13) to get a blurred image of the X-ray attenuation coefficient distribution in a given cross-section of the investigated object (see Fig. 10). (We must use the same interpolation function as in the calculation of the coefficients h Δij , for example, the linear interpolation given by Eq. 9).

Fig. 10
figure 10

Distorted image of the mathematical model obtained after the back-projection operation

The image obtained in this way was next subjected to a process of reconstruction using a neural network, whose structure was explained in the previous section. To do this we adopted the discrete Eq. 23 taking into consideration the time-varying values of the pixels in the reconstructed image. Thus

$$ e_{ij} \left( {\mu^{t} } \right): = \sum\limits_{{\ddot{i} = 1}}^{\text{I}} {\sum\limits_{{\ddot{j} = 1}}^{\text{J}} {\left( {h_{\Updelta i,\Updelta j} \cdot \hat{\mu }^{t} \left( {\ddot{i}}, {\ddot{j}} \right)} \right) - \hat{\tilde{\mu }}\left( {i,j} \right)} } . $$
(36)

Euler’s method was used to approximate linear Eq. 27 in the following form [17]

$$ \hat{\mu }^{t + 1} \left( {i,j} \right): = \hat{\mu }^{t} \left( {i,j} \right) + \Updelta_{t} \left( { - \sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}} {f^{\prime}\left( {e_{ij} \left( {\mu^{t} } \right)} \right) \cdot h_{\Updelta i,\Updelta j} } } } \right), $$
(37)

where \( \Updelta_{t} \) is an appropriate small time step.

It is very subjective to evaluate a reconstruction procedure based only on a view of the reconstructed image. That is why the quality of the reconstructed image has been evaluated by an error measure defined as follows

$$ MSE = \frac{1}{{{\text{I}} \cdot {\text{J}}}}\sum\limits_{i = 1}^{\text{I}} {\sum\limits_{j = 1}^{\text{J}}} {\left[ {\mu \left( {i,j} \right) - \hat{\mu }\left( {i,j} \right)} \right]} ^{2} , $$
(38)

where \( \mu \left( {i,j} \right) \) is the original image of the Shepp–Logan mathematical phantom.

Additionally, during the experiments, we used the following error measure [17], which is more relevant to subjective observation of reconstructed image

$$ Error = \sqrt {\frac{{\sum\limits_{i = 1}^{I} {\sum\limits_{j = 1}^{J} {\left( {\mu^{w} \left( {i,j} \right) - \hat{\mu }^{w} \left( {i,j} \right)} \right)^{2} } } }}{{\sum\limits_{i = 1}^{I} {\sum\limits_{j = 1}^{J} {\left( {\mu^{w} \left( {i,j} \right) - \mu_{mean}^{w} \left( {i,j} \right)} \right)^{2} } } }}} , $$
(39)

where \( \mu^{w} \left( {i,j} \right),\,\hat{\mu }^{w} \left( {i,j} \right) \) and \( \mu_{mean}^{w} \left( {i,j} \right) \) are the original image of the mathematical phantom, the reconstructed image and the mean value of the original image, respectively. All images are transformed by the so-called window determined by parameters C (centre) and W (width):

$$ \mu^{w} \left( {i,j} \right) = \left\{ {\begin{array}{lll} 0 & {\text{for}} & {\mu \left( {i,j} \right) \le C - \frac{W}{2}} \\ {255} & {\text{for}} & {\mu \left( {i,j} \right) \ge C + \frac{W}{2}} \\ {\left( {\left( {\mu \left( {i,j} \right) - C + \frac{W}{2}} \right) \cdot \frac{255}{W}} \right){\text{ div }}1} & {\text{for}} & {C - \frac{W}{2} \le \mu \left( {i,j} \right) \le C + \frac{W}{2}} \\ \end{array} } \right.. $$
(40)

The measure described by Eq. 39 allows us to evaluate the subjective impression of an observer viewing the reconstructed image on a real screen.

As was mentioned earlier, we evaluate the coefficients h Δij in the first step of the reconstruction procedure. It is crucial to choose the minimum number of projections necessary to calculate these parameters objectively. In this experiment, we use the most intuitive approach with equiangular projections and the extended “grid-friendly” methodology, in both cases fixing the number of projections during the initial acquisition process starting the actual reconstruction algorithm at 256 (the “grid-friendly” methodology is a special case with 512 projection angles). In the experiment, the value of coefficient v was selected at v = 2.5 × 1010, and the slope coefficient at \( \lambda = 10^{10} \). The objective results of these investigations are depicted in Fig. 11 and views of the reconstructed images of the mathematical phantom in the cross-section in plane A after 30,000 iterations are presented in Fig. 12.

Fig. 11
figure 11figure 11

Results of the reconstruction process, dependent on the number of projections during the calculation of the \( h_{\Updelta i,\Updelta j} \) coefficients, evaluated by: a the MSE measure (see Eq. 38); b the Error measure (see Eq. 39)

Fig. 12
figure 12

View of the reconstructed image, dependent on the number of projections during the calculation of the \( h_{\Updelta i,\Updelta j} N \) coefficients (window: C = 1.0, W = 0.1—see Eq. 40)

Based on the plots in Fig. 11 and the views in Fig. 12, we can say that using the “grid-friendly” and the extended “grid-friendly” methodologies of projection performance, we obtain a reconstructed image more quickly and with better quality.

In the next step of our investigations, we carried out some experiments incorporating the fan-beam reconstruction method described in “Parallel beam collection” section. At this stage, we used the neural network reconstruction algorithm for parallel projections as depicted in Fig. 5 with the extended “grid-friendly” method of calculating the h Δij coefficients (the number of projections was fixed at 7200). Projection acquisition for the fan-beam reconstruction algorithm can be performed at angles (exactly 512 measurement samples) specified by pure “grid-friendly” methodology without any loss of reconstruction image quality. However, for the extended “grid-friendly” approach, the experiments were carried out with different numbers of performed projections. Results of these simulations are shown in Fig. 13 for cross-sections in planes A and B after 100,000 iterations of the neural network algorithm. For comparison, the standard convolution/back-projection method with rebinning and the Shepp–Logan kernel is also considered. In all cases, we used the following geometrical parameters of the fan-beam scanner: \( \Uppsi = \Upgamma ,\,{\text{R}}_{\text{f}} = 110,\,\Updelta_{\alpha }^{f} = \Updelta_{\alpha }^{p} ,\,\Updelta_{\beta }^{f} = \arcsin \left( {\Updelta_{s} /{\text{R}}_{\text{f}} } \right) \), where \( \Updelta_{s} = 1 \).

Fig. 13
figure 13

View of the images (window: C = 1.02, W = 0.11): a original image; b reconstructed image using the algorithm described in this paper, after 100 000 iterations; c reconstructed image using the standard convolution/back-projection method with rebinning and the Shepp–Logan kernel

Conclusions

In this paper, we propose an original neural network image reconstruction from a projection algorithm based on the “grid-friendly” methodology of projection acquisition. Our experiments showed objectively that the “grid-friendly” method of specifying the projection angles gave better results than the more intuitive equiangular scheme of projection angle sampling, for parallel beam scanner geometry. This phenomenon may follow from the fact that the parallel rays used for projection acquisition in the “grid-friendly” approach are closer to the pixels in the reconstructed image, which is assumed to be a discrete function in our method (see the discrete reconstruction problem formulation considered in “Reconstruction using a recurrent neural network” section, Eq. 22).

Based on the results obtained for parallel beams, we extended the above conclusion to the problem of reconstruction from fan-beam projections, using in these further simulations only the “grid-friendly” methodology both for the calculation of the h Δij coefficients and in the projection acquisition used for the actual reconstruction process. The simulations showed the superb quality of the reconstructed image of the cross-section of the investigated mathematical model, with respect to quality measures (38) and (39), when compared to the standard reconstruction method, in the case of fan-beam scanner geometry. Therefore, we are entitled to state that our method outperforms algorithms used recently in commercial CT scanners and it can be in easy way extended to helical geometry of scanner. The simulations also show that sequential realization of the proposed reconstruction algorithm is very time consuming. On the other hand, parallel hardware implementation of our neural network structure, for example, by effective implementation of VLSI or nanotechnologies, e.g. core–shell systems, could give incomparably better results than the previous methods of image reconstruction from projections, as far as the time to process the reconstruction is concerned. In this case, the time complexity of our neural algorithm is proportional to the number of iterations this algorithm performs (for a parallel geometry of scanner). For comparison, in the case of the standard convolution/back-projection method, the computational time depends on 2I2Ψ additions and multiplications, where I is a dimension of the processed image and Ψ is the number of projections. The rebinning operation and back-projection (interpolation) are identical in both cases.