File Exchange

image thumbnail


version (2.53 KB) by Ronald Ouwerkerk
Simulation of raw MRI data from k-space coordinates using the Shepp and Logan head phantom function.


Updated 10 Jun 2002

No License

Raw MRI data are generated analytically from k-space coordinates using the (continuous) Shepp and Logan head phantom function. K -space coordinates are typically entered as 2D matrices (frequency and phase encodes).

This tool is ideal for testing reconstruction of non-linear k-space trajectory MRI data such as projection reconstruction (PR) and spiral PR MRI.

The default k-space trajectory is a simple Carthesian trajectory. The reconstruction of the image in this case is a simple 2D FFT. Running the scripts without arguments results in plots of the raw and reconstructed data for this k-spce sampling path.

Comments and Ratings (15)

Ke Shi

Lauren Hirt

zhao li

hi,do you have codes of Variable density sampling,thank you



Dear Ronald Ouwerkerk,
I have a different images (not MRI image): a simple images bmp 8bits, a line or a point. I want to input this image to your *.m. Please show me the way (full code download). Thanks you so much.^^

Minh Chinh



Julia Woody

I could not run this program, are there anybody who can write a small program which uses this function ? (or can you given example input parameters)


Very nice work. However, there are some issues. The contrast in the image reconstructed from feeding a Cartesian trajectory to mriphantom is different from feeding it a spiral trajectory.

jianfei ge

Thanks! Very good!

Ken Johnson

This nice work has been implemented throughout the MR imaging community, and is visible in many publications. I noticed one small bug. At k = 0 care was taken to avoid a nan by setting it to 1. However this is slightly off, and any cartesian sampling of k-space will result in an image that looks like it has been subtracted by .31. The part under consideration is J1(2pi*a*k)/(a*k).

Using l'Hopital's rule
J1(2pi*a*k)/(a*k) = J1'(2pi*a*k)/a

J1'(x) = J0(x)-J1(x)/x = -J2(x)+J1(x)/x
= [J0(x)-J2(x)]/2

J1(2pi*a*0)/(a*0) = pi

In short change the following line from
bess = ones(size(akphi.*kr));
bess = pi*ones(size(akphi.*kr));

Naoyuki Takei

- -

like the image processing toolbox phantom function?

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux