summaryrefslogtreecommitdiffstats
path: root/python/astra/ASTRAProjector.py
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-03-05 15:19:43 +0100
committerDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-03-05 15:49:11 +0100
commit495512324b84a75782f9fbc11921668ad9c170a9 (patch)
tree25de3e37f6e2ee161367bd31fa6e8fcaba03403e /python/astra/ASTRAProjector.py
parent20f329a7a38cd02586ef305d551d288ebcf39501 (diff)
downloadastra-495512324b84a75782f9fbc11921668ad9c170a9.tar.gz
astra-495512324b84a75782f9fbc11921668ad9c170a9.tar.bz2
astra-495512324b84a75782f9fbc11921668ad9c170a9.tar.xz
astra-495512324b84a75782f9fbc11921668ad9c170a9.zip
Added Python support for CUDA projectors
Diffstat (limited to 'python/astra/ASTRAProjector.py')
-rw-r--r--python/astra/ASTRAProjector.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/python/astra/ASTRAProjector.py b/python/astra/ASTRAProjector.py
index 96acb10..f282618 100644
--- a/python/astra/ASTRAProjector.py
+++ b/python/astra/ASTRAProjector.py
@@ -70,11 +70,9 @@ class ASTRAProjector2D(object):
:type vol_geom: :class:`dict`
:param proj_type: Projector type, such as ``'line'``, ``'linear'``, ...
:type proj_type: :class:`string`
- :param useCUDA: If ``True``, use CUDA for calculations, when possible.
- :type useCUDA: :class:`bool`
"""
- def __init__(self, proj_geom, vol_geom, proj_type, useCUDA=False):
+ def __init__(self, proj_geom, vol_geom, proj_type):
self.vol_geom = vol_geom
self.recSize = vol_geom['GridColCount']
self.angles = proj_geom['ProjectionAngles']
@@ -84,7 +82,6 @@ class ASTRAProjector2D(object):
self.nProj = self.angles.shape[0]
self.proj_geom = proj_geom
self.proj_id = ac.create_projector(proj_type, proj_geom, vol_geom)
- self.useCUDA = useCUDA
self.T = ASTRAProjector2DTranspose(self)
def backProject(self, data):
@@ -96,7 +93,7 @@ class ASTRAProjector2D(object):
"""
vol_id, vol = ac.create_backprojection(
- data, self.proj_id, useCUDA=self.useCUDA, returnData=True)
+ data, self.proj_id, returnData=True)
data2d.delete(vol_id)
return vol
@@ -108,7 +105,7 @@ class ASTRAProjector2D(object):
:returns: :class:`numpy.ndarray` -- The forward projection.
"""
- sin_id, sino = ac.create_sino(data, self.proj_id, useCUDA=self.useCUDA, returnData=True)
+ sin_id, sino = ac.create_sino(data, self.proj_id, returnData=True)
data2d.delete(sin_id)
return sino