From 9a4372d61fc3c2c0661d479ffe4a13193c7f8862 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 19 Oct 2016 12:37:35 +0200 Subject: Fix Python create_projector docstring --- python/astra/creators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/astra/creators.py') diff --git a/python/astra/creators.py b/python/astra/creators.py index 18504ea..7009884 100644 --- a/python/astra/creators.py +++ b/python/astra/creators.py @@ -535,7 +535,7 @@ def create_reconstruction(rec_type, proj_id, sinogram, iterations=1, use_mask='n def create_projector(proj_type, proj_geom, vol_geom): - """Create a 2D projector. + """Create a 2D or 3D projector. :param proj_type: Projector type, such as ``'line'``, ``'linear'``, ... :type proj_type: :class:`string` -- 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 --- python/astra/creators.py | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'python/astra/creators.py') diff --git a/python/astra/creators.py b/python/astra/creators.py index 7009884..f45fd52 100644 --- a/python/astra/creators.py +++ b/python/astra/creators.py @@ -1,28 +1,27 @@ -#----------------------------------------------------------------------- -#Copyright 2013 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 six import numpy as np -- cgit v1.2.3 From 4c665b0d5af3841f20501a5dc01a23e671367856 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 8 Feb 2017 14:21:18 +0100 Subject: Remove tabs from python code --- python/astra/creators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/astra/creators.py') diff --git a/python/astra/creators.py b/python/astra/creators.py index f45fd52..aa16221 100644 --- a/python/astra/creators.py +++ b/python/astra/creators.py @@ -258,7 +258,7 @@ This method can be called in a number of ways: elif intype == 'cone': if len(args) < 7: raise Exception('not enough variables: astra_create_proj_geom(cone, detector_spacing_x, detector_spacing_y, det_row_count, det_col_count, angles, source_origin, origin_det)') - return {'type': 'cone','DetectorSpacingX':args[0], 'DetectorSpacingY':args[1], 'DetectorRowCount':args[2],'DetectorColCount':args[3],'ProjectionAngles':args[4],'DistanceOriginSource': args[5],'DistanceOriginDetector':args[6]} + return {'type': 'cone','DetectorSpacingX':args[0], 'DetectorSpacingY':args[1], 'DetectorRowCount':args[2],'DetectorColCount':args[3],'ProjectionAngles':args[4],'DistanceOriginSource': args[5],'DistanceOriginDetector':args[6]} elif intype == 'cone_vec': if len(args) < 3: raise Exception('not enough variables: astra_create_proj_geom(cone_vec, det_row_count, det_col_count, V)') -- cgit v1.2.3 From ee0118aceff644f7e5cdb0c7298c41064357d86a Mon Sep 17 00:00:00 2001 From: Nicola VIGANO Date: Wed, 8 Mar 2017 15:14:53 +0100 Subject: Python: added options for projector creation, like for the matlab interface Signed-off-by: Nicola VIGANO --- python/astra/creators.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/astra/creators.py') diff --git a/python/astra/creators.py b/python/astra/creators.py index aa16221..a0d347b 100644 --- a/python/astra/creators.py +++ b/python/astra/creators.py @@ -533,7 +533,7 @@ def create_reconstruction(rec_type, proj_id, sinogram, iterations=1, use_mask='n return recon_id -def create_projector(proj_type, proj_geom, vol_geom): +def create_projector(proj_type, proj_geom, vol_geom, options=None): """Create a 2D or 3D projector. :param proj_type: Projector type, such as ``'line'``, ``'linear'``, ... @@ -542,6 +542,7 @@ def create_projector(proj_type, proj_geom, vol_geom): :type proj_geom: :class:`dict` :param vol_geom: Volume geometry. :type vol_geom: :class:`dict` +:param options: Projector options structure defining ``'VoxelSuperSampling'``, ``'DetectorSuperSampling'``, and ``'GPUindex'``. :returns: :class:`int` -- The ID of the projector. """ @@ -550,6 +551,8 @@ def create_projector(proj_type, proj_geom, vol_geom): cfg = astra_dict(proj_type) cfg['ProjectionGeometry'] = proj_geom cfg['VolumeGeometry'] = vol_geom + if options is not None: + cfg['options'] = options types3d = ['linear3d', 'linearcone', 'cuda3d'] if proj_type in types3d: return projector3d.create(cfg) -- cgit v1.2.3 From 52392c4997225e255490d30cc097fc1ddd57614d Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 29 Mar 2017 10:38:53 +0200 Subject: Update create_projector docstring --- python/astra/creators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/astra/creators.py') diff --git a/python/astra/creators.py b/python/astra/creators.py index a0d347b..53d98e0 100644 --- a/python/astra/creators.py +++ b/python/astra/creators.py @@ -542,7 +542,8 @@ def create_projector(proj_type, proj_geom, vol_geom, options=None): :type proj_geom: :class:`dict` :param vol_geom: Volume geometry. :type vol_geom: :class:`dict` -:param options: Projector options structure defining ``'VoxelSuperSampling'``, ``'DetectorSuperSampling'``, and ``'GPUindex'``. +:param options: Projector options structure defining ``'VoxelSuperSampling'``, ``'DetectorSuperSampling'``. +:type options: :class:`dict` :returns: :class:`int` -- The ID of the projector. """ -- cgit v1.2.3