Tomography Challenge

Here’s a challenge for you: Reconstruct the sinogram below using the the ASTRA Tomography Toolbox that I introduced in the previous article. You’ll have to figure out the exact meaning of a sinogram like this to be able to do that. For more information on tomography, have a look at my series of articles on that subject.

Challenge sinogramChallenge sinogram

Send in your solution (your script and the resulting image) to tom at tomroelandts dot com (sorry for the spam avoidance measure). Your solution can be in MATLAB or Python, but it has to use the ASTRA Toolbox. You can choose any reconstruction algorithm you want. This challenge remains open until the end of March 2014.

I’ll randomly pick a winner from the correct solutions and buy him or her sushi in Antwerp.

[update] The challenge is now closed, and, unfortunately, I have not received any correct solutions… My solution is shown below, together with a Python script that produces it.

Challenge reconstructionChallenge reconstruction

import numpy as np
from scipy import misc
import astra
# Load sinogram.
sinogram = misc.imread('challenge-sinogram.png').astype(float) / 255
# Create geometries and projector.
num_angles, det_count = sinogram.shape
vol_geom = astra.create_vol_geom(det_count, det_count)
angles = np.linspace(0, np.pi, num_angles, endpoint=False)
proj_geom = astra.create_proj_geom('parallel', 1., det_count, angles)
projector_id = astra.create_projector('linear', proj_geom, vol_geom)
# Create sinogram_id and store sinogram.
sinogram_id = astra.data2d.create('-sino', proj_geom, sinogram)
# Create reconstruction.
reconstruction_id = astra.data2d.create('-vol', vol_geom)
cfg = astra.astra_dict('SIRT')
cfg['ReconstructionDataId'] = reconstruction_id
cfg['ProjectionDataId'] = sinogram_id
cfg['ProjectorId'] = projector_id
cfg['option'] = {}
cfg['option']['MinConstraint'] = 0.  # Force solution to be nonnegative.
algorithm_id = astra.algorithm.create(cfg), 100)  # 100 iterations.
reconstruction = astra.data2d.get(reconstruction_id)
misc.imsave('42-reconstruction.png', reconstruction)
# Cleanup.
Submitted by Tom Roelandts on 26 February 2014

Add new comment