[GRASS-SVN] r52503 - grass-addons/grass7/imagery/i.segment

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 2 06:16:02 PDT 2012


Author: momsen
Date: 2012-08-02 06:16:01 -0700 (Thu, 02 Aug 2012)
New Revision: 52503

Modified:
   grass-addons/grass7/imagery/i.segment/open_files.c
Log:
fixed allocation for iseg SEG, input groups with multiple input bands will now work.

Modified: grass-addons/grass7/imagery/i.segment/open_files.c
===================================================================
--- grass-addons/grass7/imagery/i.segment/open_files.c	2012-08-02 12:27:10 UTC (rev 52502)
+++ grass-addons/grass7/imagery/i.segment/open_files.c	2012-08-02 13:16:01 UTC (rev 52503)
@@ -134,11 +134,11 @@
 
     if (segment_open
 	(&files->iseg_seg, G_tempfile(), files->nrows, files->ncols, srows,
-	 scols, inlen, nseg) != TRUE)
+	 scols, sizeof(int), nseg) != TRUE)
 	G_fatal_error(_("Unable to allocate memory for initial segment ID's"));
     /* NOTE: SEGMENT file should be initialized to zeros for all data. TODO double check this. */
 
-    /* ********  load input bands to segment structure and fill iseg array ******** */
+    /* ********  load input bands to segment structure and fill initial seg ID's ******** */
     G_debug(1, "Reading input rasters into segmentation data files...");
     s = 0;			/* initial segment ID will be 1 */
 



More information about the grass-commit mailing list