diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-03-08 12:04:09 +0000 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2018-03-08 12:04:09 +0000 |
commit | 543cf998265aa4f3cf42bce3757820139ddfa6ee (patch) | |
tree | 5acdf2371f3c2f73241b3355b35f478460148108 /Wrappers/Python | |
parent | fc7475329efea7234371e96d98fe880f6896b66e (diff) | |
parent | 83dd0330d20a57f52956d8a08b01072807e24daf (diff) | |
download | framework-543cf998265aa4f3cf42bce3757820139ddfa6ee.tar.gz framework-543cf998265aa4f3cf42bce3757820139ddfa6ee.tar.bz2 framework-543cf998265aa4f3cf42bce3757820139ddfa6ee.tar.xz framework-543cf998265aa4f3cf42bce3757820139ddfa6ee.zip |
Merge branch 'master' of https://github.com/vais-ral/CCPi-ReconstructionFramework into dataset_for_multichannel
Diffstat (limited to 'Wrappers/Python')
-rw-r--r-- | Wrappers/Python/ccpi/astra/astra_processors.py | 18 |
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: |