summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2020-07-02 15:55:14 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2020-07-02 15:55:14 +0200
commit69ab4daf439164eb37203b69b0cca3efe4c2232e (patch)
treeffe468575dcf47d3411e7c2467e72ddf8626c988
parent7213c6ae82c0e447ccec804f74226e6ceb8d45f8 (diff)
downloadastra-69ab4daf439164eb37203b69b0cca3efe4c2232e.tar.gz
astra-69ab4daf439164eb37203b69b0cca3efe4c2232e.tar.bz2
astra-69ab4daf439164eb37203b69b0cca3efe4c2232e.tar.xz
astra-69ab4daf439164eb37203b69b0cca3efe4c2232e.zip
Add error check
-rw-r--r--python/astra/experimental.pyx4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/astra/experimental.pyx b/python/astra/experimental.pyx
index 0c40a82..08d907d 100644
--- a/python/astra/experimental.pyx
+++ b/python/astra/experimental.pyx
@@ -65,6 +65,8 @@ IF HAVE_CUDA==True:
cdef CData3DManager * man3d = <CData3DManager * >PyData3DManager.getSingletonPtr()
def do_composite(projector_id, vol_ids, proj_ids, mode, t):
+ if mode != MODE_ADD and mode != MODE_SET:
+ raise RuntimeError("internal error: wrong composite mode")
cdef vector[CFloat32VolumeData3D *] vol
cdef CFloat32VolumeData3D * pVolObject
cdef CFloat32ProjectionData3D * pProjObject
@@ -126,6 +128,8 @@ IF HAVE_CUDA==True:
from .utils cimport linkVolFromGeometry, linkProjFromGeometry
def direct_FPBP3D(projector_id, vol, proj, mode, t):
+ if mode != MODE_ADD and mode != MODE_SET:
+ raise RuntimeError("internal error: wrong composite mode")
cdef CProjector3D * projector = manProj.get(projector_id)
if projector == NULL:
raise Exception("Projector not found")