Commit f0faf9e1ec1b4a281f662cac9be8ed89bce6e624
1 parent
cc3c0dc3
Exists in
ff_mask
Adapted invesalius cython extensions to use fused types
Showing
2 changed files
with
11 additions
and
4 deletions
Show diff stats
invesalius/data/cy_my_types.pxd
invesalius/data/transforms.pyx
| ... | ... | @@ -12,7 +12,7 @@ from cython.parallel import prange |
| 12 | 12 | @cython.boundscheck(False) # turn of bounds-checking for entire function |
| 13 | 13 | @cython.cdivision(True) |
| 14 | 14 | @cython.wraparound(False) |
| 15 | -cdef inline void mul_mat4_vec4(np.float64_t[:, :] M, | |
| 15 | +cdef inline void mul_mat4_vec4(double[:, :] M, | |
| 16 | 16 | double* coord, |
| 17 | 17 | double* out) nogil: |
| 18 | 18 | |
| ... | ... | @@ -25,7 +25,7 @@ cdef inline void mul_mat4_vec4(np.float64_t[:, :] M, |
| 25 | 25 | @cython.boundscheck(False) # turn of bounds-checking for entire function |
| 26 | 26 | @cython.cdivision(True) |
| 27 | 27 | @cython.wraparound(False) |
| 28 | -cdef image_t coord_transform(image_t[:, :, :] volume, np.float64_t[:, :] M, int x, int y, int z, double sx, double sy, double sz, short minterpol, image_t cval) nogil: | |
| 28 | +cdef image_t coord_transform(image_t[:, :, :] volume, double[:, :] M, int x, int y, int z, double sx, double sy, double sz, short minterpol, image_t cval) nogil: | |
| 29 | 29 | |
| 30 | 30 | cdef double coord[4] |
| 31 | 31 | coord[0] = z*sz |
| ... | ... | @@ -71,7 +71,7 @@ cdef image_t coord_transform(image_t[:, :, :] volume, np.float64_t[:, :] M, int |
| 71 | 71 | @cython.wraparound(False) |
| 72 | 72 | def apply_view_matrix_transform(image_t[:, :, :] volume, |
| 73 | 73 | spacing, |
| 74 | - np.float64_t[:, :] M, | |
| 74 | + double[:, :] M, | |
| 75 | 75 | unsigned int n, str orientation, |
| 76 | 76 | int minterpol, |
| 77 | 77 | image_t cval, | ... | ... |