Changeset 7999 for trunk/psLib/src/imageops/psImagePixelExtract.c
- Timestamp:
- Jul 27, 2006, 2:44:05 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImagePixelExtract.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelExtract.c
r7125 r7999 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 5-16 23:12:20$10 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-07-28 00:44:05 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 210 210 const psStats* stats) 211 211 { 212 double statVal;213 212 psStats* myStats; 214 213 psElemType type; … … 375 374 } 376 375 377 // verify that the stats struct specifies a 378 // single stats operation379 if ( p_psGetStatValue(stats, &statVal) == false) {376 // verify that the stats struct specifies a single stats operation 377 psStatsOptions statistic = psStatsSingleOption(stats->options); 378 if (statistic == 0) { 380 379 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 381 380 PS_ERRORTEXT_psImage_BAD_STAT,stats->options); … … 439 438 } \ 440 439 myStats = psVectorStats(myStats,imgVec,NULL,maskVec,maskVal); \ 441 (void)p_psGetStatValue(myStats,&statVal); \ 442 *outData = statVal; \ 440 *outData = psStatsGetValue(myStats, statistic); \ 443 441 if (outPosition != NULL) { \ 444 442 outPosition->x = c; \ … … 520 518 } 521 519 myStats = psVectorStats(myStats, imgVec, NULL, maskVec, maskVal); 522 (void)p_psGetStatValue(myStats, &statVal); // we know it works cause we tested it above 523 *outData = statVal; 520 *outData = psStatsGetValue(myStats, statistic); 524 521 if (outPosition != NULL) { 525 522 outPosition->y = r; … … 741 738 const psStats* stats) 742 739 { 743 double statVal;744 745 740 /* check the parameters */ 746 741 … … 808 803 } 809 804 810 // verify that the stats struct specifies a 811 // single stats operation812 if ( p_psGetStatValue(stats, &statVal) == false) {805 // verify that the stats struct specifies a single stats operation 806 psStatsOptions statistic = psStatsSingleOption(stats->options); 807 if (statistic == 0) { 813 808 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 814 809 PS_ERRORTEXT_psImage_BAD_STAT, … … 914 909 for (psS32 r = 0; r < numOut; r++) { 915 910 myStats = psVectorStats(myStats,buffer[r], NULL, bufferMask[r],maskVal); 916 (void)p_psGetStatValue(myStats,&statVal); 917 outData[r] = statVal; 911 outData[r] = psStatsGetValue(myStats, statistic); 918 912 } 919 913
Note:
See TracChangeset
for help on using the changeset viewer.
