summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/astra/projector3d_c.pyx10
-rw-r--r--python/astra/projector_c.pyx10
2 files changed, 16 insertions, 4 deletions
diff --git a/python/astra/projector3d_c.pyx b/python/astra/projector3d_c.pyx
index 8b978d7..aec9cde 100644
--- a/python/astra/projector3d_c.pyx
+++ b/python/astra/projector3d_c.pyx
@@ -87,12 +87,18 @@ cdef CProjector3D * getObject(i) except NULL:
def projection_geometry(i):
cdef CProjector3D * proj = getObject(i)
- return utils.configToDict(proj.getProjectionGeometry().getConfiguration())
+ cdef Config * cfg = proj.getProjectionGeometry().getConfiguration()
+ dct = utils.configToDict(cfg)
+ del cfg
+ return dct
def volume_geometry(i):
cdef CProjector3D * proj = getObject(i)
- return utils.configToDict(proj.getVolumeGeometry().getConfiguration())
+ cdef Config * cfg = proj.getVolumeGeometry().getConfiguration()
+ dct = utils.configToDict(cfg)
+ del cfg
+ return dct
def weights_single_ray(i, projection_index, detector_index):
diff --git a/python/astra/projector_c.pyx b/python/astra/projector_c.pyx
index 9aa868e..77c64a4 100644
--- a/python/astra/projector_c.pyx
+++ b/python/astra/projector_c.pyx
@@ -91,12 +91,18 @@ cdef CProjector2D * getObject(i) except NULL:
def projection_geometry(i):
cdef CProjector2D * proj = getObject(i)
- return utils.configToDict(proj.getProjectionGeometry().getConfiguration())
+ cdef Config * cfg = proj.getProjectionGeometry().getConfiguration()
+ dct = utils.configToDict(cfg)
+ del cfg
+ return dct
def volume_geometry(i):
cdef CProjector2D * proj = getObject(i)
- return utils.configToDict(proj.getVolumeGeometry().getConfiguration())
+ cdef Config * cfg = proj.getVolumeGeometry().getConfiguration()
+ dct = utils.configToDict(cfg)
+ del cfg
+ return dct
def weights_single_ray(i, projection_index, detector_index):