Changeset 1022
- Timestamp:
- Jun 14, 2004, 9:40:15 AM (22 years ago)
- Location:
- trunk/psLib
- Files:
-
- 17 edited
-
src/dataManip/psFunctions.c (modified) (5 diffs)
-
src/dataManip/psMinimize.c (modified) (2 diffs)
-
src/dataManip/psStats.c (modified) (11 diffs)
-
src/image/psImageStats.c (modified) (20 diffs)
-
src/image/psImageStats.h (modified) (1 diff)
-
src/imageops/psImageStats.c (modified) (20 diffs)
-
src/imageops/psImageStats.h (modified) (1 diff)
-
src/math/psMinimize.c (modified) (2 diffs)
-
src/math/psPolynomial.c (modified) (5 diffs)
-
src/math/psSpline.c (modified) (5 diffs)
-
src/math/psStats.c (modified) (11 diffs)
-
src/sys/psLogMsg.c (modified) (2 diffs)
-
src/sysUtils/psLogMsg.c (modified) (2 diffs)
-
test/image/tst_psImageStats02.c (modified) (4 diffs)
-
test/sysUtils/tst_psHash02.c (modified) (1 diff)
-
test/sysUtils/tst_psHash03.c (modified) (2 diffs)
-
test/sysUtils/tst_psLogMsg02.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFunctions.c
r1020 r1022 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-06-14 19: 32:42$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-06-14 19:40:14 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 73 73 Gaussian distribution as well. 74 74 75 GUS: There is no way to seed the random generator.75 NOTE: There is no way to seed the random generator. 76 76 *****************************************************************************/ 77 77 psVector *psGaussianDev(float mean, … … 94 94 } 95 95 96 // GUS: Should I free r as well?96 // NOTE: Should I free r as well? 97 97 return(gauss); 98 98 } … … 320 320 float xSum = 1.0; 321 321 322 // GUS: Do we want to flag this case?322 // NOTE: Do we want to flag this case? 323 323 if (myPoly->n == 0) { 324 324 return(1.0); … … 646 646 double xSum = 1.0; 647 647 648 // GUS: Do we want to flag this case?648 // NOTE: Do we want to flag this case? 649 649 if (myPoly->n == 0) { 650 650 return(1.0); -
trunk/psLib/src/dataManip/psMinimize.c
r845 r1022 15 15 #include "float.h" 16 16 #include <math.h> 17 // GUS: rewrite so there is no maximum order for the polynomials.17 // NOTE: rewrite so there is no maximum order for the polynomials. 18 18 #define MAX_POLY_ORDER 10 19 19 #define MAX_POLYNOMIAL_TERMS (((MAX_POLY_ORDER+1) * (MAX_POLY_ORDER + 2)) / 2) … … 243 243 } 244 244 col[j] = 1.0; 245 // GUS: substitue the LUD rotine245 // NOTE: substitue the LUD rotine 246 246 // lubksb(A, N, indx, col); 247 247 for(i=1;i<=N;i++) { -
trunk/psLib/src/dataManip/psStats.c
r1020 r1022 95 95 float binSize = 0.0; // The histogram bin size 96 96 97 // GUS: Verify that this is the correct action.97 // NOTE: Verify that this is the correct action. 98 98 if (n == 0) { 99 99 return(NULL); 100 100 } 101 101 102 // GUS: Verify that this is the correct action.102 // NOTE: Verify that this is the correct action. 103 103 if (lower > upper) { 104 104 return(NULL); … … 146 146 int i; // Loop index variable 147 147 148 // GUS: Verify that this is the correct action.148 // NOTE: Verify that this is the correct action. 149 149 if (bounds == NULL) { 150 150 // psAbort(__func__, "psHistogram requested with NULL bounds"); … … 152 152 } 153 153 154 // GUS: Verify that this is the correct action.154 // NOTE: Verify that this is the correct action. 155 155 if (bounds->n <= 1) { 156 156 // psAbort(__func__, "psHistogram requested with NULL bounds"); … … 215 215 int numBins = 0; // The total number of bins 216 216 217 // GUS: Verify that this is the correct action.217 // NOTE: Verify that this is the correct action. 218 218 if (out == NULL) { 219 219 return(NULL); 220 220 } 221 221 222 // GUS: Verify that this is the correct action.222 // NOTE: Verify that this is the correct action. 223 223 if (in == NULL) { 224 224 return(out); … … 240 240 } 241 241 } 242 // GUS: determine the correct action for a variety of other cases:242 // NOTE: determine the correct action for a variety of other cases: 243 243 // in vector has 0 elements, and histogram structure has zero bins. 244 244 … … 268 268 // bin number requires a bit more work. 269 269 } else { 270 // GUS: This is slow. Put a smarter algorithm here to270 // NOTE: This is slow. Put a smarter algorithm here to 271 271 // find the correct bin number (bin search, probably) 272 272 for (j=0;j<(out->bounds->n)-1;j++) { … … 841 841 psVectorFree(unsortedVector); 842 842 psVectorFree(sortedVector); 843 // GUS: This is the843 // NOTE: This is the 844 844 } 845 845 … … 950 950 951 951 // Fit a Gaussian to the bins in the range MODE-dL to Mode+dL 952 // GUS: This step is dependent on the functions in psMinimize.c being952 // NOTE: This step is dependent on the functions in psMinimize.c being 953 953 // implemented. Currently, they are not. 954 954 … … 1122 1122 1123 1123 // 1. Compute the sample median. 1124 // GUS: This seems odd. Verify with IfA that we want to calculate the1124 // NOTE: This seems odd. Verify with IfA that we want to calculate the 1125 1125 // median here, not the mean. 1126 1126 p_psVectorSampleMedian(myVector, maskVector, maskVal, stats); … … 1198 1198 unsigned int maskVal) 1199 1199 { 1200 // GUS: Verify that this is the correct action.1200 // NOTE: Verify that this is the correct action. 1201 1201 if (in == NULL) { 1202 1202 return(stats); … … 1237 1237 1238 1238 // ************************************************************************ 1239 // GUS: The Stdev calculation requires the mean. Should we assume the1239 // NOTE: The Stdev calculation requires the mean. Should we assume the 1240 1240 // mean has already been calculated? Or should we always calculate it? 1241 1241 if (stats->options & PS_STAT_SAMPLE_STDEV) { -
trunk/psLib/src/image/psImageStats.c
r896 r1022 19 19 /// This routine must determine the various statistics for the image. 20 20 /***************************************************************************** 21 GUS: verify that image/mask have the correct types, and sizes.21 NOTE: verify that image/mask have the correct types, and sizes. 22 22 *****************************************************************************/ 23 23 psStats *psImageStats(psStats *stats, … … 32 32 int j = 0; 33 33 34 // GUS: Verify this action.34 // NOTE: Verify this action. 35 35 if ((stats == NULL) || 36 36 (in == NULL)) { 37 37 return(NULL); 38 38 } 39 // GUS: Verify this action.39 // NOTE: Verify this action. 40 40 if (stats->options == 0) { 41 41 return(stats); … … 52 52 53 53 if (mask != NULL) { 54 // GUS: verify that mask data is PS_TYPE_U8.55 // GUS: figure out mask types54 // NOTE: verify that mask data is PS_TYPE_U8. 55 // NOTE: figure out mask types 56 56 57 57 junkMask = psVectorAlloc(mask->numRows * mask->numCols, 58 58 mask->type.type); 59 59 junkMask->n = junkMask->nalloc; 60 // GUS: Is there a more efficient way to do this?60 // NOTE: Is there a more efficient way to do this? 61 61 ptr=0; 62 62 for (i=0;i<mask->numRows;i++) { … … 78 78 NOTE: We assume that the psHistogram structure out has already been 79 79 allocated and initialized. 80 GUS: verify that image/mask have the, correct types and sizes.80 NOTE: verify that image/mask have the, correct types and sizes. 81 81 *****************************************************************************/ 82 82 psHistogram *psImageHistogram(psHistogram *out, … … 91 91 int j = 0; 92 92 93 // GUS: Verify this action.93 // NOTE: Verify this action. 94 94 if ((out == NULL) || 95 95 (in == NULL)) { … … 100 100 junkData->n = junkData->nalloc; 101 101 102 // GUS: Is there a more efficient way to do this? memcopy() won't work.102 // NOTE: Is there a more efficient way to do this? memcopy() won't work. 103 103 // Can we trick the junkData structure to use the image buffer, then 104 104 // untrick it before we deallocate it (so we won't deallocate that buffer 105 105 // twice? 106 106 107 // GUS: Make sure you have the numRows/NumCols in the right place.107 // NOTE: Make sure you have the numRows/NumCols in the right place. 108 108 ptr=0; 109 109 for (i=0;i<in->numRows;i++) { … … 114 114 115 115 if (mask != NULL) { 116 // GUS: verify that mask data is PS_TYPE_U8.117 // GUS: figure out mask types116 // NOTE: verify that mask data is PS_TYPE_U8. 117 // NOTE: figure out mask types 118 118 119 119 junkMask = psVectorAlloc(mask->numRows * mask->numCols, … … 121 121 junkMask->n = junkMask->nalloc; 122 122 123 // GUS: Is there a more efficient way to do this?123 // NOTE: Is there a more efficient way to do this? 124 124 ptr=0; 125 125 for (i=0;i<mask->numRows;i++) { … … 137 137 return(out); 138 138 } 139 140 float *p_psCalcScaleFactorsFit(int n) 141 { 142 int i = 0; 143 float tmp = 0.0; 144 float *scalingFactors = (float *) psAlloc(n * sizeof(float)); 145 146 for (i=0;i<n;i++) { 147 // ((2.0 * (float) i) / ((float) (n-1))) - 1.0; 148 // tmp = (float) (i + 1); 149 tmp = (float) (n - i); 150 tmp = (M_PI * (tmp - 0.5)) / ((float) n); 151 scalingFactors[i] = cos(tmp); 152 } 153 154 return(scalingFactors); 155 } 156 157 float *p_psCalcScaleFactorsEval(int n) 158 { 159 return p_psCalcScaleFactorsFit(n); 160 161 int i = 0; 162 // float tmp = 0.0; 163 float *scalingFactors = (float *) psAlloc(n * sizeof(float)); 164 for (i=0;i<n;i++) { 165 // scalingFactors[i] = ((2.0 * (float) i) / ((float) (n-1))) - 1.0; 166 tmp = (float) (i + 1); 167 tmp = (M_PI * (tmp - 0.5)) / ((float) n); 168 scalingFactors[i] = cos(tmp); 169 } 170 return(scalingFactors); 171 } 172 173 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly) 174 { 175 psPolynomial1D **chebPolys = NULL; 176 int i = 0; 177 int j = 0; 178 179 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * 180 sizeof(psPolynomial1D *)); 181 for (i=0;i<maxChebyPoly;i++) { 182 chebPolys[i] = psPolynomial1DAlloc(i+1); 183 } 184 185 // Create the Chebyshev polynomials. Polynomial i has i-th order. 186 chebPolys[0]->coeff[0] = 1; 187 chebPolys[1]->coeff[1] = 1; 188 for (i=2;i<maxChebyPoly;i++) { 189 for (j=0;j<chebPolys[i-1]->n;j++) { 190 chebPolys[i]->coeff[j+1] = 2 * chebPolys[i-1]->coeff[j]; 191 } 192 for (j=0;j<chebPolys[i-2]->n;j++) { 193 chebPolys[i]->coeff[j]-= chebPolys[i-2]->coeff[j]; 194 } 195 } 196 197 return(chebPolys); 198 } 199 139 200 140 201 /***************************************************************************** … … 146 207 Output: 147 208 Internal Data Structures: 209 148 210 chebPolys[i][j] 149 sums[i][j] 211 212 sums[i][j]: This will contain the sum of 213 input->data.F32[x][y] * 214 psEvalPolynomial1D((float) x, chebPolys[i]) * 215 psEvalPolynomial1D((float) y, chebPolys[j]); 216 over all pixels (x,y) in the image. 217 218 150 219 *****************************************************************************/ 151 220 psPolynomial2D * … … 153 222 psPolynomial2D *coeffs) 154 223 { 224 int k = 0; 225 int l = 0; 155 226 int x = 0; 156 227 int y = 0; … … 160 231 psPolynomial1D **chebPolys = NULL; 161 232 int maxChebyPoly = 0; 162 233 float *cScalingFactors = NULL; 234 float *rScalingFactors = NULL; 235 float tmp = 0.0; 163 236 164 237 // Create the sums[][] data structure. This will hold the LHS of equation 165 238 // 29 in the ADD: sums[k][l] = SUM { image(x,y) * Tk(x) * Tl(y) } 166 167 239 sums = (float **) psAlloc(coeffs->nX * sizeof(float *)); 168 240 for (i=0;i<coeffs->nX;i++) { 169 241 sums[i] = (float *) psAlloc(coeffs->nY * sizeof(float)); 170 242 } 171 for (i=0;i<coeffs->nX;i++) { 172 for (j=0;j<coeffs->nY;j++) { 173 sums[i][j] = 0.0; 174 } 175 } 243 244 // We scale the pixel positions to values between -1.0 and 1.0 245 cScalingFactors = p_psCalcScaleFactorsFit(input->numRows); 246 rScalingFactors = p_psCalcScaleFactorsFit(input->numCols); 176 247 177 248 // Determine how many Chebyshev polynomials are needed, then create them. … … 180 251 maxChebyPoly = coeffs->nY; 181 252 } 182 183 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * 184 sizeof(psPolynomial1D *)); 185 for (i=0;i<maxChebyPoly;i++) { 186 chebPolys[i] = psPolynomial1DAlloc(i); 187 } 188 189 // Create the Chebyshev polynomials 190 chebPolys[1]->coeff[0] = 1; 191 for (i=2;i<maxChebyPoly;i++) { 192 for (j=0;j<chebPolys[i-1]->n;j++) { 193 chebPolys[i]->coeff[j+1] = 2 * chebPolys[i-1]->coeff[j]; 194 } 195 for (j=0;j<chebPolys[i-2]->n;j++) { 196 chebPolys[i]->coeff[j]-= chebPolys[i-2]->coeff[j]; 197 } 198 } 199 200 for (x=0;x<input->numRows;x++) { 201 for (y=0;y<input->numCols;y++) { 202 for (i=0;i<coeffs->nX;i++) { 203 for (j=0;j<coeffs->nY;j++) { 253 chebPolys = p_psCreateChebyshevPolys(maxChebyPoly); 254 255 // Sanity check for the Chebyshevs 256 for (i=0;i<coeffs->nX;i++) { 257 for (j=0;j<coeffs->nY;j++) { 258 tmp = 0.0; 259 for (x=0;x<input->numRows;x++) { 260 tmp+= psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 261 psEvalPolynomial1D(rScalingFactors[x], chebPolys[j]); 262 263 } 264 } 265 } 266 267 for (i=0;i<coeffs->nX;i++) { 268 for (j=0;j<coeffs->nY;j++) { 269 sums[i][j] = 0.0; 270 for (x=0;x<input->numRows;x++) { 271 for (y=0;y<input->numCols;y++) { 204 272 sums[i][j]+= input->data.F32[x][y] * 205 psEvalPolynomial1D((float) x, chebPolys[i]) * 206 psEvalPolynomial1D((float) y, chebPolys[j]); 207 273 psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 274 psEvalPolynomial1D(cScalingFactors[y], chebPolys[j]); 208 275 } 209 276 } … … 211 278 } 212 279 213 // GUS: Check the math on this at a later date.214 coeffs->coeff[0][0] = sums[0][0] / ( coeffs->nX * coeffs->nY);215 for (i=0;i<coeffs->nX;i++) { 216 coeffs->coeff[i][0] = 0.5 *217 ((sums[i][0] * 4.0) / (coeffs->nX * coeffs->nY)) -218 (2.0 * coeffs->coeff[0][0]);280 // NOTE: Check the math on this at a later date. 281 coeffs->coeff[0][0] = sums[0][0] / ((float) (coeffs->nX * coeffs->nY)); 282 for (i=0;i<coeffs->nX;i++) { 283 coeffs->coeff[i][0] = ((sums[i][0] * 2.0) / 284 ((float) (coeffs->nX * coeffs->nY))) - 285 coeffs->coeff[0][0]; 219 286 } 220 287 for (j=0;j<coeffs->nY;j++) { 221 coeffs->coeff[0][j] = 0.5 * 222 ((sums[0][j] * 4.0) / (coeffs->nX * coeffs->nY)) - 223 (2.0 * coeffs->coeff[0][0]); 288 coeffs->coeff[0][j] = 289 ((sums[0][j] * 2.0) / 290 ((float) (coeffs->nX * coeffs->nY))) - 291 coeffs->coeff[0][0]; 224 292 } 225 293 for (i=1;i<coeffs->nX;i++) { 226 294 for (j=1;j<coeffs->nY;j++) { 227 295 coeffs->coeff[i][j] = 228 (sums[i][0] * 4.0) / (coeffs->nX * coeffs->nY) - 229 coeffs->coeff[0][0] - 230 coeffs->coeff[i][0] - 231 coeffs->coeff[0][j]; 232 } 233 } 296 ((sums[i][0] * 4.0) / ((float) (coeffs->nX * coeffs->nY))) - 297 (coeffs->coeff[0][0] + 298 coeffs->coeff[i][0] + 299 coeffs->coeff[0][j]); 300 } 301 } 302 303 for (k=0;k<coeffs->nX;k++) { 304 for (l=0;l<coeffs->nY;l++) { 305 tmp = 0.0; 306 for (i=0;i<coeffs->nX;i++) { 307 for (j=0;j<coeffs->nY;j++) { 308 for (x=0;x<input->numRows;x++) { 309 for (y=0;y<input->numCols;y++) { 310 tmp+= (coeffs->coeff[i][j] * 311 psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 312 psEvalPolynomial1D(rScalingFactors[y], chebPolys[j]) * 313 psEvalPolynomial1D(rScalingFactors[x], chebPolys[k]) * 314 psEvalPolynomial1D(rScalingFactors[y], chebPolys[l])); 315 316 } 317 } 318 } 319 } 320 } 321 } 322 234 323 235 324 // Free the Chebyshev polynomials that were created in this routine. … … 244 333 } 245 334 psFree(sums); 335 psFree(cScalingFactors); 336 psFree(rScalingFactors); 246 337 247 338 return(coeffs); … … 255 346 const psPolynomial2D *coeffs) 256 347 { 257 int i = 0;258 int j = 0;259 348 int x = 0; 260 349 int y = 0; 350 int i = 0; 351 int j = 0; 261 352 float **sums = NULL; 262 353 psPolynomial1D **chebPolys = NULL; 263 354 int maxChebyPoly = 0; 355 float *cScalingFactors = NULL; 356 float *rScalingFactors = NULL; 264 357 float polySum = 0.0; 265 358 … … 275 368 } 276 369 } 370 371 // We scale the pixel positions to values between -1.0 and 1.0 372 cScalingFactors = p_psCalcScaleFactorsEval(input->numRows); 373 rScalingFactors = p_psCalcScaleFactorsEval(input->numCols); 277 374 278 375 // Determine how many Chebyshev polynomials are needed, then create them. … … 282 379 } 283 380 284 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * 285 sizeof(psPolynomial1D *)); 286 for (i=0;i<maxChebyPoly;i++) { 287 chebPolys[i] = psPolynomial1DAlloc(i); 288 } 289 290 // Create the Chebyshev polynomials 291 chebPolys[1]->coeff[0] = 1; 292 for (i=2;i<maxChebyPoly;i++) { 293 for (j=0;j<chebPolys[i-1]->n;j++) { 294 chebPolys[i]->coeff[j+1] = 2 * chebPolys[i-1]->coeff[j]; 295 } 296 for (j=0;j<chebPolys[i-2]->n;j++) { 297 chebPolys[i]->coeff[j]-= chebPolys[i-2]->coeff[j]; 298 } 299 } 381 chebPolys = p_psCreateChebyshevPolys(maxChebyPoly); 300 382 301 383 for (x=0;x<input->numRows;x++) { … … 304 386 for (i=0;i<coeffs->nX;i++) { 305 387 for (j=0;j<coeffs->nY;j++) { 306 polySum+= psEvalPolynomial1D( (float)x, chebPolys[i]) *307 psEvalPolynomial1D( (float)y, chebPolys[j]) *388 polySum+= psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 389 psEvalPolynomial1D(cScalingFactors[y], chebPolys[j]) * 308 390 coeffs->coeff[i][j]; 391 309 392 } 310 393 } … … 324 407 } 325 408 psFree(sums); 409 psFree(cScalingFactors); 410 psFree(rScalingFactors); 326 411 327 412 return(0); -
trunk/psLib/src/image/psImageStats.h
r797 r1022 1 /** @file psImageStats.h 2 * \brief Routines for calculating statistics on images. 3 * \ingroup Stats 4 * @ingroup Stats 5 * 6 * This file will hold the prototypes for procedures which calculate 7 * statistic on images, histograms on images, and fit/evaluate Chebyshev 8 * polynomials to images. 9 * 10 * @author George Gusciora, MHPCC 11 * 12 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-06-14 19:40:14 $ 14 * 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 16 */ 1 17 #if !defined(PS_IMAGE_STATS_H) 2 18 #define PS_IMAGE_STATS_H 19 20 3 21 #include "psVector.h" 4 22 #include "psImage.h" -
trunk/psLib/src/imageops/psImageStats.c
r896 r1022 19 19 /// This routine must determine the various statistics for the image. 20 20 /***************************************************************************** 21 GUS: verify that image/mask have the correct types, and sizes.21 NOTE: verify that image/mask have the correct types, and sizes. 22 22 *****************************************************************************/ 23 23 psStats *psImageStats(psStats *stats, … … 32 32 int j = 0; 33 33 34 // GUS: Verify this action.34 // NOTE: Verify this action. 35 35 if ((stats == NULL) || 36 36 (in == NULL)) { 37 37 return(NULL); 38 38 } 39 // GUS: Verify this action.39 // NOTE: Verify this action. 40 40 if (stats->options == 0) { 41 41 return(stats); … … 52 52 53 53 if (mask != NULL) { 54 // GUS: verify that mask data is PS_TYPE_U8.55 // GUS: figure out mask types54 // NOTE: verify that mask data is PS_TYPE_U8. 55 // NOTE: figure out mask types 56 56 57 57 junkMask = psVectorAlloc(mask->numRows * mask->numCols, 58 58 mask->type.type); 59 59 junkMask->n = junkMask->nalloc; 60 // GUS: Is there a more efficient way to do this?60 // NOTE: Is there a more efficient way to do this? 61 61 ptr=0; 62 62 for (i=0;i<mask->numRows;i++) { … … 78 78 NOTE: We assume that the psHistogram structure out has already been 79 79 allocated and initialized. 80 GUS: verify that image/mask have the, correct types and sizes.80 NOTE: verify that image/mask have the, correct types and sizes. 81 81 *****************************************************************************/ 82 82 psHistogram *psImageHistogram(psHistogram *out, … … 91 91 int j = 0; 92 92 93 // GUS: Verify this action.93 // NOTE: Verify this action. 94 94 if ((out == NULL) || 95 95 (in == NULL)) { … … 100 100 junkData->n = junkData->nalloc; 101 101 102 // GUS: Is there a more efficient way to do this? memcopy() won't work.102 // NOTE: Is there a more efficient way to do this? memcopy() won't work. 103 103 // Can we trick the junkData structure to use the image buffer, then 104 104 // untrick it before we deallocate it (so we won't deallocate that buffer 105 105 // twice? 106 106 107 // GUS: Make sure you have the numRows/NumCols in the right place.107 // NOTE: Make sure you have the numRows/NumCols in the right place. 108 108 ptr=0; 109 109 for (i=0;i<in->numRows;i++) { … … 114 114 115 115 if (mask != NULL) { 116 // GUS: verify that mask data is PS_TYPE_U8.117 // GUS: figure out mask types116 // NOTE: verify that mask data is PS_TYPE_U8. 117 // NOTE: figure out mask types 118 118 119 119 junkMask = psVectorAlloc(mask->numRows * mask->numCols, … … 121 121 junkMask->n = junkMask->nalloc; 122 122 123 // GUS: Is there a more efficient way to do this?123 // NOTE: Is there a more efficient way to do this? 124 124 ptr=0; 125 125 for (i=0;i<mask->numRows;i++) { … … 137 137 return(out); 138 138 } 139 140 float *p_psCalcScaleFactorsFit(int n) 141 { 142 int i = 0; 143 float tmp = 0.0; 144 float *scalingFactors = (float *) psAlloc(n * sizeof(float)); 145 146 for (i=0;i<n;i++) { 147 // ((2.0 * (float) i) / ((float) (n-1))) - 1.0; 148 // tmp = (float) (i + 1); 149 tmp = (float) (n - i); 150 tmp = (M_PI * (tmp - 0.5)) / ((float) n); 151 scalingFactors[i] = cos(tmp); 152 } 153 154 return(scalingFactors); 155 } 156 157 float *p_psCalcScaleFactorsEval(int n) 158 { 159 return p_psCalcScaleFactorsFit(n); 160 161 int i = 0; 162 // float tmp = 0.0; 163 float *scalingFactors = (float *) psAlloc(n * sizeof(float)); 164 for (i=0;i<n;i++) { 165 // scalingFactors[i] = ((2.0 * (float) i) / ((float) (n-1))) - 1.0; 166 tmp = (float) (i + 1); 167 tmp = (M_PI * (tmp - 0.5)) / ((float) n); 168 scalingFactors[i] = cos(tmp); 169 } 170 return(scalingFactors); 171 } 172 173 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly) 174 { 175 psPolynomial1D **chebPolys = NULL; 176 int i = 0; 177 int j = 0; 178 179 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * 180 sizeof(psPolynomial1D *)); 181 for (i=0;i<maxChebyPoly;i++) { 182 chebPolys[i] = psPolynomial1DAlloc(i+1); 183 } 184 185 // Create the Chebyshev polynomials. Polynomial i has i-th order. 186 chebPolys[0]->coeff[0] = 1; 187 chebPolys[1]->coeff[1] = 1; 188 for (i=2;i<maxChebyPoly;i++) { 189 for (j=0;j<chebPolys[i-1]->n;j++) { 190 chebPolys[i]->coeff[j+1] = 2 * chebPolys[i-1]->coeff[j]; 191 } 192 for (j=0;j<chebPolys[i-2]->n;j++) { 193 chebPolys[i]->coeff[j]-= chebPolys[i-2]->coeff[j]; 194 } 195 } 196 197 return(chebPolys); 198 } 199 139 200 140 201 /***************************************************************************** … … 146 207 Output: 147 208 Internal Data Structures: 209 148 210 chebPolys[i][j] 149 sums[i][j] 211 212 sums[i][j]: This will contain the sum of 213 input->data.F32[x][y] * 214 psEvalPolynomial1D((float) x, chebPolys[i]) * 215 psEvalPolynomial1D((float) y, chebPolys[j]); 216 over all pixels (x,y) in the image. 217 218 150 219 *****************************************************************************/ 151 220 psPolynomial2D * … … 153 222 psPolynomial2D *coeffs) 154 223 { 224 int k = 0; 225 int l = 0; 155 226 int x = 0; 156 227 int y = 0; … … 160 231 psPolynomial1D **chebPolys = NULL; 161 232 int maxChebyPoly = 0; 162 233 float *cScalingFactors = NULL; 234 float *rScalingFactors = NULL; 235 float tmp = 0.0; 163 236 164 237 // Create the sums[][] data structure. This will hold the LHS of equation 165 238 // 29 in the ADD: sums[k][l] = SUM { image(x,y) * Tk(x) * Tl(y) } 166 167 239 sums = (float **) psAlloc(coeffs->nX * sizeof(float *)); 168 240 for (i=0;i<coeffs->nX;i++) { 169 241 sums[i] = (float *) psAlloc(coeffs->nY * sizeof(float)); 170 242 } 171 for (i=0;i<coeffs->nX;i++) { 172 for (j=0;j<coeffs->nY;j++) { 173 sums[i][j] = 0.0; 174 } 175 } 243 244 // We scale the pixel positions to values between -1.0 and 1.0 245 cScalingFactors = p_psCalcScaleFactorsFit(input->numRows); 246 rScalingFactors = p_psCalcScaleFactorsFit(input->numCols); 176 247 177 248 // Determine how many Chebyshev polynomials are needed, then create them. … … 180 251 maxChebyPoly = coeffs->nY; 181 252 } 182 183 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * 184 sizeof(psPolynomial1D *)); 185 for (i=0;i<maxChebyPoly;i++) { 186 chebPolys[i] = psPolynomial1DAlloc(i); 187 } 188 189 // Create the Chebyshev polynomials 190 chebPolys[1]->coeff[0] = 1; 191 for (i=2;i<maxChebyPoly;i++) { 192 for (j=0;j<chebPolys[i-1]->n;j++) { 193 chebPolys[i]->coeff[j+1] = 2 * chebPolys[i-1]->coeff[j]; 194 } 195 for (j=0;j<chebPolys[i-2]->n;j++) { 196 chebPolys[i]->coeff[j]-= chebPolys[i-2]->coeff[j]; 197 } 198 } 199 200 for (x=0;x<input->numRows;x++) { 201 for (y=0;y<input->numCols;y++) { 202 for (i=0;i<coeffs->nX;i++) { 203 for (j=0;j<coeffs->nY;j++) { 253 chebPolys = p_psCreateChebyshevPolys(maxChebyPoly); 254 255 // Sanity check for the Chebyshevs 256 for (i=0;i<coeffs->nX;i++) { 257 for (j=0;j<coeffs->nY;j++) { 258 tmp = 0.0; 259 for (x=0;x<input->numRows;x++) { 260 tmp+= psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 261 psEvalPolynomial1D(rScalingFactors[x], chebPolys[j]); 262 263 } 264 } 265 } 266 267 for (i=0;i<coeffs->nX;i++) { 268 for (j=0;j<coeffs->nY;j++) { 269 sums[i][j] = 0.0; 270 for (x=0;x<input->numRows;x++) { 271 for (y=0;y<input->numCols;y++) { 204 272 sums[i][j]+= input->data.F32[x][y] * 205 psEvalPolynomial1D((float) x, chebPolys[i]) * 206 psEvalPolynomial1D((float) y, chebPolys[j]); 207 273 psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 274 psEvalPolynomial1D(cScalingFactors[y], chebPolys[j]); 208 275 } 209 276 } … … 211 278 } 212 279 213 // GUS: Check the math on this at a later date.214 coeffs->coeff[0][0] = sums[0][0] / ( coeffs->nX * coeffs->nY);215 for (i=0;i<coeffs->nX;i++) { 216 coeffs->coeff[i][0] = 0.5 *217 ((sums[i][0] * 4.0) / (coeffs->nX * coeffs->nY)) -218 (2.0 * coeffs->coeff[0][0]);280 // NOTE: Check the math on this at a later date. 281 coeffs->coeff[0][0] = sums[0][0] / ((float) (coeffs->nX * coeffs->nY)); 282 for (i=0;i<coeffs->nX;i++) { 283 coeffs->coeff[i][0] = ((sums[i][0] * 2.0) / 284 ((float) (coeffs->nX * coeffs->nY))) - 285 coeffs->coeff[0][0]; 219 286 } 220 287 for (j=0;j<coeffs->nY;j++) { 221 coeffs->coeff[0][j] = 0.5 * 222 ((sums[0][j] * 4.0) / (coeffs->nX * coeffs->nY)) - 223 (2.0 * coeffs->coeff[0][0]); 288 coeffs->coeff[0][j] = 289 ((sums[0][j] * 2.0) / 290 ((float) (coeffs->nX * coeffs->nY))) - 291 coeffs->coeff[0][0]; 224 292 } 225 293 for (i=1;i<coeffs->nX;i++) { 226 294 for (j=1;j<coeffs->nY;j++) { 227 295 coeffs->coeff[i][j] = 228 (sums[i][0] * 4.0) / (coeffs->nX * coeffs->nY) - 229 coeffs->coeff[0][0] - 230 coeffs->coeff[i][0] - 231 coeffs->coeff[0][j]; 232 } 233 } 296 ((sums[i][0] * 4.0) / ((float) (coeffs->nX * coeffs->nY))) - 297 (coeffs->coeff[0][0] + 298 coeffs->coeff[i][0] + 299 coeffs->coeff[0][j]); 300 } 301 } 302 303 for (k=0;k<coeffs->nX;k++) { 304 for (l=0;l<coeffs->nY;l++) { 305 tmp = 0.0; 306 for (i=0;i<coeffs->nX;i++) { 307 for (j=0;j<coeffs->nY;j++) { 308 for (x=0;x<input->numRows;x++) { 309 for (y=0;y<input->numCols;y++) { 310 tmp+= (coeffs->coeff[i][j] * 311 psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 312 psEvalPolynomial1D(rScalingFactors[y], chebPolys[j]) * 313 psEvalPolynomial1D(rScalingFactors[x], chebPolys[k]) * 314 psEvalPolynomial1D(rScalingFactors[y], chebPolys[l])); 315 316 } 317 } 318 } 319 } 320 } 321 } 322 234 323 235 324 // Free the Chebyshev polynomials that were created in this routine. … … 244 333 } 245 334 psFree(sums); 335 psFree(cScalingFactors); 336 psFree(rScalingFactors); 246 337 247 338 return(coeffs); … … 255 346 const psPolynomial2D *coeffs) 256 347 { 257 int i = 0;258 int j = 0;259 348 int x = 0; 260 349 int y = 0; 350 int i = 0; 351 int j = 0; 261 352 float **sums = NULL; 262 353 psPolynomial1D **chebPolys = NULL; 263 354 int maxChebyPoly = 0; 355 float *cScalingFactors = NULL; 356 float *rScalingFactors = NULL; 264 357 float polySum = 0.0; 265 358 … … 275 368 } 276 369 } 370 371 // We scale the pixel positions to values between -1.0 and 1.0 372 cScalingFactors = p_psCalcScaleFactorsEval(input->numRows); 373 rScalingFactors = p_psCalcScaleFactorsEval(input->numCols); 277 374 278 375 // Determine how many Chebyshev polynomials are needed, then create them. … … 282 379 } 283 380 284 chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * 285 sizeof(psPolynomial1D *)); 286 for (i=0;i<maxChebyPoly;i++) { 287 chebPolys[i] = psPolynomial1DAlloc(i); 288 } 289 290 // Create the Chebyshev polynomials 291 chebPolys[1]->coeff[0] = 1; 292 for (i=2;i<maxChebyPoly;i++) { 293 for (j=0;j<chebPolys[i-1]->n;j++) { 294 chebPolys[i]->coeff[j+1] = 2 * chebPolys[i-1]->coeff[j]; 295 } 296 for (j=0;j<chebPolys[i-2]->n;j++) { 297 chebPolys[i]->coeff[j]-= chebPolys[i-2]->coeff[j]; 298 } 299 } 381 chebPolys = p_psCreateChebyshevPolys(maxChebyPoly); 300 382 301 383 for (x=0;x<input->numRows;x++) { … … 304 386 for (i=0;i<coeffs->nX;i++) { 305 387 for (j=0;j<coeffs->nY;j++) { 306 polySum+= psEvalPolynomial1D( (float)x, chebPolys[i]) *307 psEvalPolynomial1D( (float)y, chebPolys[j]) *388 polySum+= psEvalPolynomial1D(rScalingFactors[x], chebPolys[i]) * 389 psEvalPolynomial1D(cScalingFactors[y], chebPolys[j]) * 308 390 coeffs->coeff[i][j]; 391 309 392 } 310 393 } … … 324 407 } 325 408 psFree(sums); 409 psFree(cScalingFactors); 410 psFree(rScalingFactors); 326 411 327 412 return(0); -
trunk/psLib/src/imageops/psImageStats.h
r797 r1022 1 /** @file psImageStats.h 2 * \brief Routines for calculating statistics on images. 3 * \ingroup Stats 4 * @ingroup Stats 5 * 6 * This file will hold the prototypes for procedures which calculate 7 * statistic on images, histograms on images, and fit/evaluate Chebyshev 8 * polynomials to images. 9 * 10 * @author George Gusciora, MHPCC 11 * 12 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-06-14 19:40:14 $ 14 * 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 16 */ 1 17 #if !defined(PS_IMAGE_STATS_H) 2 18 #define PS_IMAGE_STATS_H 19 20 3 21 #include "psVector.h" 4 22 #include "psImage.h" -
trunk/psLib/src/math/psMinimize.c
r845 r1022 15 15 #include "float.h" 16 16 #include <math.h> 17 // GUS: rewrite so there is no maximum order for the polynomials.17 // NOTE: rewrite so there is no maximum order for the polynomials. 18 18 #define MAX_POLY_ORDER 10 19 19 #define MAX_POLYNOMIAL_TERMS (((MAX_POLY_ORDER+1) * (MAX_POLY_ORDER + 2)) / 2) … … 243 243 } 244 244 col[j] = 1.0; 245 // GUS: substitue the LUD rotine245 // NOTE: substitue the LUD rotine 246 246 // lubksb(A, N, indx, col); 247 247 for(i=1;i<=N;i++) { -
trunk/psLib/src/math/psPolynomial.c
r1020 r1022 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-06-14 19: 32:42$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-06-14 19:40:14 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 73 73 Gaussian distribution as well. 74 74 75 GUS: There is no way to seed the random generator.75 NOTE: There is no way to seed the random generator. 76 76 *****************************************************************************/ 77 77 psVector *psGaussianDev(float mean, … … 94 94 } 95 95 96 // GUS: Should I free r as well?96 // NOTE: Should I free r as well? 97 97 return(gauss); 98 98 } … … 320 320 float xSum = 1.0; 321 321 322 // GUS: Do we want to flag this case?322 // NOTE: Do we want to flag this case? 323 323 if (myPoly->n == 0) { 324 324 return(1.0); … … 646 646 double xSum = 1.0; 647 647 648 // GUS: Do we want to flag this case?648 // NOTE: Do we want to flag this case? 649 649 if (myPoly->n == 0) { 650 650 return(1.0); -
trunk/psLib/src/math/psSpline.c
r1020 r1022 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-06-14 19: 32:42$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-06-14 19:40:14 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 73 73 Gaussian distribution as well. 74 74 75 GUS: There is no way to seed the random generator.75 NOTE: There is no way to seed the random generator. 76 76 *****************************************************************************/ 77 77 psVector *psGaussianDev(float mean, … … 94 94 } 95 95 96 // GUS: Should I free r as well?96 // NOTE: Should I free r as well? 97 97 return(gauss); 98 98 } … … 320 320 float xSum = 1.0; 321 321 322 // GUS: Do we want to flag this case?322 // NOTE: Do we want to flag this case? 323 323 if (myPoly->n == 0) { 324 324 return(1.0); … … 646 646 double xSum = 1.0; 647 647 648 // GUS: Do we want to flag this case?648 // NOTE: Do we want to flag this case? 649 649 if (myPoly->n == 0) { 650 650 return(1.0); -
trunk/psLib/src/math/psStats.c
r1020 r1022 95 95 float binSize = 0.0; // The histogram bin size 96 96 97 // GUS: Verify that this is the correct action.97 // NOTE: Verify that this is the correct action. 98 98 if (n == 0) { 99 99 return(NULL); 100 100 } 101 101 102 // GUS: Verify that this is the correct action.102 // NOTE: Verify that this is the correct action. 103 103 if (lower > upper) { 104 104 return(NULL); … … 146 146 int i; // Loop index variable 147 147 148 // GUS: Verify that this is the correct action.148 // NOTE: Verify that this is the correct action. 149 149 if (bounds == NULL) { 150 150 // psAbort(__func__, "psHistogram requested with NULL bounds"); … … 152 152 } 153 153 154 // GUS: Verify that this is the correct action.154 // NOTE: Verify that this is the correct action. 155 155 if (bounds->n <= 1) { 156 156 // psAbort(__func__, "psHistogram requested with NULL bounds"); … … 215 215 int numBins = 0; // The total number of bins 216 216 217 // GUS: Verify that this is the correct action.217 // NOTE: Verify that this is the correct action. 218 218 if (out == NULL) { 219 219 return(NULL); 220 220 } 221 221 222 // GUS: Verify that this is the correct action.222 // NOTE: Verify that this is the correct action. 223 223 if (in == NULL) { 224 224 return(out); … … 240 240 } 241 241 } 242 // GUS: determine the correct action for a variety of other cases:242 // NOTE: determine the correct action for a variety of other cases: 243 243 // in vector has 0 elements, and histogram structure has zero bins. 244 244 … … 268 268 // bin number requires a bit more work. 269 269 } else { 270 // GUS: This is slow. Put a smarter algorithm here to270 // NOTE: This is slow. Put a smarter algorithm here to 271 271 // find the correct bin number (bin search, probably) 272 272 for (j=0;j<(out->bounds->n)-1;j++) { … … 841 841 psVectorFree(unsortedVector); 842 842 psVectorFree(sortedVector); 843 // GUS: This is the843 // NOTE: This is the 844 844 } 845 845 … … 950 950 951 951 // Fit a Gaussian to the bins in the range MODE-dL to Mode+dL 952 // GUS: This step is dependent on the functions in psMinimize.c being952 // NOTE: This step is dependent on the functions in psMinimize.c being 953 953 // implemented. Currently, they are not. 954 954 … … 1122 1122 1123 1123 // 1. Compute the sample median. 1124 // GUS: This seems odd. Verify with IfA that we want to calculate the1124 // NOTE: This seems odd. Verify with IfA that we want to calculate the 1125 1125 // median here, not the mean. 1126 1126 p_psVectorSampleMedian(myVector, maskVector, maskVal, stats); … … 1198 1198 unsigned int maskVal) 1199 1199 { 1200 // GUS: Verify that this is the correct action.1200 // NOTE: Verify that this is the correct action. 1201 1201 if (in == NULL) { 1202 1202 return(stats); … … 1237 1237 1238 1238 // ************************************************************************ 1239 // GUS: The Stdev calculation requires the mean. Should we assume the1239 // NOTE: The Stdev calculation requires the mean. Should we assume the 1240 1240 // mean has already been calculated? Or should we always calculate it? 1241 1241 if (stats->options & PS_STAT_SAMPLE_STDEV) { -
trunk/psLib/src/sys/psLogMsg.c
r1013 r1022 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-06-1 2 05:50:01$13 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-06-14 19:40:15 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 105 105 106 106 default: 107 // GUS: Should you log this error properly?107 // NOTE: Should you log this error properly? 108 108 fprintf(stderr,"Unknown p_psGlobalLogDest: %d (ignored)\n", dest); 109 109 break; -
trunk/psLib/src/sysUtils/psLogMsg.c
r1013 r1022 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-06-1 2 05:50:01$13 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-06-14 19:40:15 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 105 105 106 106 default: 107 // GUS: Should you log this error properly?107 // NOTE: Should you log this error properly? 108 108 fprintf(stderr,"Unknown p_psGlobalLogDest: %d (ignored)\n", dest); 109 109 break; -
trunk/psLib/test/image/tst_psImageStats02.c
r887 r1022 4 4 thouroughly tested elsewhere, we will only test psImageStats() with 5 5 the PS_STAT_SAMPLE_MEAN here. 6 7 NOTE: After you debug, set CHEBY_X_DIM != CHEBY_Y_DIM. 8 Also, uses non-square images. 6 9 *****************************************************************************/ 7 10 #include <stdio.h> … … 11 14 #include "psImage.h" 12 15 #include "psImageStats.h" 13 #define NUM_BINS 20 14 #define IMAGE_SIZE 10 15 #define CHEBY_X_DIM 5 16 #define IMAGE_SIZE 3 17 #define CHEBY_X_DIM 3 16 18 #define CHEBY_Y_DIM 3 17 19 … … 38 40 for (j=0;j<IMAGE_SIZE;j++) { 39 41 tmpImage->data.F32[i][j] = (float) (i + j); 42 tmpImage->data.F32[i][j] = 4.0; 40 43 outImage->data.F32[i][j] = 0.0; 41 }42 }43 for (i=0;i<IMAGE_SIZE;i++) {44 for (j=0;j<IMAGE_SIZE;j++) {45 printf("(%f, %f)\n", tmpImage->data.F32[i][j],46 outImage->data.F32[i][j]);47 44 } 48 45 } … … 72 69 for (i=0;i<IMAGE_SIZE;i++) { 73 70 for (j=0;j<IMAGE_SIZE;j++) { 74 printf("(%f, %f)\n", tmpImage->data.F32[i][j], 71 printf("pixel[%d][%d] is (%f, %f)\n", i, j, 72 tmpImage->data.F32[i][j], 75 73 outImage->data.F32[i][j]); 76 74 } -
trunk/psLib/test/sysUtils/tst_psHash02.c
r892 r1022 3 3 and retrieved correctly. 4 4 5 GUS: Add code to test whether duplicates are handled correctly (use a5 NOTE: Add code to test whether duplicates are handled correctly (use a 6 6 small hash table and lots of keys). 7 7 *****************************************************************************/ -
trunk/psLib/test/sysUtils/tst_psHash03.c
r892 r1022 2 2 This code will test whether hash tables entries can be removed correctly. 3 3 4 GUS: Add code to test whether duplicates are handled correctly.4 NOTE: Add code to test whether duplicates are handled correctly. 5 5 *****************************************************************************/ 6 6 #include <stdio.h> … … 102 102 while (myKeys[i] != NULL) { 103 103 id = psHashRemove(myHashTable, myKeys[i], (void (*)(void *))IdFree); 104 // GUS:The psHashRemove() procedure removes the entry from the hash104 // The psHashRemove() procedure removes the entry from the hash 105 105 // table, but does not delete the data. The following is necessary 106 106 // to delete the data as well (which is returned from the call). -
trunk/psLib/test/sysUtils/tst_psLogMsg02.c
r963 r1022 67 67 testStatus); 68 68 69 70 71 72 printPositiveTestHeader(stdout, 73 "psLogMsg functions", 74 "Output Format"); 75 76 psLogMsg("Under 15 chars", 0, "Hello World!\n"); 77 psLogMsg("This string is more than 15 chars", 0, "Hello World!\n"); 78 psLogMsg(__func__, 0, "Line #1\n"); 79 psLogMsg(__func__, 0, "Line #2\n"); 80 psLogMsg(__func__, 0, "Line #3"); 81 psLogMsg(__func__, 0, "Line #4"); 82 83 printFooter(stdout, 84 "psLogMsg functions", 85 "Output Format", 86 testStatus); 87 88 69 89 if (psMemCheckLeaks(currentId,NULL,NULL) != 0) { 70 90 psAbort(__func__,"Memory Leaks!");
Note:
See TracChangeset
for help on using the changeset viewer.
