From 19abbab5316692e7e884924525d8ef5300b4bf5a Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Thu, 15 Sep 2016 10:59:51 -0300 Subject: [PATCH] FIX: To compile cython codes in windows --- invesalius/data/interpolation.pxd | 6 +++--- invesalius/data/interpolation.pyx | 12 ++++++------ invesalius/data/transforms.pyx | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/invesalius/data/interpolation.pxd b/invesalius/data/interpolation.pxd index 2de4081..6dde24a 100644 --- a/invesalius/data/interpolation.pxd +++ b/invesalius/data/interpolation.pxd @@ -1,5 +1,5 @@ from .cy_my_types cimport image_t -cdef inline double interpolate(image_t[:, :, :], double, double, double) nogil -cdef inline double tricub_interpolate(image_t[:, :, :], double, double, double) nogil -cdef inline double tricubicInterpolate (image_t[:, :, :], double, double, double) nogil +cdef double interpolate(image_t[:, :, :], double, double, double) nogil +cdef double tricub_interpolate(image_t[:, :, :], double, double, double) nogil +cdef double tricubicInterpolate (image_t[:, :, :], double, double, double) nogil diff --git a/invesalius/data/interpolation.pyx b/invesalius/data/interpolation.pyx index 8a18b7b..1f7a99e 100644 --- a/invesalius/data/interpolation.pyx +++ b/invesalius/data/interpolation.pyx @@ -77,7 +77,7 @@ cdef double[64][64] temp = [ @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline double interpolate(image_t[:, :, :] V, double x, double y, double z) nogil: +cdef double interpolate(image_t[:, :, :] V, double x, double y, double z) nogil: cdef double xd, yd, zd cdef double c00, c10, c01, c11 cdef double c0, c1 @@ -123,7 +123,7 @@ cdef inline double interpolate(image_t[:, :, :] V, double x, double y, double z) @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline image_t _G(image_t[:, :, :] V, int x, int y, int z) nogil: +cdef image_t _G(image_t[:, :, :] V, int x, int y, int z) nogil: cdef int dz, dy, dx dz = V.shape[0] - 1 dy = V.shape[1] - 1 @@ -236,7 +236,7 @@ cdef void calc_coef_tricub(image_t[:, :, :] V, double x, double y, double z, dou @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline double tricub_interpolate(image_t[:, :, :] V, double x, double y, double z) nogil: +cdef double tricub_interpolate(image_t[:, :, :] V, double x, double y, double z) nogil: # From: Tricubic interpolation in three dimensions. Lekien and Marsden cdef double[64] coef cdef double result = 0.0 @@ -261,14 +261,14 @@ cdef inline double tricub_interpolate(image_t[:, :, :] V, double x, double y, do @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline double cubicInterpolate(double p[4], double x) nogil: +cdef double cubicInterpolate(double p[4], double x) nogil: return p[1] + 0.5 * x*(p[2] - p[0] + x*(2.0*p[0] - 5.0*p[1] + 4.0*p[2] - p[3] + x*(3.0*(p[1] - p[2]) + p[3] - p[0]))) @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline double bicubicInterpolate (double p[4][4], double x, double y) nogil: +cdef double bicubicInterpolate (double p[4][4], double x, double y) nogil: cdef double arr[4] arr[0] = cubicInterpolate(p[0], y) arr[1] = cubicInterpolate(p[1], y) @@ -280,7 +280,7 @@ cdef inline double bicubicInterpolate (double p[4][4], double x, double y) nogil @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline double tricubicInterpolate(image_t[:, :, :] V, double x, double y, double z) nogil: +cdef double tricubicInterpolate(image_t[:, :, :] V, double x, double y, double z) nogil: # From http://www.paulinternet.nl/?page=bicubic cdef double p[4][4][4] diff --git a/invesalius/data/transforms.pyx b/invesalius/data/transforms.pyx index 9bc8da3..c8a46f8 100644 --- a/invesalius/data/transforms.pyx +++ b/invesalius/data/transforms.pyx @@ -12,7 +12,7 @@ from cython.parallel import prange @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.cdivision(True) @cython.wraparound(False) -cdef inline void mul_mat4_vec4(double[:, :] M, +cdef void mul_mat4_vec4(double[:, :] M, double* coord, double* out) nogil: @@ -77,7 +77,7 @@ def apply_view_matrix_transform(image_t[:, :, :] volume, image_t cval, image_t[:, :, :] out): - cdef unsigned int dz, dy, dx + cdef int dz, dy, dx cdef int z, y, x dz = volume.shape[0] dy = volume.shape[1] -- libgit2 0.21.2