Changeset 8246 for trunk/psModules/src/objects/pmPeaks.c
- Timestamp:
- Aug 8, 2006, 4:37:08 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPeaks.c (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPeaks.c
r7604 r8246 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-21 03:21:16$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:07 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 pmPeakType type) 33 33 { 34 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);34 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 35 35 pmPeak *tmpPeak = pmPeakAlloc(col, row, counts, type); 36 36 … … 43 43 // XXX EAM : is this free appropriate? (does psArrayAdd increment memory counter?) 44 44 45 psTrace( __func__, 4, "---- %s() end ----\n", __func__);45 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 46 46 return(list); 47 47 } … … 57 57 psU32 row) 58 58 { 59 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);59 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 60 60 PS_ASSERT_IMAGE_NON_NULL(image, NULL); 61 61 PS_ASSERT_IMAGE_TYPE(image, PS_TYPE_F32, NULL); … … 66 66 } 67 67 tmpVector->n = image->numCols; 68 psTrace( __func__, 4, "---- %s() end ----\n", __func__);68 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 69 69 return(tmpVector); 70 70 } … … 79 79 psS32 y) 80 80 { 81 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);81 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 82 82 if ((x >= valid.x0) && 83 83 (x <= valid.x1) && 84 84 (y >= valid.y0) && 85 85 (y <= valid.y1)) { 86 psTrace( __func__, 4, "---- %s(true) end ----\n", __func__);86 psTrace("psModules.objects", 4, "---- %s(true) end ----\n", __func__); 87 87 return(true); 88 88 } 89 psTrace( __func__, 4, "---- %s(false) end ----\n", __func__);89 psTrace("psModules.objects", 4, "---- %s(false) end ----\n", __func__); 90 90 return(false); 91 91 } … … 102 102 pmPeakType type) 103 103 { 104 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);104 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 105 105 static int id = 1; 106 106 pmPeak *tmp = (pmPeak *) psAlloc(sizeof(pmPeak)); … … 113 113 psMemSetDeallocator(tmp, (psFreeFunc) peakFree); 114 114 115 psTrace( __func__, 3, "---- %s() end ----\n", __func__);115 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 116 116 return(tmp); 117 117 } … … 125 125 int pmPeaksCompareAscend (const void **a, const void **b) 126 126 { 127 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);127 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 128 128 pmPeak *A = *(pmPeak **)a; 129 129 pmPeak *B = *(pmPeak **)b; … … 133 133 diff = A->counts - B->counts; 134 134 if (diff < FLT_EPSILON) { 135 psTrace( __func__, 3, "---- %s(-1) end ----\n", __func__);135 psTrace("psModules.objects", 3, "---- %s(-1) end ----\n", __func__); 136 136 return (-1); 137 137 } else if (diff > FLT_EPSILON) { 138 psTrace( __func__, 3, "---- %s(+1) end ----\n", __func__);138 psTrace("psModules.objects", 3, "---- %s(+1) end ----\n", __func__); 139 139 return (+1); 140 140 } 141 psTrace( __func__, 3, "---- %s(0) end ----\n", __func__);141 psTrace("psModules.objects", 3, "---- %s(0) end ----\n", __func__); 142 142 return (0); 143 143 } … … 146 146 int pmPeaksCompareDescend (const void **a, const void **b) 147 147 { 148 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);148 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 149 149 pmPeak *A = *(pmPeak **)a; 150 150 pmPeak *B = *(pmPeak **)b; … … 154 154 diff = A->counts - B->counts; 155 155 if (diff < FLT_EPSILON) { 156 psTrace( __func__, 3, "---- %s(+1) end ----\n", __func__);156 psTrace("psModules.objects", 3, "---- %s(+1) end ----\n", __func__); 157 157 return (+1); 158 158 } else if (diff > FLT_EPSILON) { 159 psTrace( __func__, 3, "---- %s(-1) end ----\n", __func__);159 psTrace("psModules.objects", 3, "---- %s(-1) end ----\n", __func__); 160 160 return (-1); 161 161 } 162 psTrace( __func__, 3, "---- %s(0) end ----\n", __func__);162 psTrace("psModules.objects", 3, "---- %s(0) end ----\n", __func__); 163 163 return (0); 164 164 } … … 178 178 psF32 threshold) 179 179 { 180 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);180 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 181 181 PS_ASSERT_VECTOR_NON_NULL(vector, NULL); 182 182 PS_ASSERT_VECTOR_NON_EMPTY(vector, NULL); … … 198 198 tmpVector = psVectorAlloc(0, PS_TYPE_U32); 199 199 } 200 psTrace( __func__, 3, "---- %s() end ----\n", __func__);200 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 201 201 return(tmpVector); 202 202 } … … 264 264 } 265 265 266 psTrace( __func__, 3, "---- %s() end ----\n", __func__);266 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 267 267 return(tmpVector); 268 268 } … … 292 292 psF32 threshold) 293 293 { 294 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);294 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 295 295 PS_ASSERT_IMAGE_NON_NULL(image, NULL); 296 296 PS_ASSERT_IMAGE_TYPE(image, PS_TYPE_F32, NULL); 297 297 if ((image->numRows == 1) || (image->numCols == 1)) { 298 298 psError(PS_ERR_UNKNOWN, true, "Currently, input image must have at least 2 rows and 2 columns."); 299 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);299 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 300 300 return(NULL); 301 301 } … … 361 361 // 362 362 if (image->numRows == 1) { 363 psTrace( __func__, 3, "---- %s() end ----\n", __func__);363 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 364 364 return(list); 365 365 } … … 484 484 psFree (tmpRow); 485 485 psFree (row1); 486 psTrace( __func__, 3, "---- %s() end ----\n", __func__);486 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 487 487 return(list); 488 488 } … … 507 507 const psRegion valid) 508 508 { 509 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);509 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 510 510 PS_ASSERT_PTR_NON_NULL(peaks, NULL); 511 511 … … 525 525 } 526 526 527 psTrace( __func__, 3, "---- %s() end ----\n", __func__);527 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 528 528 return(peaks); 529 529 } … … 537 537 const psRegion valid) 538 538 { 539 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);539 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 540 540 PS_ASSERT_PTR_NON_NULL(peaks, NULL); 541 541 … … 553 553 psArrayAdd (output, 200, tmpPeak); 554 554 } 555 psTrace( __func__, 3, "---- %s() end ----\n", __func__);555 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 556 556 return(output); 557 557 }
Note:
See TracChangeset
for help on using the changeset viewer.
