[Scipy-svn] r4130 - trunk/scipy/ndimage/src/segment

scipy-svn@scip... scipy-svn@scip...
Thu Apr 10 21:17:20 CDT 2008


Author: tom.waite
Date: 2008-04-10 21:17:16 -0500 (Thu, 10 Apr 2008)
New Revision: 4130

Modified:
   trunk/scipy/ndimage/src/segment/Segmenter_EXT.c
Log:
Updates to region growing code

Modified: trunk/scipy/ndimage/src/segment/Segmenter_EXT.c
===================================================================
--- trunk/scipy/ndimage/src/segment/Segmenter_EXT.c	2008-04-11 02:16:58 UTC (rev 4129)
+++ trunk/scipy/ndimage/src/segment/Segmenter_EXT.c	2008-04-11 02:17:16 UTC (rev 4130)
@@ -605,17 +605,16 @@
     objStruct *newgrow_ROI;
 
     if(!PyArg_ParseTuple(args, "OOOOdii", &sArray, &lArray, &eArray, &nArray, &cutoff,
-			 &Label, &N_connectivity))
+			 &Label, &N_connectivity)){
+            printf("PyArg_ParseTuple error\n");
 	    goto exit;
+    }
 
-    if(!PyArray_ISCONTIGUOUS(sArray) || !PyArray_ISCONTIGUOUS(lArray))
+    if(!PyArray_ISCONTIGUOUS(sArray) || !PyArray_ISCONTIGUOUS(sArray)){
+            printf("PyArray_ISCONTIGUOUS error\n");
 	    goto exit;
+    }
 
-    	//
-	//   PyArray_ContiguousFromObject or PyArray_ContiguousFromAny to be explored 
-	//   for non-contiguous
-	//
-
     section = (double *)PyArray_DATA(sArray);
     nd      = PyArray_NDIM(sArray);
     dims    = PyArray_DIMS(sArray);
@@ -646,7 +645,7 @@
 
 static PyMethodDef SegmenterMethods[] =
 {
-    { "grow_region",          Segmenter_GrowRegion,         METH_VARARGS, NULL },
+    { "region_grow",          Segmenter_GrowRegion,         METH_VARARGS, NULL },
     { "roi_co_occurence",     Segmenter_RoiCoOccurence,     METH_VARARGS, NULL },
     { "binary_edge",          Segmenter_BinaryEdge,         METH_VARARGS, NULL },
     { "laws_texture_metric",  Segmenter_LawsTextureMetric,  METH_VARARGS, NULL },



More information about the Scipy-svn mailing list