Changeset 3716
- Timestamp:
- Apr 18, 2005, 9:00:20 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astronomy/tst_psAstrometry01.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astronomy/tst_psAstrometry01.c
r3715 r3716 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-04-19 0 5:46:24$7 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-04-19 07:00:20 $ 9 9 * 10 10 * XXX: Must test … … 693 693 694 694 /****************************************************************************** 695 test04(): We test psPlaneTransformCombine() with a wariety of input695 test04(): We test psPlaneTransformCombine() with a variety of input 696 696 transforms, as well as input coordinates, as well as erroneous input 697 697 parameters. … … 780 780 /****************************************************************************** 781 781 XXX: This is only a rudimentary test of the psPlaneTransformFit() function. 782 It tests a few NULL input parameter conditions. 783 784 XXX: We call it with acceptable data, but we do not verify the output. 782 It tests a few NULL input parameter conditions, and some simple linear 783 transformations. 785 784 *****************************************************************************/ 786 785 psS32 test5( void ) … … 793 792 bool rc; 794 793 795 796 794 // 797 795 // We set an arbitrary non-linear transformation. 798 796 // 799 800 797 for (psS32 x = 0 ; x < TST05_X_POLY_ORDER ; x++) { 801 798 for (psS32 y = 0 ; y < TST05_Y_POLY_ORDER ; y++) { … … 824 821 // 825 822 // We generate a grid of input data points in the x1,y1 plane, calculate the 826 // corresponding values in the x2,y2in the transformed plane, and set these to823 // corresponding values in the transformed plane, and set these to 827 824 // the src and dst psVectors. 828 825 // 829 psPlane *inData = psPlaneAlloc();830 psPlane *outData = NULL;831 826 psS32 i = 0; 832 for ( inData->x = TST05_X_MIN ; inData->x < TST05_X_MAX ; inData->x+= (TST05_X_MAX-TST05_X_MIN)/TST05_NUM_X) {833 for ( inData->y = TST05_Y_MIN ; inData->y < TST05_Y_MAX ; inData->y+= (TST05_Y_MAX-TST05_Y_MIN)/TST05_NUM_Y) {827 for (psF32 x = TST05_X_MIN ; x < TST05_X_MAX ; x+= (TST05_X_MAX-TST05_X_MIN)/TST05_NUM_X) { 828 for (psF32 y = TST05_Y_MIN ; y < TST05_Y_MAX ; y+= (TST05_Y_MAX-TST05_Y_MIN)/TST05_NUM_Y) { 834 829 src->data[i] = (psPtr *) psPlaneAlloc(); 835 dst->data[i] = (psPtr *) psPlaneAlloc(); 836 837 ((psPlane *) src->data[i])->x = inData->x; 838 ((psPlane *) src->data[i])->y = inData->y; 839 840 outData = psPlaneTransformApply(NULL, transInit, inData); 841 842 ((psPlane *) dst->data[i])->x = outData->x; 843 ((psPlane *) dst->data[i])->y = outData->y; 844 psFree(outData); 845 830 ((psPlane *) src->data[i])->x = x; 831 ((psPlane *) src->data[i])->y = y; 832 833 dst->data[i] = psPlaneTransformApply(NULL, transInit, ((psPlane *) src->data[i])); 846 834 i++; 847 835 } 848 836 } 849 psFree(inData);850 837 851 838 printf("----------------------------------------------------------------------------------\n"); … … 909 896 psFree(src); 910 897 psFree(dst); 898 911 899 return(!testStatus); 912 900 }
Note:
See TracChangeset
for help on using the changeset viewer.
