Commit 6662c4284837cec9eaa46a11824c9635c89cb409
1 parent
4cb5f692
Exists in
ff_mask
Updated the setup.py
Showing
2 changed files
with
22 additions
and
12 deletions
Show diff stats
invesalius/data/floodfill.pyx
@@ -139,13 +139,12 @@ def floodfill_threshold(np.ndarray[image_t, ndim=3] data, list seeds, int t0, in | @@ -139,13 +139,12 @@ def floodfill_threshold(np.ndarray[image_t, ndim=3] data, list seeds, int t0, in | ||
139 | out[z, y, x] = fill | 139 | out[z, y, x] = fill |
140 | 140 | ||
141 | for k in xrange(odz): | 141 | for k in xrange(odz): |
142 | + zo = z + k - offset_z | ||
142 | for j in xrange(ody): | 143 | for j in xrange(ody): |
144 | + yo = y + j - offset_y | ||
143 | for i in xrange(odx): | 145 | for i in xrange(odx): |
144 | if strct[k, j, i]: | 146 | if strct[k, j, i]: |
145 | xo = x + i - offset_x | 147 | xo = x + i - offset_x |
146 | - yo = y + j - offset_y | ||
147 | - zo = z + k - offset_z | ||
148 | - | ||
149 | if 0 <= xo < dx and 0 <= yo < dy and 0 <= zo < dz and out[zo, yo, xo] != fill and t0 <= data[zo, yo, xo] <= t1: | 148 | if 0 <= xo < dx and 0 <= yo < dy and 0 <= zo < dz and out[zo, yo, xo] != fill and t0 <= data[zo, yo, xo] <= t1: |
150 | out[zo, yo, xo] = fill | 149 | out[zo, yo, xo] = fill |
151 | c.x = xo | 150 | c.x = xo |
setup.py
@@ -38,18 +38,23 @@ elif sys.platform == 'win32': | @@ -38,18 +38,23 @@ elif sys.platform == 'win32': | ||
38 | setup( | 38 | setup( |
39 | cmdclass = {'build_ext': build_ext}, | 39 | cmdclass = {'build_ext': build_ext}, |
40 | ext_modules = cythonize([ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"], | 40 | ext_modules = cythonize([ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"], |
41 | - include_dirs = [numpy.get_include()], | ||
42 | - extra_compile_args=['/openmp'],), | 41 | + include_dirs = [numpy.get_include()], |
42 | + extra_compile_args=['/openmp'],), | ||
43 | 43 | ||
44 | - Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"], | ||
45 | - include_dirs=[numpy.get_include()], | ||
46 | - extra_compile_args=['/openmp'],), | 44 | + Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"], |
45 | + include_dirs=[numpy.get_include()], | ||
46 | + extra_compile_args=['/openmp'],), | ||
47 | 47 | ||
48 | - Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"], | ||
49 | - include_dirs=[numpy.get_include()], | ||
50 | - extra_compile_args=['/openmp'],), | 48 | + Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"], |
49 | + include_dirs=[numpy.get_include()], | ||
50 | + extra_compile_args=['/openmp'],), | ||
51 | + | ||
52 | + Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"], | ||
53 | + include_dirs=[numpy.get_include()], | ||
54 | + extra_compile_args=['/openmp',], | ||
55 | + language='c++',), | ||
51 | ]) | 56 | ]) |
52 | - ) | 57 | + ) |
53 | 58 | ||
54 | else: | 59 | else: |
55 | setup( | 60 | setup( |
@@ -69,5 +74,11 @@ else: | @@ -69,5 +74,11 @@ else: | ||
69 | include_dirs=[numpy.get_include()], | 74 | include_dirs=[numpy.get_include()], |
70 | extra_compile_args=['-fopenmp',], | 75 | extra_compile_args=['-fopenmp',], |
71 | extra_link_args=['-fopenmp',]), | 76 | extra_link_args=['-fopenmp',]), |
77 | + | ||
78 | + Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"], | ||
79 | + include_dirs=[numpy.get_include()], | ||
80 | + extra_compile_args=['-fopenmp',], | ||
81 | + extra_link_args=['-fopenmp',], | ||
82 | + language='c++',), | ||
72 | ]) | 83 | ]) |
73 | ) | 84 | ) |