vendredi 27 juillet 2012

GPU calculation : step 4

After multiple problems regarding the use of Skynet and  the installation of Jacket on it, I finally run my benchmark code. This bar chart sums up the results.

Fig .6 : Calculation time on CPUs and GPU
The horizontal axis legend indicates the size of the final image then the number of projections.

The benchmarks were run on Skynet's GPU and on two different CPUs. The speed-up factors are plotted in this graph.

Fig .5 : Speed-up factor GPU/CPU on two differents CPUs

lundi 23 juillet 2012

GPU calculation : step 3

For running the benchmarks, I will use the Jacket plugin for Matlab. Jacket is a Matlab add-on which provide easy-to-use GPU enabled functions.

After running the tests, the results are not those expected, the GPU calculation is slower than the CPU calculation. After discussion with the Jacket customer support, it appears that our GPU (an nVidia Quadro 2000D) is not powerful enough.

Hopefully the University of Oxford just allows me to use one of their supercomputers. This computer called 'Skynet' is equipped with 4 nVidia Tesla C2020 GPUs.

Fig. 5 : Emerald, Oxford's new supercomputer


jeudi 19 juillet 2012

GPU calculation : step 2

GPU calculation becomes interesting when you have to run the same calculation a large number of times. Our aim is to split the iradon transform of one sinogram in many identical tasks.
If we manage to do that, we will be able to run these task in parallel on the GPU and, we hope, gain calculation time.

In one sinogram, each row corresponds to a given angle in the imaging plane. We will create a sinogram of a phantom for 18 projections angles and compute a reconstructed image using the inverse radon transform.

Fig .2 : Original phantom (left), reconstructed image (right)

Now we will try to do the same, but we will perform one inverse radon transform per projection angle.
Here are the results we get :

Fig .3 : Reconstructed images for different theta values
And after calculating a sum of the images :

Fig .4 : Sum of the images from Fig3
The next step will be to run in parallel the reconstruction for different theta values and see if this as an impact on our calculation time.

mercredi 18 juillet 2012

GPU calculation : step 1

Computing an image from a sinogram takes us an average of 25s per image. The CPU we use is an IntelCore i7-3960X and our images are 2500x2500.

Fig .1 : Intel Core i7-3960X, state of the art CPU

The bottleneck of our code is the inverse Radon transform. We would like to create a version of this function running on the GPU in order to parallelize the calculation.

Here are two interesting publications dealing with the subject :


jeudi 12 juillet 2012

Metal artifact : final step

The last time, we had created a clean sinogram. We will use an inverse radon transform to reconstruct the image from the sinogram.

Fig .7 : Corrected image, without metal replacing (left), with metal replacing (right)

Here we can see that the metal artifact is gone, the image is ready to be analyzed. We have the choice to replace or not the metallic part after removing the artifact.

One thing to do would be to find a way to segment the metallic part without using a threshold. The threshold has to be determined by the user for each image and some datasets contains more than 500 images.
The method we're currently using with quite good results is the mean-shift segmentation.

Finally, a photo of a real case, here the artifacts were messing with the Digital Image Correlation:

Fig .8 : CT scan of an Mg alloy, before correction (left), after correction (right)

It 's the end of a long series of posts, I hope you enjoyed it.

mercredi 11 juillet 2012

Metal artifact : step 4

Now we have separated the metallic part sinogram, we will suppress it from the original sinogram by just replacing the values corresponding to the metal by NaNs (Not a Number value).
The the missing datas (NaN) will be interpolated using a simple linear interpolation algorithm.

Fig .6 : (a) : original sinogram, (b) : metal sinogram, (c) : metal sinogram removed, (d) : interpolated sinogam


mardi 10 juillet 2012

Metal artifacts : step 3

To begin, we will try to segment the metallic object using a simple threshold value. ImageJ is good for that.


Fig .4 : Threshold choice with ImageJ
Here we can see that all the pixels above the value of 119 belongs to the metallic part. We will know create an image containing only the metallic part and calculate its sinogram.

Fig .5 : Metallic part (left), Sinogram of the metallic part (right)

Now we have separated the metallic part sinogram, it will be easy to remove it from the global sinogram.

lundi 9 juillet 2012

Metal artifacts : step 2

Firstly we will try to see what in the sinogram cause the metal artifacts. For this purpose, we will use a code to generate fake metal artifacts in a head phantom image. This code is the propery of Titipong Kaewlek and is available here.


Fig. 2 :  Original phantom image (left), With created artifacts (right)

We will know compare the two sinograms of these images. The sinograms are obtained from the Radon transform of the images. Each row in the sinogram correspond to a given angle in the imaging plane.

Fig .3 : Phantom with one artifact + sinogram (left), Original phantom + sinogram (right)
We know clearly see how the metal artifact appears in the sinogram. We know have to find a way to remove it.



dimanche 8 juillet 2012

Metal artifacts : step 1

When performing CT scans on samples containing high density precipitates, we can observe metal artifacts. 

These artifacts interfere with the digital correlation image analysis.


Fig.1 : bilateral hip replacement metal artifact  

My first task will be to write a code in order to reduce the artifacts.
I have started my work by reading those interesting publications :
  • Metal Artifact Reduction
  • GE WANG, SNYDER, D.L. Iterative deblurring for CT metal artifact reduction. ieee transactions on medical imaging, Oct 1996, vol. 15, n°5, p. 657-664

Project overview

The project I'm working on is the study of Three-Dimensional Fracture Mechanics. This project is conducted by Prof James Marrow.

Usually, the fracture resistance of engineering materials is measured using standard two-dimensional test specimens. But real cracks and engineering components are three-dimensional, so approximations and adjustments are needed to reliably assess their structural integrity.

Over-conservatism, to safely account for the uncertainties in these adjustments, can have significant economic consequences.

Digital correlation image analysis, combined with new X-ray tomography techniques, allows precise, in-situ, measurement of the material displacements inside solid samples. In an optimisation approach that combines these novel observations with finite element modelling of deformation and damage, we will investigate the propagation of three-dimensional cracks in a range of engineering and model materials.

The aim of the project is to validate the current design rules for complex crack shapes and their interactions with three-dimensional stress gradients.

My work in this project will be to help developing tools for three-dimensional studies of materials for energy.

Hi all and welcome to my blog.


I decided to start this blog to share my work during my internship here a the Oxford University, Department of Materials.
Good Reading everybody!