Changeset 8246 for trunk/psModules/src/objects/pmSourceContour.c
- Timestamp:
- Aug 8, 2006, 4:37:08 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceContour.c (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceContour.c
r6943 r8246 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 4-21 21:27:04$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 { 50 50 51 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);51 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 52 52 53 53 // We define variables incr and lastColumn so that we can use the same loop … … 70 70 float value = image->data.F32[y][subCol]; 71 71 if (value <= threshold) { 72 psTrace( __func__, 4, "---- %s() end ----\n", __func__);72 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 73 73 return (subCol); 74 74 } 75 75 subCol += incr; 76 76 } 77 psTrace( __func__, 4, "---- %s() end ----\n", __func__);77 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 78 78 return (lastColumn); 79 79 } … … 89 89 { 90 90 91 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);91 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 92 92 93 93 // We define variables incr and lastColumn so that we can use the same loop … … 109 109 float value = image->data.F32[y][subCol]; 110 110 if (value >= threshold) { 111 psTrace( __func__, 4, "---- %s() end ----\n", __func__);111 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 112 112 if (subCol == x) { 113 113 return (subCol); … … 117 117 subCol += incr; 118 118 } 119 psTrace( __func__, 4, "---- %s() end ----\n", __func__);119 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 120 120 return (lastColumn); 121 121 } … … 139 139 psU32 dir) 140 140 { 141 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);141 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 142 142 // 143 143 // Convert coords to subImage space. … … 149 149 if (!((0 <= subCol) && (subCol < source->pixels->numCols))) { 150 150 psError(PS_ERR_UNKNOWN, true, "Starting column outside subImage range"); 151 psTrace( __func__, 4, "---- %s(NAN) end ----\n", __func__);151 psTrace("psModules.objects", 4, "---- %s(NAN) end ----\n", __func__); 152 152 return(NAN); 153 153 } 154 154 if (!((0 <= subRow) && (subRow < source->pixels->numRows))) { 155 psTrace( __func__, 4, "---- %s(NAN) end ----\n", __func__);155 psTrace("psModules.objects", 4, "---- %s(NAN) end ----\n", __func__); 156 156 psError(PS_ERR_UNKNOWN, true, "Starting row outside subImage range"); 157 157 return(NAN); … … 162 162 psF32 oldValue = pmModelEval(source->modelEXT, source->pixels, subCol, subRow); 163 163 if (oldValue == level) { 164 psTrace( __func__, 4, "---- %s() end ----\n", __func__);164 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 165 165 return(((psF32) (subCol + source->pixels->col0))); 166 166 } … … 184 184 psF32 newValue = pmModelEval(source->modelEXT, source->pixels, subCol, subRow); 185 185 if (oldValue == level) { 186 psTrace( __func__, 4, "---- %s() end ----\n", __func__);186 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 187 187 return((psF32) (subCol + source->pixels->col0)); 188 188 } … … 190 190 if ((newValue <= level) && (level <= oldValue)) { 191 191 // This is simple linear interpolation. 192 psTrace( __func__, 4, "---- %s() end ----\n", __func__);192 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 193 193 return( ((psF32) (subCol + source->pixels->col0)) + ((psF32) incr) * ((level - newValue) / (oldValue - newValue)) ); 194 194 } … … 196 196 if ((oldValue <= level) && (level <= newValue)) { 197 197 // This is simple linear interpolation. 198 psTrace( __func__, 4, "---- %s() end ----\n", __func__);198 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 199 199 return( ((psF32) (subCol + source->pixels->col0)) + ((psF32) incr) * ((level - oldValue) / (newValue - oldValue)) ); 200 200 } … … 203 203 } 204 204 205 psTrace( __func__, 4, "---- %s(NAN) end ----\n", __func__);205 psTrace("psModules.objects", 4, "---- %s(NAN) end ----\n", __func__); 206 206 return(NAN); 207 207 } … … 215 215 int xR, yR, x0, x1, x0s, x1s; 216 216 217 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);217 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 218 218 PS_ASSERT_PTR_NON_NULL(image, false); 219 219 … … 327 327 tmpArray->data[0] = (psPtr *) xVec; 328 328 tmpArray->data[1] = (psPtr *) yVec; 329 psTrace( __func__, 3, "---- %s() end ----\n", __func__);329 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 330 330 return(tmpArray); 331 331 } … … 348 348 psF32 level) 349 349 { 350 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);350 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 351 351 PS_ASSERT_PTR_NON_NULL(source, false); 352 352 PS_ASSERT_PTR_NON_NULL(image, false); … … 379 379 psFree(xVec); 380 380 psFree(yVec); 381 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);381 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 382 382 return(NULL); 383 383 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); … … 392 392 psFree(xVec); 393 393 psFree(yVec); 394 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);394 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 395 395 return(NULL); 396 396 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); 397 397 } 398 psTrace( __func__, 4, "The intercepts are (%.2f, %.2f)\n", leftIntercept, rightIntercept);398 psTrace("psModules.objects", 4, "The intercepts are (%.2f, %.2f)\n", leftIntercept, rightIntercept); 399 399 xVec->data.F32[row+xVec->n] = ((psF32) source->pixels->col0) + rightIntercept; 400 400 … … 417 417 psFree(xVec); 418 418 psFree(yVec); 419 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);419 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 420 420 return(NULL); 421 421 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); … … 429 429 psFree(xVec); 430 430 psFree(yVec); 431 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);431 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 432 432 return(NULL); 433 433 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); … … 447 447 tmpArray->data[0] = (psPtr *) yVec; 448 448 tmpArray->data[1] = (psPtr *) xVec; 449 psTrace( __func__, 3, "---- %s() end ----\n", __func__);449 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 450 450 return(tmpArray); 451 451 }
Note:
See TracChangeset
for help on using the changeset viewer.
