title | tags | authors | affiliations | date | bibliography | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Exact sinogram: an analytical approachto the Radon transform of phantoms |
|
|
|
19 May 2020 |
references.bib |
The imaging technique of exposing an object with rays at different
angles is called tomography, and it produces a projection image of the
inaccessible regions of the body. The regions are determined by their
attenuation function, that quantifies how the intensity of radiations
is attenuated, proportionally to the density, due to mass absorption.
The inverse problem of recovering a function from its integral values
along cross sections was first studied by Johann Radon in
1917 [@4307775], implemented by @Cormack to Computerized Tomography (CT)
technologies in the 1960s. The graphic representation of the Radon
transform is commonly referred to as sinogram.
Numerical methods for image reconstruction are tested on the so-called
phantoms, fictitious images that reproduce a body section, as the
Shepp-Logan phantom [@shepplogan]. Using a phantom gives the advantage
to test a reconstruction algorithm on a zero-noise data so the error we
get is only due to numerical inaccuracies in the algorithm
itself [@Feeman; @KaipioSomersalo; @Hansen]. In some special cases, it
is possible to compute analytically the Radon transform of a phantom.
The scope of this work is to compare the use of the discrete Radon
transform, that yields an approximate sinogram, and the correspondent
analytical sinogram for image reconstruction.
We created exact-sinogram
, an open-source python library of Analytical
Radon Transforms for different classes of phantoms, obtained as a
combination of ellipses, squares or rectangles, in order to successively
reconstruct the original image and to analyze the error.
Let
We aim to reconstruct an approximation of the function
In this paper we exploit the analytical Radon transform of two types of figures: the ones that can be described by a single mathematical equation, e.g. ellipses, and the polygons, e.g. squares and rectangles.
We give here a brief description of two examples. More details can be found in [@Feeman].
Every ellipse in the
Now, let
A square in general position in the plane is, instead, defined by five
parameters: coordinates
To generate the sinogram, we imagine the region inside the square as the
intersection of two infinite bands: one vertical and one horizontal.
Then, we compute the points at which the line crosses these bands to
find, among them, the "entry" and "exit" of the line within the
square. The distance between the exit and the entry points will be the
Radon value associated with those
When two planar figures overlap in a phantom, the attenuation coefficient on the overlap will be the sum of the individual attenuation coefficients. The linearity property of the Radon transform will allow us to compute the analytical sinogram of any combination of such figures.
For each phantom, we are going to calculate two reconstructed images, one from the approximated sinogram, computed with the discrete Radon transform, and another from the exact sinogram. To do this, we apply the inverse Radon transform provided by the iradon function of the Python library Scikit-image [@scikitimage]. We would expect a smaller error with the analytical approach.
\centering {width="32%"} {width="57%"}
[[fig:phm_ellipse]]{#fig:phm_ellipse label="fig:phm_ellipse"}
The python library exact-sinogram
is available in Github
(https://github.com/francescat93/Exact_sinogram) or can be installed
via pip. It is written on top of numpy [@van2011numpy],
scipy [@2020SciPy-NMeth], scikit-image [@scikitimage], and matplotlib
for displaying the images.
A phantom is an instance of the class Phantom
, initialized with the
phantom type (`ellipses'
, `squares'
, `rectangles'
) and
a matrix containing the parameters of the planar figures to be
displayed. We also provide a gallery of default phantoms of each type,
accessible by calling the function my_phantomgallery
. The class
Phantom
has two methods: get_phantom
that returns the image of the
phantom, and get_sinogram
generates the analytical Radon transform,
using a different procedure according to the phantom type. The
implementation of the transforms is provided by the Scikit-image library
[@scikitimage].
The following lines of code provide an usage example of the
exact-sinogram
package.
import numpy as np
from skimage.transform import radon, iradon
import exact_sinogram as es
circle = True
phantom_type = 'ellipses'
# phantom_type : 'ellipses' (or 'shepp_logan') , 'modified_shepp_logan', 'squares', 'rectangles'
n_points = 300; # number of pixels
# Creation of an instance of the Phantom Class
Phm = es.Phantom(phantom_type = phantom_type, circle = circle)
# Creation of the matrix-image of the phantom, w/ input the number of pixel:
P = Phm.get_phantom(N = n_points)
# Array of projection angles
theta_vec_deg = np.linspace(0, 359, 360)
# Exact sinogram and inversion (exact_sinogram package)
## Calculate the excact Sinogram
analytical_sinogram = Phm.get_sinogram(N = n_points, theta_vec = np.deg2rad(theta_vec_deg))
## invert the Radon transform on the exact sinogram
P_an = iradon(analytical_sinogram, theta = theta_vec_deg, circle=circle)
# Approximated sinogram and inversion (scikit-image)
## Calculate the approximated sinogram
approx_sinogram = radon(analytical_sinogram, theta = theta_vec_deg, circle=circle)
## invert the Radon transform on the approximated sinogram
P_approx = iradon(approx_sinogram, theta = theta_vec_deg, circle=circle)
For each phantom type, we compute the error between the synthetic data and the reconstructed data obtained by the following procedures:
-
by computing the analytic sinogram and then applying the inverse Radon transform;
-
in the classic way, by using the Radon transform and its inverse.
We are going to evaluate the quality of the reconstructed image by
measuring the classical
\centering Ellipses (Shepp-Logan) Ellipses (Modified Shepp-Logan) Squares Rectangles
: Relative errors of the image reconstructed from the analytical
sinogram
The Gibbs phenomenon [@Jerri_Gibbs] is the concentration of the errors along the discontinuities of the figure. With a mask, we eliminated the influence of boundaries and appreciated our algorithm that gives a smaller relative error (see Table [tab:errors]{reference-type="ref" reference="tab:errors"}) with respect to the reconstruction through the iradon function.