Vous êtes sur la page 1sur 3

BME 525 – Advanced Biomedical Imaging

Spring 2011

Homework 1 – Computed Tomography Image Reconstruction Simulation

Supplemental notes provided by your TA: Bryce Wilkins

Required Steps

1. Make or obtain an image – this will be your “phantom” which you will use (in step 2) to simulate
what a CT scanner would have acquired (i.e. the forward projection). The intensity values at each
pixel in the image should be thought of as attenuation coefficients. You can use a photo, download
a picture from a digital archive (e.g. USC-SIPI Image Database: http://sipi.usc.edu/database/), use
the ‘Modified Shepp-Logan’ phantom in MATLAB, or create an image yourself (JPEG, GIF,
TIFF, etc.) using a graphics program like Microsoft Paint. In any case, simple, asymmetric images
with a range of contrast work best and assist debugging your code. Avoid color images, otherwise
you will need to do additional work converting your image to grayscale.

Final reconstructed image size should be 256x256 or 255x255 pixels.

TIPS:
• Use imread() to read in your image from a file
• Convert your image to type double using im2double()
• Convert your image to grayscale, if needed, with rgb2gray()
• Use imshow(myImage, []) to display your image; imshow() is easier to work with than
image() or imagesc().
• Read MATLAB documentation to understand the functions you use! Many functions have
multiple options which you may or may not require depending on your own circumstances.
• When developing your program write it so that your image size is not “hard coded” or a
“magic number.” Use a variable to define your image size and refer to that variable in your
code.
• To ease debugging, get things working with a small final image size of, say, 64x64 pixels.
When your program is working well, adjust it so that it produces a 256x256 size image as
its final output. This is the size image you should display in class and have in your report.

2. Generate forward projection data (i.e. simulate what a CT scanner would have acquired). You will
need to simulate forward projection at different angles; consider the number of projection angles
and angular step size required.

TIPS:
• We are not simulating “beam hardening” in this homework, thus ray-sums at projection
angles 180° apart will be identical (i.e. not independent “measurements”). This is important
when you consider the range of angular sampling required, and the angular step size.
• It’s easier to rotate the image using imrotate() than to rotate the “x-ray paths”. If you use
imrotate() the function will interpolate the rotated image to the Cartesian image matrix;
different interpolation methods will produce varying results. I suggest you explore
different interpolation methods.
• Provided no part of your phantom lies in the corners of your image you can safely use the
‘crop’ option of imrotate() to ensure your image size remains the same (otherwise your
image will be padded to accommodate the rotated image). You don’t have to use the ‘crop’
option, but if you choose not to you will have additional challenges to work through.

In this step Dr. Singh wants you to use high density ray-sums (4x density of your actual final
image). The reason for this is that an actual attenuation measurement is an average of a beam of x-
rays; not all x-rays travel precisely the same path from the source to detector. To simulate this
averaging that occurs in-practice, we’re going to start with an image (that’s our phantom image)
that is 4x larger than our final desired image. For example, if the desired final image size is
256x256, then your initial phantom should be 1024x1024 pixels. Do not use imresize() to resize a
small phantom image to 4x larger size as this will introduce interpolation artifacts. The phantom
image you start with should be 4x larger than the final image you will reconstruct.

Once you have the projection data, you can average each four projections to a single attenuation
value (this is the “average of a beam of x-rays” mentioned above). So your final projection data
(after the averaging), for a single projection angle, will be a 256x1 vector (in the case where your
desired final image is of 256x256 size).

Make sure you show an example of the projection data in-class and your written report.

3. Generate and show the sinogram.

4. Implement simple back-projection (i.e. reconstruct the original image at the desired final size from
the sinogram (projection data)). Show the resulting image reconstruction.

5. Design an appropriate filter (in the frequency domain) and use it to filter the sinogram. Show the
filter you have used and the filtered sinogram. See “Other Notes” section at the end regarding
MATLAB functions you might find helpful.

6. Use the filtered sinogram to generate a filtered back-projection image. Show the filtered back-
projected image.

7. Quantitatively evaluate your reconstructed image with respect to a 4x down-sampled version of


your original phantom – the images you compare must be the same size. Mention your quantitative
metric, and show results in-class and your written report.

TIPS:
• The quantitative metric can be something like: RMSE (Root Mean Square Error), or a
simple sum of absolute differences between your original and reconstructed images. Make
sure you explain the metric you used.
Optional Steps

8. Simulate the effect of sensor noise on your reconstructed image. You will need to consider at what
stage noise affects the data. The noise level should be sufficient to obtain an SNR of ~10. Repeat
the image reconstruction steps with noisy data and show results. You may wish to implement
different filters and evaluate which filters work best in noisy data. Show the results of using
different filters.
9. Further optional work: Simulate the effect of the following on image reconstruction:
a. incomplete/coarse angular sampling;
b. faulty x-ray detectors;
c. movement of objects (i.e. features in your phantom move slightly between different projection
angles).

Written Submission (~5 pages)

Your written submission should illustrate the results for each of the required steps 1-7 above, plus any
of the optional stages you attempt. Please label your images and briefly describe your solution;
include a flowchart to explain your approach if you wish. Any code you write must be included in
your report. Report to be submitted in class, on the same day as the presentation.

PowerPoint Presentation (5-6 minutes)

Your presentation must include images showing all of the steps above (your phantom, sinogram, filter,
reconstructed images and your quantitative evaluation). Describe and show results of optional stages.

Other Notes

1. I mentioned a lot of MATLAB functions, but you can use any programming language you wish
(even LabView!).
2. You may find the following MATLAB functions useful in the filtering stage: fft, ifft, fftshift,
ifftshift.
3. Other useful MATLAB commands include: who, whos, help, doc
4. You are not permitted to use high-level MATLAB functions such as radon, iradon, imfilter, etc.
in your solution. Your solution must illustrate fundamental understanding of forward- and back-
projection for image reconstruction, and how filtering is achieved in the frequency domain.