diff --git a/skimage/filter/rank/_core16.pyx b/skimage/filter/rank/_core16.pyx index 1575e24e..aa959fd0 100644 --- a/skimage/filter/rank/_core16.pyx +++ b/skimage/filter/rank/_core16.pyx @@ -144,7 +144,7 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, cc = c - centre_c if selem[r, c]: if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) r = 0 c = 0 @@ -162,13 +162,13 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, rr = r + se_e_r[s] cc = c + se_e_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_w): rr = r + se_w_r[s] cc = c + se_w_c[s] - 1 if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel ------------------------------------------- out_data[r * cols + c] = kernel( @@ -185,13 +185,13 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, rr = r + se_s_r[s] cc = c + se_s_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_n): rr = r + se_n_r[s] - 1 cc = c + se_n_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel ------------------------------------------- out_data[r * cols + c] = kernel(histo, pop, image_data[r * cols + c], @@ -204,13 +204,13 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, rr = r + se_w_r[s] cc = c + se_w_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_e): rr = r + se_e_r[s] cc = c + se_e_c[s] + 1 if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel ------------------------------------------- out_data[r * cols + c] = kernel( @@ -227,13 +227,13 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, rr = r + se_s_r[s] cc = c + se_s_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_n): rr = r + se_n_r[s] - 1 cc = c + se_n_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel ------------------------------------------- out_data[r * cols + c] = kernel(histo, pop, image_data[r * cols + c], diff --git a/skimage/filter/rank/_core8.pyx b/skimage/filter/rank/_core8.pyx index 6a9701a0..9f4bc693 100644 --- a/skimage/filter/rank/_core8.pyx +++ b/skimage/filter/rank/_core8.pyx @@ -148,7 +148,7 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, float, np.uint8_t, float, cc = c - centre_c if selem[r, c]: if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) r = 0 c = 0 @@ -166,13 +166,13 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, float, np.uint8_t, float, rr = r + se_e_r[s] cc = c + se_e_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_w): rr = r + se_w_r[s] cc = c + se_w_c[s] - 1 if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel ----------------------------------------------------------- out_data[r * cols + c] = \ @@ -188,13 +188,13 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, float, np.uint8_t, float, rr = r + se_s_r[s] cc = c + se_s_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_n): rr = r + se_n_r[s] - 1 cc = c + se_n_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel --------------------------------------------------------------- out_data[r * cols + c] = kernel(histo, pop, image_data[r * cols + c], @@ -207,13 +207,13 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, float, np.uint8_t, float, rr = r + se_w_r[s] cc = c + se_w_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_e): rr = r + se_e_r[s] cc = c + se_e_c[s] + 1 if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel ----------------------------------------------------------- out_data[r * cols + c] = kernel( @@ -229,13 +229,13 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, float, np.uint8_t, float, rr = r + se_s_r[s] cc = c + se_s_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_increment(histo, & pop, image_data[rr * cols + cc]) + histogram_increment(histo, &pop, image_data[rr * cols + cc]) for s in range(num_se_n): rr = r + se_n_r[s] - 1 cc = c + se_n_c[s] if is_in_mask(rows, cols, rr, cc, mask_data): - histogram_decrement(histo, & pop, image_data[rr * cols + cc]) + histogram_decrement(histo, &pop, image_data[rr * cols + cc]) # kernel --------------------------------------------------------------- out_data[r * cols + c] = kernel(histo, pop, image_data[r * cols + c], diff --git a/skimage/filter/rank/_crank16.pyx b/skimage/filter/rank/_crank16.pyx index 3a9b5775..e81bf81f 100644 --- a/skimage/filter/rank/_crank16.pyx +++ b/skimage/filter/rank/_crank16.pyx @@ -291,7 +291,7 @@ def autolevel(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_autolevel, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def bottomhat(np.ndarray[np.uint16_t, ndim=2] image, @@ -300,7 +300,7 @@ def bottomhat(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_bottomhat, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def equalize(np.ndarray[np.uint16_t, ndim=2] image, @@ -309,7 +309,7 @@ def equalize(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_equalize, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def gradient(np.ndarray[np.uint16_t, ndim=2] image, @@ -318,7 +318,7 @@ def gradient(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_gradient, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def maximum(np.ndarray[np.uint16_t, ndim=2] image, @@ -327,7 +327,7 @@ def maximum(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_maximum, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def mean(np.ndarray[np.uint16_t, ndim=2] image, @@ -336,7 +336,7 @@ def mean(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_mean, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def meansubstraction(np.ndarray[np.uint16_t, ndim=2] image, @@ -345,7 +345,7 @@ def meansubstraction(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_meansubstraction, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def median(np.ndarray[np.uint16_t, ndim=2] image, @@ -354,7 +354,7 @@ def median(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_median, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def minimum(np.ndarray[np.uint16_t, ndim=2] image, @@ -363,7 +363,7 @@ def minimum(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_minimum, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def morph_contr_enh(np.ndarray[np.uint16_t, ndim=2] image, @@ -372,7 +372,7 @@ def morph_contr_enh(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_morph_contr_enh, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def modal(np.ndarray[np.uint16_t, ndim=2] image, @@ -381,7 +381,7 @@ def modal(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_modal, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def pop(np.ndarray[np.uint16_t, ndim=2] image, @@ -390,7 +390,7 @@ def pop(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_pop, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def threshold(np.ndarray[np.uint16_t, ndim=2] image, @@ -399,7 +399,7 @@ def threshold(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_threshold, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def tophat(np.ndarray[np.uint16_t, ndim=2] image, @@ -408,7 +408,7 @@ def tophat(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_tophat, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) def entropy(np.ndarray[np.uint16_t, ndim=2] image, @@ -417,4 +417,4 @@ def entropy(np.ndarray[np.uint16_t, ndim=2] image, np.ndarray[np.uint16_t, ndim=2] out=None, char shift_x=0, char shift_y=0, Py_ssize_t bitdepth=8): _core16(kernel_entropy, image, selem, mask, out, shift_x, shift_y, - bitdepth, 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, 0, 0, 0, 0) diff --git a/skimage/filter/rank/_crank16_percentiles.pyx b/skimage/filter/rank/_crank16_percentiles.pyx index 72d48e53..220d2386 100644 --- a/skimage/filter/rank/_crank16_percentiles.pyx +++ b/skimage/filter/rank/_crank16_percentiles.pyx @@ -239,7 +239,7 @@ def autolevel(np.ndarray[np.uint16_t, ndim=2] image, """bottom hat """ _core16(kernel_autolevel, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def gradient(np.ndarray[np.uint16_t, ndim=2] image, @@ -251,7 +251,7 @@ def gradient(np.ndarray[np.uint16_t, ndim=2] image, """return p0,p1 percentile gradient """ _core16(kernel_gradient, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def mean(np.ndarray[np.uint16_t, ndim=2] image, @@ -263,7 +263,7 @@ def mean(np.ndarray[np.uint16_t, ndim=2] image, """return mean between [p0 and p1] percentiles """ _core16(kernel_mean, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def mean_substraction(np.ndarray[np.uint16_t, ndim=2] image, @@ -276,7 +276,7 @@ def mean_substraction(np.ndarray[np.uint16_t, ndim=2] image, """ _core16( kernel_mean_substraction, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def morph_contr_enh(np.ndarray[np.uint16_t, ndim=2] image, @@ -288,7 +288,7 @@ def morph_contr_enh(np.ndarray[np.uint16_t, ndim=2] image, """reforce contrast using percentiles """ _core16(kernel_morph_contr_enh, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def percentile(np.ndarray[np.uint16_t, ndim=2] image, @@ -300,7 +300,7 @@ def percentile(np.ndarray[np.uint16_t, ndim=2] image, """return p0 percentile """ _core16(kernel_percentile, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def pop(np.ndarray[np.uint16_t, ndim=2] image, @@ -312,7 +312,7 @@ def pop(np.ndarray[np.uint16_t, ndim=2] image, """return nb of pixels between [p0 and p1] """ _core16(kernel_pop, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) def threshold(np.ndarray[np.uint16_t, ndim=2] image, @@ -324,4 +324,4 @@ def threshold(np.ndarray[np.uint16_t, ndim=2] image, """return (maxbin-1) if g > percentile p0 """ _core16(kernel_threshold, image, selem, mask, out, shift_x, shift_y, - bitdepth, p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + bitdepth, p0, p1, 0, 0) diff --git a/skimage/filter/rank/_crank8.pyx b/skimage/filter/rank/_crank8.pyx index 4a25e974..8bff9703 100644 --- a/skimage/filter/rank/_crank8.pyx +++ b/skimage/filter/rank/_crank8.pyx @@ -334,7 +334,7 @@ def autolevel(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_autolevel, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def bottomhat(np.ndarray[np.uint8_t, ndim=2] image, @@ -343,7 +343,7 @@ def bottomhat(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_bottomhat, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def equalize(np.ndarray[np.uint8_t, ndim=2] image, @@ -352,7 +352,7 @@ def equalize(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_equalize, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def gradient(np.ndarray[np.uint8_t, ndim=2] image, @@ -361,7 +361,7 @@ def gradient(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_gradient, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def maximum(np.ndarray[np.uint8_t, ndim=2] image, @@ -370,7 +370,7 @@ def maximum(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_maximum, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def mean(np.ndarray[np.uint8_t, ndim=2] image, @@ -379,7 +379,7 @@ def mean(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_mean, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def meansubstraction(np.ndarray[np.uint8_t, ndim=2] image, @@ -388,7 +388,7 @@ def meansubstraction(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_meansubstraction, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def median(np.ndarray[np.uint8_t, ndim=2] image, @@ -397,7 +397,7 @@ def median(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_median, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def minimum(np.ndarray[np.uint8_t, ndim=2] image, @@ -406,7 +406,7 @@ def minimum(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_minimum, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def morph_contr_enh(np.ndarray[np.uint8_t, ndim=2] image, @@ -415,7 +415,7 @@ def morph_contr_enh(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_morph_contr_enh, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def modal(np.ndarray[np.uint8_t, ndim=2] image, @@ -424,7 +424,7 @@ def modal(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_modal, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def pop(np.ndarray[np.uint8_t, ndim=2] image, @@ -433,7 +433,7 @@ def pop(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_pop, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def threshold(np.ndarray[np.uint8_t, ndim=2] image, @@ -442,7 +442,7 @@ def threshold(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_threshold, image, selem, mask, out, shift_x, shift_y, 0, 0, - < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0) def tophat(np.ndarray[np.uint8_t, ndim=2] image, @@ -451,7 +451,7 @@ def tophat(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_tophat, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def noise_filter(np.ndarray[np.uint8_t, ndim=2] image, @@ -460,7 +460,7 @@ def noise_filter(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_noise_filter, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def entropy(np.ndarray[np.uint8_t, ndim=2] image, @@ -469,7 +469,7 @@ def entropy(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_entropy, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) def otsu(np.ndarray[np.uint8_t, ndim=2] image, @@ -478,4 +478,4 @@ def otsu(np.ndarray[np.uint8_t, ndim=2] image, np.ndarray[np.uint8_t, ndim=2] out=None, char shift_x=0, char shift_y=0): _core8(kernel_otsu, image, selem, mask, out, shift_x, shift_y, - 0, 0, < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0, 0, 0) diff --git a/skimage/filter/rank/_crank8_percentiles.pyx b/skimage/filter/rank/_crank8_percentiles.pyx index ddaec290..31b00742 100644 --- a/skimage/filter/rank/_crank8_percentiles.pyx +++ b/skimage/filter/rank/_crank8_percentiles.pyx @@ -212,7 +212,7 @@ def autolevel(np.ndarray[np.uint8_t, ndim=2] image, """autolevel """ _core8(kernel_autolevel, image, selem, mask, out, shift_x, shift_y, p0, p1, - < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0) def gradient(np.ndarray[np.uint8_t, ndim=2] image, @@ -223,7 +223,7 @@ def gradient(np.ndarray[np.uint8_t, ndim=2] image, """return p0,p1 percentile gradient """ _core8(kernel_gradient, image, selem, mask, out, shift_x, shift_y, p0, p1, - < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0) def mean(np.ndarray[np.uint8_t, ndim=2] image, @@ -234,7 +234,7 @@ def mean(np.ndarray[np.uint8_t, ndim=2] image, """return mean between [p0 and p1] percentiles """ _core8(kernel_mean, image, selem, mask, out, shift_x, shift_y, p0, p1, - < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0) def mean_substraction(np.ndarray[np.uint8_t, ndim=2] image, @@ -245,7 +245,7 @@ def mean_substraction(np.ndarray[np.uint8_t, ndim=2] image, """return original - mean between [p0 and p1] percentiles *.5 +127 """ _core8(kernel_mean_substraction, image, selem, mask, out, shift_x, shift_y, - p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + p0, p1, 0, 0) def morph_contr_enh(np.ndarray[np.uint8_t, ndim=2] image, @@ -256,7 +256,7 @@ def morph_contr_enh(np.ndarray[np.uint8_t, ndim=2] image, """reforce contrast using percentiles """ _core8(kernel_morph_contr_enh, image, selem, mask, out, shift_x, shift_y, - p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + p0, p1, 0, 0) def percentile(np.ndarray[np.uint8_t, ndim=2] image, @@ -267,7 +267,7 @@ def percentile(np.ndarray[np.uint8_t, ndim=2] image, """return p0 percentile """ _core8(kernel_percentile, image, selem, mask, out, shift_x, shift_y, - p0, p1, < Py_ssize_t > 0, < Py_ssize_t > 0) + p0, p1, 0, 0) def pop(np.ndarray[np.uint8_t, ndim=2] image, @@ -278,7 +278,7 @@ def pop(np.ndarray[np.uint8_t, ndim=2] image, """return nb of pixels between [p0 and p1] """ _core8(kernel_pop, image, selem, mask, out, shift_x, shift_y, p0, p1, - < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0) def threshold(np.ndarray[np.uint8_t, ndim=2] image, @@ -289,4 +289,4 @@ def threshold(np.ndarray[np.uint8_t, ndim=2] image, """return 255 if g > percentile p0 """ _core8(kernel_threshold, image, selem, mask, out, shift_x, shift_y, p0, p1, - < Py_ssize_t > 0, < Py_ssize_t > 0) + 0, 0)