Changeset 1292
- Timestamp:
- Jul 23, 2004, 4:00:21 PM (22 years ago)
- Location:
- trunk/psLib
- Files:
-
- 18 edited
-
psLib.kdevelop (modified) (2 diffs)
-
psLib.kdevses (modified) (1 diff)
-
src/dataManip/psFFT.d (modified) (1 diff)
-
src/dataManip/psStats.c (modified) (1 diff)
-
src/dataManip/psStats.h (modified) (2 diffs)
-
src/image/psImageExtraction.c (modified) (6 diffs)
-
src/image/psImageExtraction.d (modified) (1 diff)
-
src/image/psImageExtraction.h (modified) (3 diffs)
-
src/image/psImageManip.c (modified) (7 diffs)
-
src/image/psImageStats.h (modified) (2 diffs)
-
src/imageops/psImageStats.h (modified) (2 diffs)
-
src/math/psStats.c (modified) (1 diff)
-
src/math/psStats.h (modified) (2 diffs)
-
src/pslib.h (modified) (2 diffs)
-
src/sys/psType.h (modified) (2 diffs)
-
src/sysUtils/psType.h (modified) (2 diffs)
-
test/astronomy/builddir/tst_psTime_01.d (modified) (1 diff)
-
test/image/tst_psImageStats03.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/psLib.kdevelop
r1073 r1292 24 24 </run> 25 25 <general> 26 <activedir>src/ dataManip</activedir>26 <activedir>src/image</activedir> 27 27 </general> 28 28 <build> … … 135 135 <tree> 136 136 <hidepatterns>*.o,*.lo,CVS</hidepatterns> 137 <hidenonprojectfiles> false</hidenonprojectfiles>138 <showvcsfields> false</showvcsfields>137 <hidenonprojectfiles>true</hidenonprojectfiles> 138 <showvcsfields>true</showvcsfields> 139 139 </tree> 140 140 </kdevfileview> -
trunk/psLib/psLib.kdevses
r1269 r1292 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments=" 1" >5 <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/ collections/psImage.c" >6 <View0 line="2 95" Type="???" >7 <AdditionalSettings Top="2" Width="12 86" Attach="1" Height="964" Left="2" MinMaxMode="0" />4 <DocsAndViews NumberOfDocuments="6" > 5 <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageExtraction.c" > 6 <View0 line="265" Type="???" > 7 <AdditionalSettings Top="2" Width="1243" Attach="1" Height="827" Left="2" MinMaxMode="0" /> 8 8 </View0> 9 9 </Doc0> 10 <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageExtraction.h" > 11 <View0 line="75" Type="???" > 12 <AdditionalSettings Top="2" Width="1243" Attach="1" Height="827" Left="2" MinMaxMode="0" /> 13 </View0> 14 </Doc1> 15 <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psVector.h" > 16 <View0 line="0" Type="???" > 17 <AdditionalSettings Top="2" Width="1243" Attach="1" Height="827" Left="2" MinMaxMode="0" /> 18 </View0> 19 </Doc2> 20 <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psStats.h" > 21 <View0 line="0" Type="???" > 22 <AdditionalSettings Top="2" Width="1243" Attach="1" Height="827" Left="2" MinMaxMode="0" /> 23 </View0> 24 </Doc3> 25 <Doc4 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageManip.c" > 26 <View0 line="373" Type="???" > 27 <AdditionalSettings Top="2" Width="1243" Attach="1" Height="827" Left="2" MinMaxMode="0" /> 28 </View0> 29 </Doc4> 30 <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psType.h" > 31 <View0 line="119" Type="???" > 32 <AdditionalSettings Top="2" Width="1243" Attach="1" Height="827" Left="2" MinMaxMode="0" /> 33 </View0> 34 </Doc5> 10 35 </DocsAndViews> 11 36 <pluginList> -
trunk/psLib/src/dataManip/psFFT.d
r1264 r1292 1 1 psFFT.o psFFT.d : psFFT.c psFFT.h ../image/psImage.h ../collections/psType.h \ 2 2 ../collections/psVector.h ../sysUtils/psError.h ../sysUtils/psMemory.h \ 3 ../sysUtils/psLogMsg.h ../image/psImageExtraction.h 3 ../sysUtils/psLogMsg.h ../image/psImageExtraction.h psStats.h -
trunk/psLib/src/dataManip/psStats.c
r1284 r1292 1839 1839 return(stats); 1840 1840 } 1841 1842 bool p_psGetStatValue(const psStats* stats, double* value) 1843 { 1844 1845 switch (stats->options & 1846 ~ (PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) { 1847 case PS_STAT_SAMPLE_MEAN: 1848 *value = stats->sampleMean; 1849 return true; 1850 1851 case PS_STAT_SAMPLE_MEDIAN: 1852 *value = stats->sampleMedian; 1853 return true; 1854 1855 case PS_STAT_SAMPLE_STDEV: 1856 *value = stats->sampleStdev; 1857 return true; 1858 1859 case PS_STAT_ROBUST_MEAN: 1860 *value = stats->robustMean; 1861 return true; 1862 1863 case PS_STAT_ROBUST_MEDIAN: 1864 *value = stats->robustMedian; 1865 return true; 1866 1867 case PS_STAT_ROBUST_MODE: 1868 *value = stats->robustMode; 1869 return true; 1870 1871 case PS_STAT_ROBUST_STDEV: 1872 *value = stats->robustStdev; 1873 return true; 1874 1875 case PS_STAT_CLIPPED_MEAN: 1876 *value = stats->clippedMean; 1877 return true; 1878 1879 case PS_STAT_CLIPPED_STDEV: 1880 *value = stats->clippedStdev; 1881 return true; 1882 1883 case PS_STAT_MAX: 1884 *value = stats->max; 1885 return true; 1886 1887 case PS_STAT_MIN: 1888 *value = stats->min; 1889 return true; 1890 1891 default: 1892 return false; 1893 } 1894 } -
trunk/psLib/src/dataManip/psStats.h
r1284 r1292 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-07-2 3 00:06:40$11 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-07-24 02:00:21 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 119 119 int maskVal); ///< Mask value 120 120 121 bool p_psGetStatValue( 122 const psStats* stats, 123 double* value 124 ); 121 125 122 126 /// @} -
trunk/psLib/src/image/psImageExtraction.c
r1267 r1292 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-07-2 2 20:48:44$11 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-07-24 02:00:21 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 99 99 if (input == NULL || input->data.V == NULL) { 100 100 psError(__func__,"Can not copy image because input image or its pixel buffer is NULL."); 101 psFree(output); 101 102 return NULL; 102 103 } … … 105 106 psError(__func__,"Can not copy image because given input and output " 106 107 "parameter reference the same psImage struct."); 108 psFree(output); 107 109 return NULL; 108 110 } … … 110 112 if (input->type.dimen != PS_DIMEN_IMAGE) { 111 113 psError(__func__,"Can not copy image because input image is not actually an image."); 114 psFree(output); 112 115 return NULL; 113 116 } … … 121 124 if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) { 122 125 psError(__func__,"Can not copy image to/from a void* matrix"); 126 psFree(output); 123 127 return NULL; 124 128 } … … 225 229 } 226 230 231 psVector* psImageSlice(psVector* out, 232 const psImage* in, 233 const psImage* restrict mask, 234 unsigned int maskVal, 235 unsigned int col, 236 unsigned int row, 237 unsigned int numCols, 238 unsigned int numRows, 239 psImageCutDirection direction, 240 const psStats* stats) 241 { 242 double statVal; 243 psStats* myStats; 244 psElemType type; 245 int inRows; 246 int inCols; 247 int delta = 1; 248 psF64* outData; 249 250 if (in == NULL || in->data.V == NULL) { 251 psError(__func__,"Input image can not be NULL."); 252 psFree(out); 253 return NULL; 254 } 255 256 type = in->type.type; 257 inRows = in->numRows; 258 inCols = in->numCols; 259 260 if (mask != NULL) { 261 if (inRows!=mask->numRows || inCols!=mask->numCols) { 262 psError(__func__,"The mask and image dimensions did not match (%dx%d vs %dx%d)", 263 mask->numCols,mask->numRows,in->numCols,in->numRows); 264 psFree(out); 265 } 266 if (mask->type.type != PS_TYPE_MASK) { 267 psError(__func__,"The mask datatype (%d) must be %s.", 268 mask->type.type, PS_TYPE_MASK_NAME); 269 psFree(out); 270 } 271 } 272 273 if (row >= inRows || col >= inCols || 274 col+numCols > in->numCols || row+numRows > in->numRows) { 275 psError(__func__,"The specified image region (%d,%d to %d,%d) is outside of image area (0,0 to %d,%d).", 276 col, row, col+numCols-1, row+numRows-1, in->numCols-1, in->numRows-1); 277 psFree(out); 278 return NULL; 279 } 280 281 // verify that the stats struct specifies a single stats operation 282 if (p_psGetStatValue(stats,&statVal) == false) { 283 psError(__func__,"The stat options didn't specify a single supported statistic type."); 284 psFree(out); 285 return NULL; 286 } 287 288 // since stats input is const, I need to create a 'scratch' stats struct 289 myStats = psAlloc(sizeof(psStats)); 290 *myStats = *stats; 291 292 293 if (direction == PS_CUT_X_NEG || direction == PS_CUT_Y_NEG) { 294 delta = -1; 295 } 296 297 if (direction == PS_CUT_X_POS || direction == PS_CUT_X_NEG) { 298 psVector* imgVec = psVectorAlloc(numRows,type); 299 psVector* maskVec = NULL; 300 psMaskType* maskData = NULL; 301 302 // recycle output to make a proper sized/type output structure 303 // n.b. type is double as that is the type given for all stats in psStats. 304 out = psVectorRecycle(out,numCols,PS_TYPE_F64); 305 outData = out->data.F64; 306 if (delta < 0) { 307 outData += numCols - 1; 308 } 309 310 if (mask != NULL) { 311 maskVec = psVectorAlloc(numRows,mask->type.type); 312 } 313 314 #define PSIMAGE_CUT_VERTICAL(TYPE) \ 315 case PS_TYPE_##TYPE: { \ 316 ps##TYPE *imgVecData = imgVec->data.TYPE; \ 317 psMaskType* maskVecData = NULL; \ 318 if (maskVec != NULL) { \ 319 maskVecData = maskVec->data.V; \ 320 } \ 321 for (int c=0;c<numCols;c++) { \ 322 ps##TYPE *imgData = in->data.TYPE[row] + col + c; \ 323 if (maskVec != NULL) { \ 324 maskData = (psMaskType*)(mask->data.V[row]) + col + c; \ 325 } \ 326 for (int r=0;r<numRows;r++) { \ 327 *(imgVecData++) = *imgData; \ 328 imgData += inCols; \ 329 if (maskVecData != NULL) { \ 330 *(maskVecData++) = *maskData; \ 331 maskData += inCols; \ 332 } \ 333 } \ 334 myStats = psVectorStats(myStats,imgVec,maskVec,maskVal); \ 335 (void)p_psGetStatValue(myStats,&statVal); \ 336 *outData = statVal; \ 337 outData += delta; \ 338 } \ 339 break; \ 340 } 341 342 switch (type) { 343 PSIMAGE_CUT_VERTICAL(U8); 344 PSIMAGE_CUT_VERTICAL(U16); 345 PSIMAGE_CUT_VERTICAL(U32); 346 PSIMAGE_CUT_VERTICAL(U64); 347 PSIMAGE_CUT_VERTICAL(S8); 348 PSIMAGE_CUT_VERTICAL(S16); 349 PSIMAGE_CUT_VERTICAL(S32); 350 PSIMAGE_CUT_VERTICAL(S64); 351 PSIMAGE_CUT_VERTICAL(F32); 352 PSIMAGE_CUT_VERTICAL(F64); 353 PSIMAGE_CUT_VERTICAL(C32); 354 PSIMAGE_CUT_VERTICAL(C64); 355 default: 356 psError(__func__,"Unsupported datatype (%d)",type); 357 psFree(out); 358 out = NULL; 359 } 360 psFree(imgVec); 361 psFree(maskVec); 362 } else { // Cut in Y direction 363 psVector* imgVec = NULL; 364 psVector* maskVec = NULL; 365 int elementSize = PSELEMTYPE_SIZEOF(type); 366 367 // fill in psVectors to fake out the statistics functions. 368 imgVec = psAlloc(sizeof(psVector)); 369 imgVec->type = in->type; 370 imgVec->n = imgVec->nalloc = numCols; 371 if (mask != NULL) { 372 maskVec = psAlloc(sizeof(psVector)); 373 maskVec->type = mask->type; 374 maskVec->n = maskVec->nalloc = numCols; 375 } 376 377 // recycle output to make a proper sized/type output structure 378 // n.b. type is double as that is the type given for all stats in psStats. 379 out = psVectorRecycle(out,numRows,PS_TYPE_F64); 380 outData = out->data.F64; 381 if (delta < 0) { 382 outData += numCols - 1; 383 } 384 385 for (int r=0;r<numRows;r++) { 386 // point the vector struct to the data to calculate the stats 387 imgVec->data.V = (void*)(in->data.U8[row+r]+col*elementSize); 388 if (maskVec!=NULL) { 389 maskVec->data.V = (void*)(mask->data.U8[row+r]+col*sizeof(psMaskType)); 390 } 391 myStats = psVectorStats(myStats,imgVec,maskVec,maskVal); 392 (void)p_psGetStatValue(myStats,&statVal); // we know it works cause we tested it above 393 *outData = statVal; 394 outData += delta; 395 } 396 } 397 398 return out; 399 } 400 -
trunk/psLib/src/image/psImageExtraction.d
r1265 r1292 1 1 psImageExtraction.o psImageExtraction.d : psImageExtraction.c ../sysUtils/psMemory.h \ 2 2 psImageExtraction.h psImage.h ../collections/psType.h \ 3 ../ sysUtils/psError.h3 ../collections/psVector.h ../dataManip/psStats.h ../sysUtils/psError.h -
trunk/psLib/src/image/psImageExtraction.h
r1267 r1292 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-07-2 2 20:48:44$11 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-07-24 02:00:21 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 19 19 20 20 #include "psImage.h" 21 #include "psVector.h" 22 #include "psStats.h" 23 24 /// @addtogroup Image 25 /// @{ 26 27 typedef enum { 28 PS_CUT_X_POS, 29 PS_CUT_X_NEG, 30 PS_CUT_Y_POS, 31 PS_CUT_Y_NEG, 32 } psImageCutDirection; 21 33 22 34 /** Create a subimage of the specified area. … … 54 66 ); 55 67 68 psVector* psImageSlice( 69 psVector* out, 70 const psImage* input, 71 const psImage* restrict mask, 72 unsigned int maskVal, 73 unsigned int col, 74 unsigned int row, 75 unsigned int numCols, 76 unsigned int numRows, 77 psImageCutDirection direction, 78 const psStats* stats 79 ); 80 81 psVector* psImageCut( 82 psVector* out, 83 const psImage* input, 84 const psImage* restrict mask, 85 unsigned int maskVal, 86 float startCol, 87 float startRow, 88 float endCol, 89 float endRow, 90 float width, 91 const psStats* stats 92 ); 93 94 psVector* psImageRadialCut( 95 psVector* out, 96 const psImage* input, 97 const psImage* restrict mask, 98 unsigned int maskVal, 99 float centerCol, 100 float centerRow, 101 const psVector* radii, 102 const psStats* stats 103 ); 104 105 /// @} 56 106 57 107 #endif -
trunk/psLib/src/image/psImageManip.c
r1263 r1292 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-2 2 20:42:22$12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-24 02:00:21 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psMemory.h" 26 26 #include "psImageExtraction.h" 27 28 bool getSpecifiedStatValue(const psStats* stats, double* value);29 27 30 28 int psImageClip(psImage* input, psF64 min, psF64 vmin, psF64 max, psF64 vmax) … … 337 335 } 338 336 339 bool getSpecifiedStatValue(const psStats* stats, double* value)340 {341 342 switch (stats->options &343 ~ (PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {344 case PS_STAT_SAMPLE_MEAN:345 *value = stats->sampleMean;346 return true;347 348 case PS_STAT_SAMPLE_MEDIAN:349 *value = stats->sampleMedian;350 return true;351 352 case PS_STAT_SAMPLE_STDEV:353 *value = stats->sampleStdev;354 return true;355 356 case PS_STAT_ROBUST_MEAN:357 *value = stats->robustMean;358 return true;359 360 case PS_STAT_ROBUST_MEDIAN:361 *value = stats->robustMedian;362 return true;363 364 case PS_STAT_ROBUST_MODE:365 *value = stats->robustMode;366 return true;367 368 case PS_STAT_ROBUST_STDEV:369 *value = stats->robustStdev;370 return true;371 372 case PS_STAT_CLIPPED_MEAN:373 *value = stats->clippedMean;374 return true;375 376 case PS_STAT_CLIPPED_STDEV:377 *value = stats->clippedStdev;378 return true;379 380 case PS_STAT_MAX:381 *value = stats->max;382 return true;383 384 case PS_STAT_MIN:385 *value = stats->min;386 return true;387 388 default:389 return false;390 }391 }392 393 337 394 338 psImage* psImageRebin(psImage* out,const psImage* in,unsigned int scale,const psStats* stats) … … 420 364 } 421 365 422 if ( getSpecifiedStatValue(stats,&statVal) == false) {366 if (p_psGetStatValue(stats,&statVal) == false) { 423 367 psError(__func__,"The stat options didn't specify a single supported statistic type."); 424 368 psFree(out); … … 457 401 vec->n = n; \ 458 402 myStats = psVectorStats(myStats,vec,NULL,0); \ 459 getSpecifiedStatValue(myStats,&statVal); \403 p_psGetStatValue(myStats,&statVal); \ 460 404 outRowData[col] = (ps##type)statVal; \ 461 405 } \ … … 723 667 float cosT = cosf(t); 724 668 float sinT = sinf(t); 725 float cosNegT = cosf(-t);726 float sinNegT = sinf(-t);727 669 728 670 // calculate the corners of the rotated image so we know the proper output image size. … … 730 672 // y' = y cos(t) - x sin(t); i.e. y' = (y-centerY)*cosT - (x-centerX)*sinT; 731 673 732 #define rotateProjectX(x,y) (x-centerX)*cosNegT + (y-centerY)*sinNegT 733 #define rotateProjectY(x,y) (y-centerY)*cosNegT - (x-centerX)*sinNegT 734 735 // bottom-left, i.e., (0,0) 736 float xbl = rotateProjectX(0,0); 737 float ybl = rotateProjectY(0,0); 738 // bottom-right, i.e., (numCols,0) 739 float xbr = rotateProjectX(numCols,0); 740 float ybr = rotateProjectY(numCols,0); 741 // top-left, i.e., (0,numRows) 742 float xtl = rotateProjectX(0,numRows); 743 float ytl = rotateProjectY(0,numRows); 744 // top-right, i.e., (numCols,numRows) 745 float xtr = rotateProjectX(numCols,numRows); 746 float ytr = rotateProjectY(numCols,numRows); 747 748 float minX = xbl; 749 minX = (minX > xbr) ? xbr : minX; 750 minX = (minX > xtl) ? xtl : minX; 751 minX = (minX > xtr) ? xtr : minX; 752 753 float minY = ybl; 754 minY = (minY > ybr) ? ybr : minY; 755 minY = (minY > ytl) ? ytl : minY; 756 minY = (minY > ytr) ? ytr : minY; 757 758 float maxX = xbl; 759 maxX = (maxX < xbr) ? xbr : maxX; 760 maxX = (maxX < xtl) ? xtl : maxX; 761 maxX = (maxX < xtr) ? xtr : maxX; 762 763 float maxY = ybl; 764 maxY = (maxY < ybr) ? ybr : maxY; 765 maxY = (maxY < ytl) ? ytl : maxY; 766 maxY = (maxY < ytr) ? ytr : maxY; 767 768 int intMinY = minY; 769 int outRows = ceil(maxY-minY)+1; 770 int outCols = ceil(maxX-minX)+1; 674 675 int outCols = ceil(abs(numCols*cosT)+abs(numRows*sinT))+1; 676 int outRows = ceil(abs(numCols*sinT)+abs(numRows*cosT))+1; 677 float minX = (float)outCols/-2.0f; 678 int intMinY = outRows/-2; 771 679 772 680 out = psImageRecycle(out,outCols,outRows,type); -
trunk/psLib/src/image/psImageStats.h
r1261 r1292 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-2 2 20:09:04$12 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-24 02:00:21 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 ); 50 50 51 52 53 54 51 #endif -
trunk/psLib/src/imageops/psImageStats.h
r1261 r1292 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-2 2 20:09:04$12 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-24 02:00:21 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 ); 50 50 51 52 53 54 51 #endif -
trunk/psLib/src/math/psStats.c
r1284 r1292 1839 1839 return(stats); 1840 1840 } 1841 1842 bool p_psGetStatValue(const psStats* stats, double* value) 1843 { 1844 1845 switch (stats->options & 1846 ~ (PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) { 1847 case PS_STAT_SAMPLE_MEAN: 1848 *value = stats->sampleMean; 1849 return true; 1850 1851 case PS_STAT_SAMPLE_MEDIAN: 1852 *value = stats->sampleMedian; 1853 return true; 1854 1855 case PS_STAT_SAMPLE_STDEV: 1856 *value = stats->sampleStdev; 1857 return true; 1858 1859 case PS_STAT_ROBUST_MEAN: 1860 *value = stats->robustMean; 1861 return true; 1862 1863 case PS_STAT_ROBUST_MEDIAN: 1864 *value = stats->robustMedian; 1865 return true; 1866 1867 case PS_STAT_ROBUST_MODE: 1868 *value = stats->robustMode; 1869 return true; 1870 1871 case PS_STAT_ROBUST_STDEV: 1872 *value = stats->robustStdev; 1873 return true; 1874 1875 case PS_STAT_CLIPPED_MEAN: 1876 *value = stats->clippedMean; 1877 return true; 1878 1879 case PS_STAT_CLIPPED_STDEV: 1880 *value = stats->clippedStdev; 1881 return true; 1882 1883 case PS_STAT_MAX: 1884 *value = stats->max; 1885 return true; 1886 1887 case PS_STAT_MIN: 1888 *value = stats->min; 1889 return true; 1890 1891 default: 1892 return false; 1893 } 1894 } -
trunk/psLib/src/math/psStats.h
r1284 r1292 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-07-2 3 00:06:40$11 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-07-24 02:00:21 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 119 119 int maskVal); ///< Mask value 120 120 121 bool p_psGetStatValue( 122 const psStats* stats, 123 double* value 124 ); 121 125 122 126 /// @} -
trunk/psLib/src/pslib.h
r1290 r1292 8 8 * @author Eric Van Alst, MHPCC 9 9 * 10 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-07-2 3 19:05:03$10 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-07-24 02:00:21 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 108 108 109 109 #include "psImageManip.h" 110 #include "psImageExtraction.h" 110 111 111 112 #include "psFunctions.h" -
trunk/psLib/src/sys/psType.h
r1226 r1292 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07- 15 19:58:37$12 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-24 02:00:21 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 69 69 70 70 #define PS_TYPE_MASK PS_TYPE_U8 ///< the psElemType to use for mask image 71 #define PS_TYPE_MASK_NAME "psU8" 71 72 typedef psU8 psMaskType; ///< the C datatype for a mask image 72 73 -
trunk/psLib/src/sysUtils/psType.h
r1226 r1292 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07- 15 19:58:37$12 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-24 02:00:21 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 69 69 70 70 #define PS_TYPE_MASK PS_TYPE_U8 ///< the psElemType to use for mask image 71 #define PS_TYPE_MASK_NAME "psU8" 71 72 typedef psU8 psMaskType; ///< the C datatype for a mask image 72 73 -
trunk/psLib/test/astronomy/builddir/tst_psTime_01.d
r1223 r1292 3 3 ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \ 4 4 ../../include/psString.h ../../include/psType.h ../../include/psList.h \ 5 ../../include/psCompare.h ../../include/psVector.h \ 6 ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \ 7 ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \ 5 ../../include/psCompare.h ../../include/psArray.h \ 6 ../../include/psHash.h ../../include/psScalar.h \ 7 ../../include/psVector.h ../../include/psImage.h \ 8 ../../include/psBitSet.h ../../include/psStats.h \ 8 9 ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \ 9 10 ../../include/psFFT.h ../../include/psImageIO.h \ 10 ../../include/psImageManip.h ../../include/ps Functions.h \11 ../../include/ps Minimize.h ../../include/psTime.h \12 ../../include/psT est.h11 ../../include/psImageManip.h ../../include/psImageExtraction.h \ 12 ../../include/psFunctions.h ../../include/psMinimize.h \ 13 ../../include/psTime.h ../../include/psTest.h -
trunk/psLib/test/image/tst_psImageStats03.c
r1234 r1292 46 46 x = 0.2 + (float) i; 47 47 y = 0.2 + (float) j; 48 pixel = psImagePixelInterpolat ion(tmpImage, x, y);48 pixel = psImagePixelInterpolate(tmpImage, x, y,0,PS_INTERPOLATE_BILINEAR); 49 49 printf("%.1f ", pixel); 50 50 } … … 56 56 x = 0.2 + (float) i; 57 57 y = 0.2 + (float) j; 58 pixel = psImagePixelInterpolat ion(tmpImage, x, y);58 pixel = psImagePixelInterpolate(tmpImage, x, y,0,PS_INTERPOLATE_BILINEAR); 59 59 printf("image[%.1f][%.1f] is interpolated at %.1f\n", x, y, pixel); 60 60 }
Note:
See TracChangeset
for help on using the changeset viewer.
