Changeset 4128 for trunk/psLib/test/image
- Timestamp:
- Jun 6, 2005, 4:29:44 PM (21 years ago)
- Location:
- trunk/psLib/test/image
- Files:
-
- 1 deleted
- 3 edited
-
Makefile.am (modified) (1 diff)
-
tst_psImageGeomManip.c (modified) (4 diffs)
-
tst_psImageIO.c (deleted)
-
verified/tst_psImageGeomManip.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/Makefile.am
r3973 r4128 24 24 tst_psImageStructManip \ 25 25 tst_psImageConvolve \ 26 tst_psImageIO \27 26 tst_psImageInterpolate 28 27 -
trunk/psLib/test/image/tst_psImageGeomManip.c
r4069 r4128 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-06-0 1 20:37:39$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-06-07 02:29:44 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 536 536 mkdir("temp",0777); 537 537 remove 538 ("temp/fOut.fits") 539 ; 540 remove 541 ("temp/sOut.fits") 542 ; 543 remove 544 ("temp/fBiOut.fits") 545 ; 546 remove 547 ("temp/sBiOut.fits"); 548 ; 538 ("temp/out.fits"); 549 539 psS32 index = 0; 550 540 psBool fail = false; 551 541 psF32 radianRot; 542 543 psFits* fOutFile = psFitsAlloc("temp/fOut.fits"); 544 psFits* sOutFile = psFitsAlloc("temp/sOut.fits"); 545 psFits* fBiOutFile = psFitsAlloc("temp/fBiOut.fits"); 546 psFits* sBiOutFile = psFitsAlloc("temp/sBiOut.fits"); 547 if (fOutFile == NULL ||sOutFile == NULL || fBiOutFile == NULL || sBiOutFile == NULL) { 548 psError(PS_ERR_UNKNOWN, true, "Can not create output files, so why continue!?"); 549 return 1; 550 } 551 552 psFits* fTruthFile = psFitsAlloc("verified/fOut.fits"); 553 psFits* sTruthFile = psFitsAlloc("verified/sOut.fits"); 554 psFits* fBiTruthFile = psFitsAlloc("verified/fBiOut.fits"); 555 psFits* sBiTruthFile = psFitsAlloc("verified/sBiOut.fits"); 556 if (fTruthFile == NULL ||sTruthFile == NULL || fBiTruthFile == NULL || sBiTruthFile == NULL) { 557 psError(PS_ERR_UNKNOWN, true, "Can not open truth files, so why continue!?"); 558 return 1; 559 } 560 561 char hduName[80]; 562 psRegion regionAll = psRegionSet(0,0,0,0); 552 563 for (psS32 rot=-180;rot<=180;rot+=45) { 553 564 psImage* oldOut = fOut; 554 565 psImage* oldBiOut = fBiOut; 555 566 snprintf(hduName, 80, "%+d", rot); 556 567 if (rot == 90) { 557 568 radianRot = M_PI_2; … … 578 589 sOut = psImageRotate(sOut,sImg,radianRot,-1.0,PS_INTERPOLATE_FLAT); 579 590 sBiOut = psImageRotate(sBiOut,sImg,radianRot,-1.0,PS_INTERPOLATE_BILINEAR); 580 if (! psImageWriteSection(fOut,0,0,0,NULL,index,"temp/fOut.fits") ) { 581 psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fOut.fits, so why continue!?"); 591 592 if (! psFitsWriteImage(fOutFile, NULL, fOut, 1, hduName) ) { 593 psError(PS_ERR_UNKNOWN, true,"Can not write fOut."); 582 594 return 20; 583 595 } 584 if (! ps ImageWriteSection(sOut,0,0,0,NULL,index,"temp/sOut.fits") ) {585 psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sOut.fits, so why continue!?");596 if (! psFitsWriteImage(sOutFile, NULL, sOut, 1, hduName) ) { 597 psError(PS_ERR_UNKNOWN, true,"Can not write sOut."); 586 598 return 21; 587 599 } 588 if (! ps ImageWriteSection(fBiOut,0,0,0,NULL,index,"temp/fBiOut.fits") ) {589 psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fBiOut.fits, so why continue!?");600 if (! psFitsWriteImage(fBiOutFile, NULL, fBiOut, 1, hduName) ) { 601 psError(PS_ERR_UNKNOWN, true,"Can not write fBiOut.fits."); 590 602 return 40; 591 603 } 592 if (! ps ImageWriteSection(sBiOut,0,0,0,NULL,index,"temp/sBiOut.fits") ) {593 psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sBiOut.fits, so why continue!?");604 if (! psFitsWriteImage(sBiOutFile, NULL, sBiOut, 1, hduName) ) { 605 psError(PS_ERR_UNKNOWN, true,"Can not write sBiOut.fits."); 594 606 return 41; 595 607 } 596 608 597 609 // now, let's compare this with the verified file 598 fTruth = psImageReadSection(fTruth,0,0,0,0,0,NULL,index,"temp/fOut.fits"); 599 sTruth = psImageReadSection(sTruth,0,0,0,0,0,NULL,index,"temp/sOut.fits"); 600 fBiTruth = psImageReadSection(fBiTruth,0,0,0,0,0,NULL,index,"temp/fBiOut.fits"); 601 sBiTruth = psImageReadSection(sBiTruth,0,0,0,0,0,NULL,index,"temp/sBiOut.fits"); 610 psFitsMoveExtNum(fTruthFile, index, false); 611 psFitsMoveExtNum(sTruthFile, index, false); 612 psFitsMoveExtNum(fBiTruthFile, index, false); 613 psFitsMoveExtNum(sBiTruthFile, index, false); 614 fTruth = psFitsReadImage(fTruth, fTruthFile, regionAll, 0); 615 sTruth = psFitsReadImage(sTruth, sTruthFile, regionAll, 0); 616 fBiTruth = psFitsReadImage(fBiTruth, fBiTruthFile, regionAll, 0); 617 sBiTruth = psFitsReadImage(sBiTruth, sBiTruthFile, regionAll, 0); 602 618 if (fTruth == NULL) { 603 619 psError(PS_ERR_UNKNOWN, true,"verified psF32 image failed to be read (%d deg. rotation)", … … 743 759 psFree(fBiOut); 744 760 761 psFree(fOutFile); 762 psFree(sOutFile); 763 psFree(fBiOutFile); 764 psFree(sBiOutFile); 765 766 psFree(fTruthFile); 767 psFree(sTruthFile); 768 psFree(fBiTruthFile); 769 psFree(sBiTruthFile); 770 745 771 return 0; 746 772 } -
trunk/psLib/test/image/verified/tst_psImageGeomManip.stderr
r3976 r4128 57 57 \**********************************************************************************/ 58 58 59 <DATE><TIME>|<HOST>|W|psImageWriteSection60 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.61 <DATE><TIME>|<HOST>|W|psImageWriteSection62 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.63 <DATE><TIME>|<HOST>|W|psImageWriteSection64 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.65 <DATE><TIME>|<HOST>|W|psImageWriteSection66 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.67 <DATE><TIME>|<HOST>|W|psImageReadSection68 psImageReadSection is deprecated. Consider using psFitsReadImage instead.69 <DATE><TIME>|<HOST>|W|psImageReadSection70 psImageReadSection is deprecated. Consider using psFitsReadImage instead.71 <DATE><TIME>|<HOST>|W|psImageReadSection72 psImageReadSection is deprecated. Consider using psFitsReadImage instead.73 <DATE><TIME>|<HOST>|W|psImageReadSection74 psImageReadSection is deprecated. Consider using psFitsReadImage instead.75 <DATE><TIME>|<HOST>|W|psImageWriteSection76 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.77 <DATE><TIME>|<HOST>|W|psImageWriteSection78 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.79 <DATE><TIME>|<HOST>|W|psImageWriteSection80 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.81 <DATE><TIME>|<HOST>|W|psImageWriteSection82 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.83 <DATE><TIME>|<HOST>|W|psImageReadSection84 psImageReadSection is deprecated. Consider using psFitsReadImage instead.85 <DATE><TIME>|<HOST>|W|psImageReadSection86 psImageReadSection is deprecated. Consider using psFitsReadImage instead.87 <DATE><TIME>|<HOST>|W|psImageReadSection88 psImageReadSection is deprecated. Consider using psFitsReadImage instead.89 <DATE><TIME>|<HOST>|W|psImageReadSection90 psImageReadSection is deprecated. Consider using psFitsReadImage instead.91 <DATE><TIME>|<HOST>|W|psImageWriteSection92 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.93 <DATE><TIME>|<HOST>|W|psImageWriteSection94 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.95 <DATE><TIME>|<HOST>|W|psImageWriteSection96 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.97 <DATE><TIME>|<HOST>|W|psImageWriteSection98 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.99 <DATE><TIME>|<HOST>|W|psImageReadSection100 psImageReadSection is deprecated. Consider using psFitsReadImage instead.101 <DATE><TIME>|<HOST>|W|psImageReadSection102 psImageReadSection is deprecated. Consider using psFitsReadImage instead.103 <DATE><TIME>|<HOST>|W|psImageReadSection104 psImageReadSection is deprecated. Consider using psFitsReadImage instead.105 <DATE><TIME>|<HOST>|W|psImageReadSection106 psImageReadSection is deprecated. Consider using psFitsReadImage instead.107 <DATE><TIME>|<HOST>|W|psImageWriteSection108 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.109 <DATE><TIME>|<HOST>|W|psImageWriteSection110 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.111 <DATE><TIME>|<HOST>|W|psImageWriteSection112 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.113 <DATE><TIME>|<HOST>|W|psImageWriteSection114 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.115 <DATE><TIME>|<HOST>|W|psImageReadSection116 psImageReadSection is deprecated. Consider using psFitsReadImage instead.117 <DATE><TIME>|<HOST>|W|psImageReadSection118 psImageReadSection is deprecated. Consider using psFitsReadImage instead.119 <DATE><TIME>|<HOST>|W|psImageReadSection120 psImageReadSection is deprecated. Consider using psFitsReadImage instead.121 <DATE><TIME>|<HOST>|W|psImageReadSection122 psImageReadSection is deprecated. Consider using psFitsReadImage instead.123 <DATE><TIME>|<HOST>|W|psImageWriteSection124 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.125 <DATE><TIME>|<HOST>|W|psImageWriteSection126 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.127 <DATE><TIME>|<HOST>|W|psImageWriteSection128 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.129 <DATE><TIME>|<HOST>|W|psImageWriteSection130 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.131 <DATE><TIME>|<HOST>|W|psImageReadSection132 psImageReadSection is deprecated. Consider using psFitsReadImage instead.133 <DATE><TIME>|<HOST>|W|psImageReadSection134 psImageReadSection is deprecated. Consider using psFitsReadImage instead.135 <DATE><TIME>|<HOST>|W|psImageReadSection136 psImageReadSection is deprecated. Consider using psFitsReadImage instead.137 <DATE><TIME>|<HOST>|W|psImageReadSection138 psImageReadSection is deprecated. Consider using psFitsReadImage instead.139 <DATE><TIME>|<HOST>|W|psImageWriteSection140 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.141 <DATE><TIME>|<HOST>|W|psImageWriteSection142 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.143 <DATE><TIME>|<HOST>|W|psImageWriteSection144 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.145 <DATE><TIME>|<HOST>|W|psImageWriteSection146 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.147 <DATE><TIME>|<HOST>|W|psImageReadSection148 psImageReadSection is deprecated. Consider using psFitsReadImage instead.149 <DATE><TIME>|<HOST>|W|psImageReadSection150 psImageReadSection is deprecated. Consider using psFitsReadImage instead.151 <DATE><TIME>|<HOST>|W|psImageReadSection152 psImageReadSection is deprecated. Consider using psFitsReadImage instead.153 <DATE><TIME>|<HOST>|W|psImageReadSection154 psImageReadSection is deprecated. Consider using psFitsReadImage instead.155 <DATE><TIME>|<HOST>|W|psImageWriteSection156 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.157 <DATE><TIME>|<HOST>|W|psImageWriteSection158 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.159 <DATE><TIME>|<HOST>|W|psImageWriteSection160 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.161 <DATE><TIME>|<HOST>|W|psImageWriteSection162 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.163 <DATE><TIME>|<HOST>|W|psImageReadSection164 psImageReadSection is deprecated. Consider using psFitsReadImage instead.165 <DATE><TIME>|<HOST>|W|psImageReadSection166 psImageReadSection is deprecated. Consider using psFitsReadImage instead.167 <DATE><TIME>|<HOST>|W|psImageReadSection168 psImageReadSection is deprecated. Consider using psFitsReadImage instead.169 <DATE><TIME>|<HOST>|W|psImageReadSection170 psImageReadSection is deprecated. Consider using psFitsReadImage instead.171 <DATE><TIME>|<HOST>|W|psImageWriteSection172 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.173 <DATE><TIME>|<HOST>|W|psImageWriteSection174 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.175 <DATE><TIME>|<HOST>|W|psImageWriteSection176 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.177 <DATE><TIME>|<HOST>|W|psImageWriteSection178 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.179 <DATE><TIME>|<HOST>|W|psImageReadSection180 psImageReadSection is deprecated. Consider using psFitsReadImage instead.181 <DATE><TIME>|<HOST>|W|psImageReadSection182 psImageReadSection is deprecated. Consider using psFitsReadImage instead.183 <DATE><TIME>|<HOST>|W|psImageReadSection184 psImageReadSection is deprecated. Consider using psFitsReadImage instead.185 <DATE><TIME>|<HOST>|W|psImageReadSection186 psImageReadSection is deprecated. Consider using psFitsReadImage instead.187 <DATE><TIME>|<HOST>|W|psImageWriteSection188 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.189 <DATE><TIME>|<HOST>|W|psImageWriteSection190 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.191 <DATE><TIME>|<HOST>|W|psImageWriteSection192 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.193 <DATE><TIME>|<HOST>|W|psImageWriteSection194 psImageWriteSection is deprecated. Consider using psFitsWriteImage instead.195 <DATE><TIME>|<HOST>|W|psImageReadSection196 psImageReadSection is deprecated. Consider using psFitsReadImage instead.197 <DATE><TIME>|<HOST>|W|psImageReadSection198 psImageReadSection is deprecated. Consider using psFitsReadImage instead.199 <DATE><TIME>|<HOST>|W|psImageReadSection200 psImageReadSection is deprecated. Consider using psFitsReadImage instead.201 <DATE><TIME>|<HOST>|W|psImageReadSection202 psImageReadSection is deprecated. Consider using psFitsReadImage instead.203 59 <DATE><TIME>|<HOST>|I|testImageRotate 204 60 Following should be an error
Note:
See TracChangeset
for help on using the changeset viewer.
