diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2016-11-18 08:57:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 08:57:46 -0800 |
commit | 6c9756b1d26d1e920b12cdcf8580362690427ddc (patch) | |
tree | 5e4bee74486176215ede3fc28e39420dfca861e1 /samples | |
parent | 1a092b53bddd7e31a3fcf12a13aabd404e91d215 (diff) | |
parent | 78985a7b623ca8596e2acd57d4bf0ab052900e3a (diff) | |
download | astra-6c9756b1d26d1e920b12cdcf8580362690427ddc.tar.gz astra-6c9756b1d26d1e920b12cdcf8580362690427ddc.tar.bz2 astra-6c9756b1d26d1e920b12cdcf8580362690427ddc.tar.xz astra-6c9756b1d26d1e920b12cdcf8580362690427ddc.zip |
Merge pull request #66 from wjp/iter_plugins
Add SIRT, CGLS python plugins
Diffstat (limited to 'samples')
-rw-r--r-- | samples/python/s018_plugin.py | 12 |
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. |