summaryrefslogtreecommitdiffstats
path: root/samples/python
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-08-29 14:11:00 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-11-18 17:38:03 +0100
commit78985a7b623ca8596e2acd57d4bf0ab052900e3a (patch)
tree5e4bee74486176215ede3fc28e39420dfca861e1 /samples/python
parent4843e28a6666b9557dc7550a9fc056adee4c21c8 (diff)
downloadastra-78985a7b623ca8596e2acd57d4bf0ab052900e3a.tar.gz
astra-78985a7b623ca8596e2acd57d4bf0ab052900e3a.tar.bz2
astra-78985a7b623ca8596e2acd57d4bf0ab052900e3a.tar.xz
astra-78985a7b623ca8596e2acd57d4bf0ab052900e3a.zip
Use SIRTPlugin, CGLSPlugin in example
Diffstat (limited to 'samples/python')
-rw-r--r--samples/python/s018_plugin.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/samples/python/s018_plugin.py b/samples/python/s018_plugin.py
index 85b5486..f626908 100644
--- a/samples/python/s018_plugin.py
+++ b/samples/python/s018_plugin.py
@@ -124,6 +124,14 @@ if __name__=='__main__':
# We can also use OpTomo to call the plugin
rec_op = W.reconstruct('LANDWEBER-PLUGIN', sinogram, 100, extraOptions={'Relaxation':1.5})
+
+ # ASTRA also comes with built-in plugins:
+ astra.plugin.register(astra.plugins.SIRTPlugin)
+ astra.plugin.register(astra.plugins.CGLSPlugin)
+ rec_sirt = W.reconstruct('SIRT-PLUGIN', sinogram, 100, extraOptions={'Relaxation':1.5})
+ rec_cgls = W.reconstruct('CGLS-PLUGIN', sinogram, 100)
+
+
import pylab as pl
pl.gray()
pl.figure(1)
@@ -132,6 +140,10 @@ if __name__=='__main__':
pl.imshow(rec_rel,vmin=0,vmax=1)
pl.figure(3)
pl.imshow(rec_op,vmin=0,vmax=1)
+ pl.figure(4)
+ pl.imshow(rec_sirt,vmin=0,vmax=1)
+ pl.figure(5)
+ pl.imshow(rec_cgls,vmin=0,vmax=1)
pl.show()
# Clean up.