Changeset 15619 for trunk/psModules/src/objects/pmSourceContour.c
- Timestamp:
- Nov 14, 2007, 12:15:42 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceContour.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceContour.c
r15562 r15619 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-11-1 0 01:09:20$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-11-14 22:15:42 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 220 220 psArray *pmSourceContour (psImage *image, int xc, int yc, float threshold) 221 221 { 222 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 222 223 PS_ASSERT_PTR_NON_NULL(image, NULL); 223 224 224 225 int xR, yR, x0, x1, x0s, x1s; 225 226 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);227 PS_ASSERT_PTR_NON_NULL(image, false);228 229 226 int x = xc - image->col0; 230 227 int y = yc - image->row0; 231 228 232 229 // the requested point must be within the contour 233 if (image->data.F32[y][x] < threshold) 230 if (image->data.F32[y][x] < threshold) { 234 231 return NULL; 232 } 235 233 236 234 // Ensure that the starting column is allowable. 237 if (x < 0) 235 if (x < 0) { 238 236 return NULL; 239 if (y < 0) 237 } 238 if (y < 0) { 240 239 return NULL; 241 if (x >= image->numCols) 240 } 241 if (x >= image->numCols) { 242 242 return NULL; 243 if (y >= image->numRows) 243 } 244 if (y >= image->numRows) { 244 245 return NULL; 246 } 245 247 246 248 // Allocate data for x/y pairs.
Note:
See TracChangeset
for help on using the changeset viewer.
