From 1c4e17a4351e97bb8089bdd95be9dbe3ab26f6eb Mon Sep 17 00:00:00 2001 From: Olivier Debeir Date: Fri, 12 Oct 2012 17:34:04 +0200 Subject: [PATCH] add comment --- skimage/rank/_core16.pxd | 8 ++++++++ skimage/rank/_core16b.pxd | 8 ++++++++ skimage/rank/_core16p.pxd | 8 ++++++++ skimage/rank/_core8.pxd | 8 ++++++++ skimage/rank/_core8p.pxd | 8 ++++++++ 5 files changed, 40 insertions(+) diff --git a/skimage/rank/_core16.pxd b/skimage/rank/_core16.pxd index 3ecb6314..791f5fb9 100644 --- a/skimage/rank/_core16.pxd +++ b/skimage/rank/_core16.pxd @@ -91,9 +91,17 @@ char shift_x, char shift_y,int bitdepth): # allocate memory with malloc cdef int max_se = srows*scols + + # number of element in each attack border cdef int n_se_n, n_se_s, n_se_e, n_se_w + # the current local histogram distribution cdef int* histo = malloc(maxbin * sizeof(int)) + + # these lists contain the relative pixel row and column for each of the 4 attack borders + # east, west, north and south + # e.g. se_e_r lists the rows of the east structuring element border + cdef int* se_e_r = malloc(max_se * sizeof(int)) cdef int* se_e_c = malloc(max_se * sizeof(int)) cdef int* se_w_r = malloc(max_se * sizeof(int)) diff --git a/skimage/rank/_core16b.pxd b/skimage/rank/_core16b.pxd index 5f5b3e81..3007a2fb 100644 --- a/skimage/rank/_core16b.pxd +++ b/skimage/rank/_core16b.pxd @@ -92,9 +92,17 @@ char shift_x, char shift_y,int bitdepth, int s0, int s1): # allocate memory with malloc cdef int max_se = srows*scols + + # number of element in each attack border cdef int n_se_n, n_se_s, n_se_e, n_se_w + # the current local histogram distribution cdef int* histo = malloc(maxbin * sizeof(int)) + + # these lists contain the relative pixel row and column for each of the 4 attack borders + # east, west, north and south + # e.g. se_e_r lists the rows of the east structuring element border + cdef int* se_e_r = malloc(max_se * sizeof(int)) cdef int* se_e_c = malloc(max_se * sizeof(int)) cdef int* se_w_r = malloc(max_se * sizeof(int)) diff --git a/skimage/rank/_core16p.pxd b/skimage/rank/_core16p.pxd index bf50ca35..484a6a6b 100644 --- a/skimage/rank/_core16p.pxd +++ b/skimage/rank/_core16p.pxd @@ -88,9 +88,17 @@ char shift_x, char shift_y,int bitdepth, float p0, float p1): # allocate memory with malloc cdef int max_se = srows*scols + + # number of element in each attack border cdef int n_se_n, n_se_s, n_se_e, n_se_w + # the current local histogram distribution cdef int* histo = malloc(maxbin * sizeof(int)) + + # these lists contain the relative pixel row and column for each of the 4 attack borders + # east, west, north and south + # e.g. se_e_r lists the rows of the east structuring element border + cdef int* se_e_r = malloc(max_se * sizeof(int)) cdef int* se_e_c = malloc(max_se * sizeof(int)) cdef int* se_w_r = malloc(max_se * sizeof(int)) diff --git a/skimage/rank/_core8.pxd b/skimage/rank/_core8.pxd index ece629c5..325f779d 100644 --- a/skimage/rank/_core8.pxd +++ b/skimage/rank/_core8.pxd @@ -81,9 +81,17 @@ char shift_x, char shift_y): # allocate memory with malloc cdef int max_se = srows*scols + + # number of element in each attack border cdef int n_se_n, n_se_s, n_se_e, n_se_w + # the current local histogram distribution cdef int* histo = malloc(256 * sizeof(int)) + + # these lists contain the relative pixel row and column for each of the 4 attack borders + # east, west, north and south + # e.g. se_e_r lists the rows of the east structuring element border + cdef int* se_e_r = malloc(max_se * sizeof(int)) cdef int* se_e_c = malloc(max_se * sizeof(int)) cdef int* se_w_r = malloc(max_se * sizeof(int)) diff --git a/skimage/rank/_core8p.pxd b/skimage/rank/_core8p.pxd index 675c4a5d..5fa278d5 100644 --- a/skimage/rank/_core8p.pxd +++ b/skimage/rank/_core8p.pxd @@ -78,9 +78,17 @@ char shift_x, char shift_y, float p0, float p1): # allocate memory with malloc cdef int max_se = srows*scols + + # number of element in each attack border cdef int n_se_n, n_se_s, n_se_e, n_se_w + # the current local histogram distribution cdef int* histo = malloc(256 * sizeof(int)) + + # these lists contain the relative pixel row and column for each of the 4 attack borders + # east, west, north and south + # e.g. se_e_r lists the rows of the east structuring element border + cdef int* se_e_r = malloc(max_se * sizeof(int)) cdef int* se_e_c = malloc(max_se * sizeof(int)) cdef int* se_w_r = malloc(max_se * sizeof(int))