From 78985a7b623ca8596e2acd57d4bf0ab052900e3a Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 29 Aug 2016 14:11:00 +0200 Subject: Use SIRTPlugin, CGLSPlugin in example --- samples/python/s018_plugin.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'samples') 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. -- cgit v1.2.3