Generated by Cython 0.15.1+ on Fri Jan 20 23:22:15 2012
Raw output: relabel.c
1:
2: __author__ = "Jerome Kieffer"
/* "relabel.pyx":2 * * __author__ = "Jerome Kieffer" #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* __contact__ = "Jerome.kieffer@esrf.fr" * __date__ = "20110923" */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____author__, ((PyObject *)__pyx_kp_s_16))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "relabel.pyx":2 * * __author__ = "Jerome Kieffer" #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* __contact__ = "Jerome.kieffer@esrf.fr" * __date__ = "20110923" */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3: __contact__ = "Jerome.kieffer@esrf.fr"
/* "relabel.pyx":3 * * __author__ = "Jerome Kieffer" * __contact__ = "Jerome.kieffer@esrf.fr" #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* __date__ = "20110923" * __status__ = "stable" */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____contact__, ((PyObject *)__pyx_kp_s_17))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4: __date__ = "20110923"
/* "relabel.pyx":4 * __author__ = "Jerome Kieffer" * __contact__ = "Jerome.kieffer@esrf.fr" * __date__ = "20110923" #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* __status__ = "stable" * __license__ = "GPLv3+" */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____date__, ((PyObject *)__pyx_kp_s__20110923))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5: __status__ = "stable"
/* "relabel.pyx":5 * __contact__ = "Jerome.kieffer@esrf.fr" * __date__ = "20110923" * __status__ = "stable" #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* __license__ = "GPLv3+" * import cython */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____status__, ((PyObject *)__pyx_n_s__stable))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6: __license__ = "GPLv3+"
/* "relabel.pyx":6 * __date__ = "20110923" * __status__ = "stable" * __license__ = "GPLv3+" #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* import cython * cimport numpy */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____license__, ((PyObject *)__pyx_kp_s_18))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7: import cython
8: cimport numpy
9: import numpy
/* "relabel.pyx":9 * import cython * cimport numpy * import numpy #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * ctypedef numpy.int64_t DTYPE_int64_t */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__numpy, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10:
11: ctypedef numpy.int64_t DTYPE_int64_t
/* "relabel.pyx":11 * import numpy * * ctypedef numpy.int64_t DTYPE_int64_t #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* ctypedef numpy.float64_t DTYPE_float64_t * @cython.boundscheck(False) */ typedef __pyx_t_5numpy_int64_t __pyx_t_7relabel_DTYPE_int64_t;
12: ctypedef numpy.float64_t DTYPE_float64_t
13: @cython.boundscheck(False)
14: @cython.wraparound(False)
15: def countThem(numpy.ndarray label not None, \
/* "relabel.pyx":15 * @cython.boundscheck(False) * @cython.wraparound(False) * def countThem(numpy.ndarray label not None, \ #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray data not None, \ * numpy.ndarray blured not None): */ static PyObject *__pyx_pf_7relabel_countThem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7relabel_countThem[] = "\n @param label: 2D array containing labeled zones\n @param data: 2D array containing the raw data\n @param blured: 2D array containing the blured data\n @return: 2D arrays containing: \n * count pixels in labelled zone: label == index).sum() \n * max of data in that zone: data[label == index].max()\n * max of blured in that zone: blured[label == index].max()\n * data-blured where data is max. \n "; static PyMethodDef __pyx_mdef_7relabel_countThem = {__Pyx_NAMESTR("countThem"), (PyCFunction)__pyx_pf_7relabel_countThem, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7relabel_countThem)}; static PyObject *__pyx_pf_7relabel_countThem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_label = 0; PyArrayObject *__pyx_v_data = 0; PyArrayObject *__pyx_v_blured = 0; int __pyx_v_maxLabel; PyArrayObject *__pyx_v_clabel = 0; PyArrayObject *__pyx_v_cdata = 0; PyArrayObject *__pyx_v_cblured = 0; PyArrayObject *__pyx_v_count = 0; PyArrayObject *__pyx_v_maxData = 0; PyArrayObject *__pyx_v_maxBlured = 0; PyArrayObject *__pyx_v_maxDelta = 0; long __pyx_v_s; long __pyx_v_i; long __pyx_v_idx; double __pyx_v_d; double __pyx_v_b; Py_buffer __pyx_bstruct_count; Py_ssize_t __pyx_bstride_0_count = 0; Py_ssize_t __pyx_bshape_0_count = 0; Py_buffer __pyx_bstruct_maxData; Py_ssize_t __pyx_bstride_0_maxData = 0; Py_ssize_t __pyx_bshape_0_maxData = 0; Py_buffer __pyx_bstruct_maxDelta; Py_ssize_t __pyx_bstride_0_maxDelta = 0; Py_ssize_t __pyx_bshape_0_maxDelta = 0; Py_buffer __pyx_bstruct_maxBlured; Py_ssize_t __pyx_bstride_0_maxBlured = 0; Py_ssize_t __pyx_bshape_0_maxBlured = 0; Py_buffer __pyx_bstruct_cdata; Py_ssize_t __pyx_bstride_0_cdata = 0; Py_ssize_t __pyx_bshape_0_cdata = 0; Py_buffer __pyx_bstruct_cblured; Py_ssize_t __pyx_bstride_0_cblured = 0; Py_ssize_t __pyx_bshape_0_cblured = 0; Py_buffer __pyx_bstruct_clabel; Py_ssize_t __pyx_bstride_0_clabel = 0; Py_ssize_t __pyx_bshape_0_clabel = 0; PyObject *__pyx_r = NULL; static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__label,&__pyx_n_s__data,&__pyx_n_s__blured,0}; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("countThem"); __pyx_self = __pyx_self; { PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__label); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("countThem", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__blured); if (likely(values[2])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("countThem", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "countThem")<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_label = ((PyArrayObject *)values[0]); __pyx_v_data = ((PyArrayObject *)values[1]); __pyx_v_blured = ((PyArrayObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("countThem", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("relabel.countThem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_bstruct_clabel.buf = NULL; __pyx_bstruct_cdata.buf = NULL; __pyx_bstruct_cblured.buf = NULL; __pyx_bstruct_count.buf = NULL; __pyx_bstruct_maxData.buf = NULL; __pyx_bstruct_maxBlured.buf = NULL; __pyx_bstruct_maxDelta.buf = NULL; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_label), __pyx_ptype_5numpy_ndarray, 0, "label", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 0, "data", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_blured), __pyx_ptype_5numpy_ndarray, 0, "blured", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "relabel.pyx":15 * @cython.boundscheck(False) * @cython.wraparound(False) * def countThem(numpy.ndarray label not None, \ #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray data not None, \ * numpy.ndarray blured not None): */ __pyx_k_tuple_19 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19)); __Pyx_INCREF(((PyObject *)__pyx_n_s__label)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_n_s__label)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__label)); __Pyx_INCREF(((PyObject *)__pyx_n_s__data)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 1, ((PyObject *)__pyx_n_s__data)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data)); __Pyx_INCREF(((PyObject *)__pyx_n_s__blured)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 2, ((PyObject *)__pyx_n_s__blured)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__blured)); __Pyx_INCREF(((PyObject *)__pyx_n_s__maxLabel)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 3, ((PyObject *)__pyx_n_s__maxLabel)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__maxLabel)); __Pyx_INCREF(((PyObject *)__pyx_n_s__clabel)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 4, ((PyObject *)__pyx_n_s__clabel)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clabel)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cdata)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 5, ((PyObject *)__pyx_n_s__cdata)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cdata)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cblured)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 6, ((PyObject *)__pyx_n_s__cblured)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cblured)); __Pyx_INCREF(((PyObject *)__pyx_n_s__count)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 7, ((PyObject *)__pyx_n_s__count)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count)); __Pyx_INCREF(((PyObject *)__pyx_n_s__maxData)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 8, ((PyObject *)__pyx_n_s__maxData)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__maxData)); __Pyx_INCREF(((PyObject *)__pyx_n_s__maxBlured)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 9, ((PyObject *)__pyx_n_s__maxBlured)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__maxBlured)); __Pyx_INCREF(((PyObject *)__pyx_n_s__maxDelta)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 10, ((PyObject *)__pyx_n_s__maxDelta)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__maxDelta)); __Pyx_INCREF(((PyObject *)__pyx_n_s__s)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 11, ((PyObject *)__pyx_n_s__s)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 12, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_INCREF(((PyObject *)__pyx_n_s__idx)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 13, ((PyObject *)__pyx_n_s__idx)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx)); __Pyx_INCREF(((PyObject *)__pyx_n_s__d)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 14, ((PyObject *)__pyx_n_s__d)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d)); __Pyx_INCREF(((PyObject *)__pyx_n_s__b)); PyTuple_SET_ITEM(__pyx_k_tuple_19, 15, ((PyObject *)__pyx_n_s__b)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__b)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); /* "relabel.pyx":15 * @cython.boundscheck(False) * @cython.wraparound(False) * def countThem(numpy.ndarray label not None, \ #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* numpy.ndarray data not None, \ * numpy.ndarray blured not None): */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7relabel_countThem, NULL, __pyx_n_s__relabel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__countThem, __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16: numpy.ndarray data not None, \
17: numpy.ndarray blured not None):
18: """
19: @param label: 2D array containing labeled zones
20: @param data: 2D array containing the raw data
21: @param blured: 2D array containing the blured data
22: @return: 2D arrays containing:
23: * count pixels in labelled zone: label == index).sum()
24: * max of data in that zone: data[label == index].max()
25: * max of blured in that zone: blured[label == index].max()
26: * data-blured where data is max.
27: """
28: cdef int maxLabel = label.max()
/* "relabel.pyx":28 * * data-blured where data is max. * """ * cdef int maxLabel = label.max() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_label), __pyx_n_s__max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_maxLabel = __pyx_t_3;
29: cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten()
/* "relabel.pyx":29 * """ * cdef int maxLabel = label.max() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_label), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_1), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flatten); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_clabel, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_clabel = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_clabel.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_clabel = __pyx_bstruct_clabel.strides[0]; __pyx_bshape_0_clabel = __pyx_bstruct_clabel.shape[0]; } } __pyx_t_4 = 0; __pyx_v_clabel = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "relabel.pyx":29 * """ * cdef int maxLabel = label.max() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() */ __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_1)); __Pyx_INCREF(((PyObject *)__pyx_n_s__int64)); PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, ((PyObject *)__pyx_n_s__int64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));
30: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten()
/* "relabel.pyx":30 * cdef int maxLabel = label.max() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_data), __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__flatten); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cdata, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cdata.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_cdata = __pyx_bstruct_cdata.strides[0]; __pyx_bshape_0_cdata = __pyx_bstruct_cdata.shape[0]; } } __pyx_t_5 = 0; __pyx_v_cdata = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; /* "relabel.pyx":30 * cdef int maxLabel = label.max() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) */ __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_2)); __Pyx_INCREF(((PyObject *)__pyx_n_s__float64)); PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
31: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten()
/* "relabel.pyx":31 * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64) */ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_blured), __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__flatten); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cblured, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cblured = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cblured.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_cblured = __pyx_bstruct_cblured.strides[0]; __pyx_bshape_0_cblured = __pyx_bstruct_cblured.shape[0]; } } __pyx_t_6 = 0; __pyx_v_cblured = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; /* "relabel.pyx":31 * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] clabel = label.astype("int64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64) */ __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_3)); __Pyx_INCREF(((PyObject *)__pyx_n_s__float64)); PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__float64)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));
32: cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64)
/* "relabel.pyx":32 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cdata = data.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxBlured = numpy.zeros(maxLabel + 1, dtype=numpy.float64) */ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyInt_FromLong((__pyx_v_maxLabel + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_count, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_count.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_count = __pyx_bstruct_count.strides[0]; __pyx_bshape_0_count = __pyx_bstruct_count.shape[0]; } } __pyx_t_10 = 0; __pyx_v_count = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0;
33: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64)
/* "relabel.pyx":33 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] cblured = blured.astype("float64").flatten() * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxBlured = numpy.zeros(maxLabel + 1, dtype=numpy.float64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxDelta = numpy.zeros(maxLabel + 1, dtype=numpy.float64) */ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyInt_FromLong((__pyx_v_maxLabel + 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_9)); __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_maxData, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_maxData = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_maxData.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_maxData = __pyx_bstruct_maxData.strides[0]; __pyx_bshape_0_maxData = __pyx_bstruct_maxData.shape[0]; } } __pyx_t_11 = 0; __pyx_v_maxData = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0;
34: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxBlured = numpy.zeros(maxLabel + 1, dtype=numpy.float64)
/* "relabel.pyx":34 * cdef numpy.ndarray[DTYPE_int64_t, ndim = 1] count = numpy.zeros(maxLabel + 1, dtype=numpy.int64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxBlured = numpy.zeros(maxLabel + 1, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxDelta = numpy.zeros(maxLabel + 1, dtype=numpy.float64) * cdef long s , i, idx */ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyInt_FromLong((__pyx_v_maxLabel + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_8)); __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_9, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_maxBlured, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_maxBlured = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_maxBlured.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_maxBlured = __pyx_bstruct_maxBlured.strides[0]; __pyx_bshape_0_maxBlured = __pyx_bstruct_maxBlured.shape[0]; } } __pyx_t_12 = 0; __pyx_v_maxBlured = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0;
35: cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxDelta = numpy.zeros(maxLabel + 1, dtype=numpy.float64)
/* "relabel.pyx":35 * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxData = numpy.zeros(maxLabel + 1, dtype=numpy.float64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxBlured = numpy.zeros(maxLabel + 1, dtype=numpy.float64) * cdef numpy.ndarray[DTYPE_float64_t, ndim = 1] maxDelta = numpy.zeros(maxLabel + 1, dtype=numpy.float64) #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* cdef long s , i, idx * cdef double d, b */ __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyInt_FromLong((__pyx_v_maxLabel + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__float64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_1)<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_maxDelta, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_7relabel_DTYPE_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_maxDelta = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_maxDelta.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_maxDelta = __pyx_bstruct_maxDelta.strides[0]; __pyx_bshape_0_maxDelta = __pyx_bstruct_maxDelta.shape[0]; } } __pyx_t_13 = 0; __pyx_v_maxDelta = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0;
36: cdef long s , i, idx
37: cdef double d, b
38: s = < long > label.size
/* "relabel.pyx":38 * cdef long s , i, idx * cdef double d, b * s =<
long > label.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert s == cdata.size * assert s == cblured.size */ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_label), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = __Pyx_PyInt_AsLong(__pyx_t_1); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_s = ((long)__pyx_t_14);
39: assert s == cdata.size
/* "relabel.pyx":39 * cdef double d, b * s =<
long > label.size * assert s == cdata.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* assert s == cblured.size * for i in range(s): */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_1 = PyInt_FromLong(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_cdata), __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_15)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
40: assert s == cblured.size
/* "relabel.pyx":40 * s =<
long > label.size * assert s == cdata.size * assert s == cblured.size #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for i in range(s): * idx =<
long > clabel[i] */ #ifndef CYTHON_WITHOUT_ASSERTIONS __pyx_t_7 = PyInt_FromLong(__pyx_v_s); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_cblured), __pyx_n_s__size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15<
0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_15)) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #endif
41: for i in range(s):
/* "relabel.pyx":41 * assert s == cdata.size * assert s == cblured.size * for i in range(s): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* idx =<
long > clabel[i] * d =<
double > cdata[i] */ __pyx_t_14 = __pyx_v_s; for (__pyx_t_16 = 0; __pyx_t_16<
__pyx_t_14; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16;
42: idx = < long > clabel[i]
/* "relabel.pyx":42 * assert s == cblured.size * for i in range(s): * idx =<
long > clabel[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* d =<
double > cdata[i] * b =<
double > cblured[i] */ __pyx_t_17 = __pyx_v_i; __pyx_v_idx = ((long)(*__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_int64_t *, __pyx_bstruct_clabel.buf, __pyx_t_17, __pyx_bstride_0_clabel)));
43: d = < double > cdata[i]
/* "relabel.pyx":43 * for i in range(s): * idx =<
long > clabel[i] * d =<
double > cdata[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* b =<
double > cblured[i] * count[idx] += 1 */ __pyx_t_18 = __pyx_v_i; __pyx_v_d = ((double)(*__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_cdata.buf, __pyx_t_18, __pyx_bstride_0_cdata)));
44: b = < double > cblured[i]
/* "relabel.pyx":44 * idx =<
long > clabel[i] * d =<
double > cdata[i] * b =<
double > cblured[i] #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* count[idx] += 1 * if d > maxData[idx]: */ __pyx_t_19 = __pyx_v_i; __pyx_v_b = ((double)(*__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_cblured.buf, __pyx_t_19, __pyx_bstride_0_cblured)));
45: count[idx] += 1
/* "relabel.pyx":45 * d =<
double > cdata[i] * b =<
double > cblured[i] * count[idx] += 1 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if d > maxData[idx]: * maxData[idx] = d */ __pyx_t_20 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_int64_t *, __pyx_bstruct_count.buf, __pyx_t_20, __pyx_bstride_0_count) += 1;
46: if d > maxData[idx]:
/* "relabel.pyx":46 * b =<
double > cblured[i] * count[idx] += 1 * if d > maxData[idx]: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* maxData[idx] = d * maxDelta[idx] = d - b */ __pyx_t_21 = __pyx_v_idx; __pyx_t_15 = (__pyx_v_d > (*__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_maxData.buf, __pyx_t_21, __pyx_bstride_0_maxData))); if (__pyx_t_15) {
47: maxData[idx] = d
/* "relabel.pyx":47 * count[idx] += 1 * if d > maxData[idx]: * maxData[idx] = d #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* maxDelta[idx] = d - b * if b > maxBlured[idx]: */ __pyx_t_22 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_maxData.buf, __pyx_t_22, __pyx_bstride_0_maxData) = __pyx_v_d;
48: maxDelta[idx] = d - b
/* "relabel.pyx":48 * if d > maxData[idx]: * maxData[idx] = d * maxDelta[idx] = d - b #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* if b > maxBlured[idx]: * maxBlured[idx] = b */ __pyx_t_23 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_maxDelta.buf, __pyx_t_23, __pyx_bstride_0_maxDelta) = (__pyx_v_d - __pyx_v_b); goto __pyx_L8; } __pyx_L8:;
49: if b > maxBlured[idx]:
/* "relabel.pyx":49 * maxData[idx] = d * maxDelta[idx] = d - b * if b > maxBlured[idx]: #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* maxBlured[idx] = b * return count, maxData, maxBlured, maxDelta */ __pyx_t_24 = __pyx_v_idx; __pyx_t_15 = (__pyx_v_b > (*__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_maxBlured.buf, __pyx_t_24, __pyx_bstride_0_maxBlured))); if (__pyx_t_15) {
50: maxBlured[idx] = b
/* "relabel.pyx":50 * maxDelta[idx] = d - b * if b > maxBlured[idx]: * maxBlured[idx] = b #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return count, maxData, maxBlured, maxDelta * */ __pyx_t_25 = __pyx_v_idx; *__Pyx_BufPtrStrided1d(__pyx_t_7relabel_DTYPE_float64_t *, __pyx_bstruct_maxBlured.buf, __pyx_t_25, __pyx_bstride_0_maxBlured) = __pyx_v_b; goto __pyx_L9; } __pyx_L9:; }
51: return count, maxData, maxBlured, maxDelta
/* "relabel.pyx":51 * if b > maxBlured[idx]: * maxBlured[idx] = b * return count, maxData, maxBlured, maxDelta #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(((PyObject *)__pyx_v_count)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_count)); __Pyx_GIVEREF(((PyObject *)__pyx_v_count)); __Pyx_INCREF(((PyObject *)__pyx_v_maxData)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_maxData)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maxData)); __Pyx_INCREF(((PyObject *)__pyx_v_maxBlured)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_maxBlured)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maxBlured)); __Pyx_INCREF(((PyObject *)__pyx_v_maxDelta)); PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_maxDelta)); __Pyx_GIVEREF(((PyObject *)__pyx_v_maxDelta)); __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_count); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_maxData); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_maxDelta); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_maxBlured); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cdata); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cblured); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_clabel); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("relabel.countThem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_count); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_maxData); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_maxDelta); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_maxBlured); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cdata); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cblured); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_clabel); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_clabel); __Pyx_XDECREF((PyObject *)__pyx_v_cdata); __Pyx_XDECREF((PyObject *)__pyx_v_cblured); __Pyx_XDECREF((PyObject *)__pyx_v_count); __Pyx_XDECREF((PyObject *)__pyx_v_maxData); __Pyx_XDECREF((PyObject *)__pyx_v_maxBlured); __Pyx_XDECREF((PyObject *)__pyx_v_maxDelta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
52:
53:
54: