summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-03-14 16:56:55 +0000
committerGitHub <noreply@github.com>2018-03-14 16:56:55 +0000
commit137aff20e4db7a75dc0e45a98e747fe4cadcdc7c (patch)
treec39058ca2d94f4e159af3ae5d15ed873b0fbedf3 /Wrappers/Python
parentf75bc1f655a0c273c4ec89c30cc4f0f92cd12426 (diff)
downloadframework-137aff20e4db7a75dc0e45a98e747fe4cadcdc7c.tar.gz
framework-137aff20e4db7a75dc0e45a98e747fe4cadcdc7c.tar.bz2
framework-137aff20e4db7a75dc0e45a98e747fe4cadcdc7c.tar.xz
framework-137aff20e4db7a75dc0e45a98e747fe4cadcdc7c.zip
use lower_case in methods (#62)
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/ccpi/astra/astra_ops.py4
-rw-r--r--Wrappers/Python/ccpi/astra/astra_processors.py32
2 files changed, 19 insertions, 17 deletions
diff --git a/Wrappers/Python/ccpi/astra/astra_ops.py b/Wrappers/Python/ccpi/astra/astra_ops.py
index c409529..5f25eec 100644
--- a/Wrappers/Python/ccpi/astra/astra_ops.py
+++ b/Wrappers/Python/ccpi/astra/astra_ops.py
@@ -17,9 +17,11 @@
from ccpi.reconstruction.ops import Operator
import numpy
+import astra
from ccpi.framework import AcquisitionData, ImageData
from ccpi.reconstruction.ops import PowerMethodNonsquare
-from ccpi.astra.astra_processors import *
+from ccpi.astra.astra_processors import AstraForwardProjector, AstraBackProjector, \
+ AstraForwardProjectorMC, AstraBackProjectorMC
class AstraProjectorSimple(Operator):
"""ASTRA projector modified to use DataSet and geometry."""
diff --git a/Wrappers/Python/ccpi/astra/astra_processors.py b/Wrappers/Python/ccpi/astra/astra_processors.py
index bf6048b..3de43bf 100644
--- a/Wrappers/Python/ccpi/astra/astra_processors.py
+++ b/Wrappers/Python/ccpi/astra/astra_processors.py
@@ -28,8 +28,8 @@ class AstraForwardProjector(DataSetProcessor):
#DataSetProcessor.__init__(self, **kwargs)
super(AstraForwardProjector, self).__init__(**kwargs)
- self.setVolumeGeometry(volume_geometry)
- self.setSinogramGeometry(sinogram_geometry)
+ self.set_ImageGeometry(volume_geometry)
+ self.set_AcquisitionGeometry(sinogram_geometry)
# Set up ASTRA Volume and projection geometry, not to be stored in self
vol_geom, proj_geom = convert_geometry_to_astra(self.volume_geometry,
@@ -39,13 +39,13 @@ class AstraForwardProjector(DataSetProcessor):
if device == 'cpu':
# Note that 'line' only one option
if self.sinogram_geometry.geom_type == 'parallel':
- self.setProjector(astra.create_projector('line', proj_geom, vol_geom) )
+ self.set_projector(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) )
+ self.set_projector(astra.create_projector('line_fanflat', proj_geom, vol_geom) )
else:
NotImplemented
elif device == 'gpu':
- self.setProjector(astra.create_projector('cuda', proj_geom, vol_geom) )
+ self.set_projector(astra.create_projector('cuda', proj_geom, vol_geom) )
else:
NotImplemented
@@ -57,13 +57,13 @@ class AstraForwardProjector(DataSetProcessor):
raise ValueError("Expected input dimensions is 2 or 3, got {0}"\
.format(dataset.number_of_dimensions))
- def setProjector(self, proj_id):
+ def set_projector(self, proj_id):
self.proj_id = proj_id
- def setVolumeGeometry(self, volume_geometry):
+ def set_ImageGeometry(self, volume_geometry):
self.volume_geometry = volume_geometry
- def setSinogramGeometry(self, sinogram_geometry):
+ def set_AcquisitionGeometry(self, sinogram_geometry):
self.sinogram_geometry = sinogram_geometry
def process(self):
@@ -102,8 +102,8 @@ class AstraBackProjector(DataSetProcessor):
#DataSetProcessor.__init__(self, **kwargs)
super(AstraBackProjector, self).__init__(**kwargs)
- self.setVolumeGeometry(volume_geometry)
- self.setSinogramGeometry(sinogram_geometry)
+ self.set_ImageGeometry(volume_geometry)
+ self.set_AcquisitionGeometry(sinogram_geometry)
# Set up ASTRA Volume and projection geometry, not to be stored in self
vol_geom, proj_geom = convert_geometry_to_astra(self.volume_geometry,
@@ -113,13 +113,13 @@ class AstraBackProjector(DataSetProcessor):
if device == 'cpu':
# Note that 'line' only one option
if self.sinogram_geometry.geom_type == 'parallel':
- self.setProjector(astra.create_projector('line', proj_geom, vol_geom) )
+ self.set_projector(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) )
+ self.set_projector(astra.create_projector('line_fanflat', proj_geom, vol_geom) )
else:
NotImplemented
elif device == 'gpu':
- self.setProjector(astra.create_projector('cuda', proj_geom, vol_geom) )
+ self.set_projector(astra.create_projector('cuda', proj_geom, vol_geom) )
else:
NotImplemented
@@ -130,13 +130,13 @@ class AstraBackProjector(DataSetProcessor):
raise ValueError("Expected input dimensions is 2 or 3, got {0}"\
.format(dataset.number_of_dimensions))
- def setProjector(self, proj_id):
+ def set_projector(self, proj_id):
self.proj_id = proj_id
- def setVolumeGeometry(self, volume_geometry):
+ def set_ImageGeometry(self, volume_geometry):
self.volume_geometry = volume_geometry
- def setSinogramGeometry(self, sinogram_geometry):
+ def set_AcquisitionGeometry(self, sinogram_geometry):
self.sinogram_geometry = sinogram_geometry
def process(self):