Changeset 31332
- Timestamp:
- Apr 21, 2011, 10:47:55 AM (15 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
pmFootprintAssignPeaks.c (modified) (2 diffs)
-
pmFootprintIDs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmFootprintAssignPeaks.c
r31153 r31332 35 35 assert (peaks->n == 0 || psMemCheckPeak(peaks->data[0])); 36 36 37 if (footprints->n == 0) { 38 if (peaks->n > 0) { 39 return psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Your list of footprints is empty"); 40 } 37 if ((footprints->n == 0) && (peaks->n == 0)) { 41 38 return PS_ERR_NONE; 42 39 } 40 43 41 /* 44 42 * Create an image filled with the object IDs, and use it to assign pmPeaks to the … … 59 57 60 58 if (ids) { assert (x >= 0 && x < numCols && y >= 0 && y < numRows);} 61 int id = ids ? ids->data.S32[y][x - col0] : 0; 62 // XXX I think the '[x - col0]' above is just wrong (should be [x], but never gets triggerd. 59 int id = ids ? ids->data.S32[y][x] : 0; 63 60 64 61 if (id == 0) { // peak isn't in a footprint, so make one for it -
trunk/psModules/src/objects/pmFootprintIDs.c
r31153 r31332 66 66 67 67 if (footprints->n == 0) { 68 // XXX this was an error, but is an allowed condition -- NULL returned image means no footprints for any peaks69 // psError(PS_ERR_BAD_PARAMETER_SIZE, true, "You didn't provide any footprints");70 68 return NULL; 71 69 }
Note:
See TracChangeset
for help on using the changeset viewer.
