Skip to content

Instantly share code, notes, and snippets.

@mcdlee
Created January 2, 2014 08:39
Show Gist options
  • Save mcdlee/8216467 to your computer and use it in GitHub Desktop.
Save mcdlee/8216467 to your computer and use it in GitHub Desktop.
import dicom
from skimage.transform import iradon, iradon_sart
import pylab
import numpy
ds = dicom.read_file("img.dcm") # read a dicom of pre-reconstructed SPECT
array = ds.pixel_array
recon_3d = numpy.zeros((64,64,64))
for i in range(0,63):
recon_3d[i,:,:] = iradon(numpy.transpose(array[:,i,:]), output_size=64)
for i in range(26,39): #coronary view
pylab.imshow(recon_3d[:,i,:])
pylab.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment