summaryrefslogtreecommitdiffstats
path: root/python/astra
diff options
context:
space:
mode:
Diffstat (limited to 'python/astra')
-rw-r--r--python/astra/PyIncludes.pxd1
-rw-r--r--python/astra/data3d_c.pyx6
2 files changed, 3 insertions, 4 deletions
diff --git a/python/astra/PyIncludes.pxd b/python/astra/PyIncludes.pxd
index 512b82f..ec37d0a 100644
--- a/python/astra/PyIncludes.pxd
+++ b/python/astra/PyIncludes.pxd
@@ -211,7 +211,6 @@ cdef extern from "astra/Float32Data3DMemory.h" namespace "astra":
CFloat32Data3DMemory()
void updateStatistics()
float32 *getData()
- float32 ***getData3D()
THREEEDataType getType()
diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 0717ca0..897634b 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -254,7 +254,7 @@ cdef fillDataObjectScalar(CFloat32Data3DMemory * obj, float s):
@cython.boundscheck(False)
@cython.wraparound(False)
cdef fillDataObjectArray(CFloat32Data3DMemory * obj, float [:,:,::1] data):
- cdef float [:,:,::1] cView = <float[:data.shape[0],:data.shape[1],:data.shape[2]]> obj.getData3D()[0][0]
+ cdef float [:,:,::1] cView = <float[:data.shape[0],:data.shape[1],:data.shape[2]]> obj.getData()
cView[:] = data
cdef CFloat32Data3D * getObject(i) except NULL:
@@ -271,7 +271,7 @@ def get(i):
cdef CFloat32Data3DMemory * pDataObject = dynamic_cast_mem_safe(getObject(i))
outArr = np.empty((pDataObject.getDepth(),pDataObject.getHeight(), pDataObject.getWidth()),dtype=np.float32,order='C')
cdef float [:,:,::1] mView = outArr
- cdef float [:,:,::1] cView = <float[:outArr.shape[0],:outArr.shape[1],:outArr.shape[2]]> pDataObject.getData3D()[0][0]
+ cdef float [:,:,::1] cView = <float[:outArr.shape[0],:outArr.shape[1],:outArr.shape[2]]> pDataObject.getData()
mView[:] = cView
return outArr
@@ -282,7 +282,7 @@ def get_shared(i):
shape[0] = <np.npy_intp> pDataObject.getDepth()
shape[1] = <np.npy_intp> pDataObject.getHeight()
shape[2] = <np.npy_intp> pDataObject.getWidth()
- return np.PyArray_SimpleNewFromData(3,shape,np.NPY_FLOAT32,<void *>pDataObject.getData3D()[0][0])
+ return np.PyArray_SimpleNewFromData(3,shape,np.NPY_FLOAT32,<void *>pDataObject.getData())
def get_single(i):
raise NotImplementedError("Not yet implemented")