diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-03-18 16:55:00 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2015-03-18 16:55:00 +0100 |
commit | a86c7735d1dd20ec884c256950b8a9575f3ebdca (patch) | |
tree | ab4e4e47ba92618562f84a47de587878f4d34af6 /python/astra/ASTRAProjector.py | |
parent | 65a607967e71d68ec32f34b7cf61fd8d891cc550 (diff) | |
parent | f603045f5bb41de6bc1ffa93badd932b891f5f1d (diff) | |
download | astra-a86c7735d1dd20ec884c256950b8a9575f3ebdca.tar.gz astra-a86c7735d1dd20ec884c256950b8a9575f3ebdca.tar.bz2 astra-a86c7735d1dd20ec884c256950b8a9575f3ebdca.tar.xz astra-a86c7735d1dd20ec884c256950b8a9575f3ebdca.zip |
Merge pull request #28 from dmpelt/projector3d-python
Add projector3d and CUDA projectors to Python (to match new Matlab code)
Diffstat (limited to 'python/astra/ASTRAProjector.py')
-rw-r--r-- | python/astra/ASTRAProjector.py | 9 |
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 |