diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-03-15 16:25:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-15 16:25:24 +0000 |
commit | fcc8658ce6ca037beef21ab436a4a50802b0fdfb (patch) | |
tree | 3ccf35cda7c6ce152a315efadef7c86a1b1c80dd /Wrappers/Python | |
parent | 19f4dcbf0e3d769bb29ace6232d1a63f88be396e (diff) | |
download | framework-fcc8658ce6ca037beef21ab436a4a50802b0fdfb.tar.gz framework-fcc8658ce6ca037beef21ab436a4a50802b0fdfb.tar.bz2 framework-fcc8658ce6ca037beef21ab436a4a50802b0fdfb.tar.xz framework-fcc8658ce6ca037beef21ab436a4a50802b0fdfb.zip |
Renaming astra (#65)
* added test at conda build
* use lower_case in geometry methods
Diffstat (limited to 'Wrappers/Python')
-rw-r--r-- | Wrappers/Python/ccpi/astra/astra_utils.py | 20 | ||||
-rw-r--r-- | Wrappers/Python/ccpi/framework.py | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/Wrappers/Python/ccpi/astra/astra_utils.py b/Wrappers/Python/ccpi/astra/astra_utils.py index 8b5043a..dedb4fe 100644 --- a/Wrappers/Python/ccpi/astra/astra_utils.py +++ b/Wrappers/Python/ccpi/astra/astra_utils.py @@ -5,10 +5,10 @@ def convert_geometry_to_astra(volume_geometry, sinogram_geometry): if sinogram_geometry.dimension == '2D': vol_geom = astra.create_vol_geom(volume_geometry.voxel_num_x, volume_geometry.voxel_num_y, - volume_geometry.getMinX(), - volume_geometry.getMaxX(), - volume_geometry.getMinY(), - volume_geometry.getMaxY()) + volume_geometry.get_min_x(), + volume_geometry.get_max_x(), + volume_geometry.get_min_y(), + volume_geometry.get_max_y()) if sinogram_geometry.geom_type == 'parallel': proj_geom = astra.create_proj_geom('parallel', @@ -29,12 +29,12 @@ def convert_geometry_to_astra(volume_geometry, sinogram_geometry): vol_geom = astra.create_vol_geom(volume_geometry.voxel_num_x, volume_geometry.voxel_num_y, volume_geometry.voxel_num_z, - volume_geometry.getMinX(), - volume_geometry.getMaxX(), - volume_geometry.getMinY(), - volume_geometry.getMaxY(), - volume_geometry.getMinZ(), - volume_geometry.getMaxZ()) + volume_geometry.get_min_x(), + volume_geometry.get_max_x(), + volume_geometry.get_min_y(), + volume_geometry.get_max_y(), + volume_geometry.get_min_z(), + volume_geometry.get_max_z()) if sinogram_geometry.proj_geom == 'parallel': proj_geom = astra.create_proj_geom('parallel3d', diff --git a/Wrappers/Python/ccpi/framework.py b/Wrappers/Python/ccpi/framework.py index 9b0cf54..877becf 100644 --- a/Wrappers/Python/ccpi/framework.py +++ b/Wrappers/Python/ccpi/framework.py @@ -59,25 +59,25 @@ class ImageGeometry: self.center_z = center_z self.channels = channels - def getMinX(self): + def get_min_x(self): return self.center_x - 0.5*self.voxel_num_x*self.voxel_size_x - def getMaxX(self): + def get_max_x(self): return self.center_x + 0.5*self.voxel_num_x*self.voxel_size_x - def getMinY(self): + def get_min_y(self): return self.center_y - 0.5*self.voxel_num_y*self.voxel_size_y - def getMaxY(self): + def get_max_y(self): return self.center_y + 0.5*self.voxel_num_y*self.voxel_size_y - def getMinZ(self): + def get_min_z(self): if not voxel_num_z == 0: return self.center_z - 0.5*self.voxel_num_z*self.voxel_size_z else: return 0 - def getMaxZ(self): + def get_max_z(self): if not voxel_num_z == 0: return self.center_z + 0.5*self.voxel_num_z*self.voxel_size_z else: |