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/python/s018_plugin.py') 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 From 3cfc4df88a9f70ab6fae8ce0ed955295c5ead9ca Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 28 Nov 2016 15:40:59 +0100 Subject: Update python headers --- samples/python/s018_plugin.py | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'samples/python/s018_plugin.py') diff --git a/samples/python/s018_plugin.py b/samples/python/s018_plugin.py index f626908..dbd9274 100644 --- a/samples/python/s018_plugin.py +++ b/samples/python/s018_plugin.py @@ -1,28 +1,27 @@ -#----------------------------------------------------------------------- -#Copyright 2015 Centrum Wiskunde & Informatica, Amsterdam +# ----------------------------------------------------------------------- +# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp +# 2013-2016, CWI, Amsterdam # -#Author: Daniel M. Pelt -#Contact: D.M.Pelt@cwi.nl -#Website: http://dmpelt.github.io/pyastratoolbox/ +# Contact: astra@uantwerpen.be +# Website: http://www.astra-toolbox.com/ # +# This file is part of the ASTRA Toolbox. # -#This file is part of the Python interface to the -#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox"). # -#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation, either version 3 of the License, or -#(at your option) any later version. +# The ASTRA Toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. +# The ASTRA Toolbox is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -#You should have received a copy of the GNU General Public License -#along with the Python interface to the ASTRA Toolbox. If not, see . +# You should have received a copy of the GNU General Public License +# along with the ASTRA Toolbox. If not, see . # -#----------------------------------------------------------------------- +# ----------------------------------------------------------------------- import astra import numpy as np -- cgit v1.2.3