summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/ccpi/astra/astra_processors.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/Wrappers/Python/ccpi/astra/astra_processors.py b/Wrappers/Python/ccpi/astra/astra_processors.py
index 94a8745..f51aec9 100644
--- a/Wrappers/Python/ccpi/astra/astra_processors.py
+++ b/Wrappers/Python/ccpi/astra/astra_processors.py
@@ -38,8 +38,13 @@ class AstraForwardProjector(DataSetProcessor):
# ASTRA projector, to be stored
if device == 'cpu':
- # Note that 'line' is only for parallel (2D) and only one option
- self.setProjector(astra.create_projector('line', proj_geom, vol_geom) )
+ # Note that 'line' only one option
+ if self.sinogram_geometry.geom_type == 'parallel':
+ self.setProjector(astra.create_projector('line', proj_geom, vol_geom) )
+ elif self.sinogram_geometry.geom_type == 'cone':
+ self.setProjector(astra.create_projector('line_fanflat', proj_geom, vol_geom) )
+ else:
+ NotImplemented
elif device == 'gpu':
self.setProjector(astra.create_projector('cuda', proj_geom, vol_geom) )
else:
@@ -107,8 +112,13 @@ class AstraBackProjector(DataSetProcessor):
# ASTRA projector, to be stored
if device == 'cpu':
- # Note that 'line' is only for parallel (2D) and only one option
- self.setProjector(astra.create_projector('line', proj_geom, vol_geom) )
+ # Note that 'line' only one option
+ if self.sinogram_geometry.geom_type == 'parallel':
+ self.setProjector(astra.create_projector('line', proj_geom, vol_geom) )
+ elif self.sinogram_geometry.geom_type == 'cone':
+ self.setProjector(astra.create_projector('line_fanflat', proj_geom, vol_geom) )
+ else:
+ NotImplemented
elif device == 'gpu':
self.setProjector(astra.create_projector('cuda', proj_geom, vol_geom) )
else: