Changeset 4286
- Timestamp:
- Jun 16, 2005, 12:00:04 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 9 edited
-
astro/psCoord.c (modified) (4 diffs)
-
astronomy/psCoord.c (modified) (4 diffs)
-
dataManip/psFunctions.c (modified) (4 diffs)
-
image/psImageGeomManip.c (modified) (13 diffs)
-
image/psImageGeomManip.h (modified) (2 diffs)
-
imageops/psImageGeomManip.c (modified) (13 diffs)
-
imageops/psImageGeomManip.h (modified) (2 diffs)
-
math/psPolynomial.c (modified) (4 diffs)
-
math/psSpline.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r4225 r4286 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.7 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-1 3 20:16:22$12 * @version $Revision: 1.72 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-16 22:00:03 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 242 242 PS_ASSERT_PTR_NON_NULL(transform->y, NULL); 243 243 PS_ASSERT_PTR_NON_NULL(coords, NULL); 244 printf("psPlaneTransformApply(): (%f, %f) x:(%d, %d)\n", 245 coords->x, coords->y, transform->x->nX, transform->x->nY); 244 246 245 247 if (out == NULL) { 248 printf("psPlaneTransformApply(): out is NULL\n"); 246 249 out = (psPlane* ) psAlloc(sizeof(psPlane)); 247 250 } 251 /* 252 out->x = psDPolynomial2DEval( 253 transform->x, 254 coords->x, 255 coords->y 256 ); 257 out->y = psDPolynomial2DEval( 258 transform->y, 259 coords->x, 260 coords->y 261 ); 262 */ 248 263 out->x = psDPolynomial2DEval( 249 264 transform->x, … … 251 266 coords->y 252 267 ); 268 253 269 out->y = psDPolynomial2DEval( 254 270 transform->y, … … 257 273 ); 258 274 275 printf("psPlaneTransformApply(END)\n"); 259 276 return (out); 260 277 } -
trunk/psLib/src/astronomy/psCoord.c
r4225 r4286 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.7 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-1 3 20:16:22$12 * @version $Revision: 1.72 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-16 22:00:03 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 242 242 PS_ASSERT_PTR_NON_NULL(transform->y, NULL); 243 243 PS_ASSERT_PTR_NON_NULL(coords, NULL); 244 printf("psPlaneTransformApply(): (%f, %f) x:(%d, %d)\n", 245 coords->x, coords->y, transform->x->nX, transform->x->nY); 244 246 245 247 if (out == NULL) { 248 printf("psPlaneTransformApply(): out is NULL\n"); 246 249 out = (psPlane* ) psAlloc(sizeof(psPlane)); 247 250 } 251 /* 252 out->x = psDPolynomial2DEval( 253 transform->x, 254 coords->x, 255 coords->y 256 ); 257 out->y = psDPolynomial2DEval( 258 transform->y, 259 coords->x, 260 coords->y 261 ); 262 */ 248 263 out->x = psDPolynomial2DEval( 249 264 transform->x, … … 251 266 coords->y 252 267 ); 268 253 269 out->y = psDPolynomial2DEval( 254 270 transform->y, … … 257 273 ); 258 274 275 printf("psPlaneTransformApply(END)\n"); 259 276 return (out); 260 277 } -
trunk/psLib/src/dataManip/psFunctions.c
r4219 r4286 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.10 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 3 19:39:31$9 * @version $Revision: 1.107 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-16 22:00:03 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 671 671 } 672 672 673 static psF64 dOrdPolynomial2DEval(psF64 x, psF64 y, const psDPolynomial2D* myPoly) 673 static psF64 dOrdPolynomial2DEval(psF64 x, 674 psF64 y, 675 const psDPolynomial2D* myPoly) 674 676 { 675 677 psS32 loop_x = 0; … … 678 680 psF64 xSum = 1.0; 679 681 psF64 ySum = 1.0; 682 printf("dOrdPolynomial2DEval(%f, %f) (%d, %d)\n", x, y, myPoly->nX, myPoly->nY); 680 683 681 684 for (loop_x = 0; loop_x < myPoly->nX; loop_x++) { … … 689 692 xSum *= x; 690 693 } 694 printf("dOrdPolynomial2DEval(END)\n"); 691 695 692 696 return(polySum); -
trunk/psLib/src/image/psImageGeomManip.c
r4214 r4286 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-1 1 02:19:05$12 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-16 22:00:04 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 697 697 const psPixels* pixels, 698 698 psImageInterpolateMode mode, 699 int exposedValue) 699 int exposedValue, 700 psPlaneTransform *junk) 700 701 { 702 printf("junk(A): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 703 704 701 705 if (input == NULL) { 702 706 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 707 711 psElemType type = input->type.type; 708 712 713 printf("junk(B): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 709 714 if (inputMask != NULL) { 710 715 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { … … 733 738 } 734 739 740 printf("junk(C): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 735 741 int row0; 736 742 int row1; … … 774 780 } 775 781 782 printf("junk(D): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 776 783 // loop through the output image using the domain above and transform 777 784 // each output pixel to input coordinates and use psImagePixelInterpolate … … 780 787 psPlane* inPosition = NULL; 781 788 789 790 791 792 782 793 #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 783 794 /* apply the transform to get the position in the input image */ \ 795 printf("junk(Ea): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 784 796 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); \ 785 797 \ 798 printf("junk(Eaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 786 799 if (inPosition == NULL) { \ 787 800 psError(PS_ERR_UNKNOWN, false, \ … … 791 804 } \ 792 805 /* interpolate the cooresponding input pixel to get the output pixel value. */ \ 806 printf("junk(Eaaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 793 807 ps##TYPE value = p_psImagePixelInterpolate##MODE##_##TYPE(input, \ 794 808 inPosition->x, inPosition->y, \ 795 809 inputMask, inputMaskVal, NAN); \ 810 /* psFree(inPosition); */\ 811 printf("junk(Eaaaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 796 812 if (isnan(value)) { \ 797 813 if (blankPixels != NULL) { \ … … 800 816 value = exposedValue; \ 801 817 } \ 818 printf("junk(Eb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 819 820 802 821 803 822 #define PSIMAGE_TRANSFORM_LOOP(TYPE, MODE) { \ … … 806 825 ps##TYPE* outputData=output->data.TYPE[row]; \ 807 826 for (int col = 0; col < numCols; col++) { \ 827 printf("junk(Eb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 808 828 outPosition.x = col+col0; \ 829 printf("junk(Ebb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 809 830 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 831 printf("junk(Ebbb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 810 832 outputData[col] = value; \ 811 } \ 812 } \ 813 } 833 printf("junk(Ebbbb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 834 printf("HERE B: Writing (%d, %d) Image size is (%d, %d)\n", \ 835 row, col, output->numRows, output->numCols); \ 836 printf("junk(Ebbbbb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 837 } \ 838 } \ 839 } 840 841 printf("junk(F): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 814 842 815 843 #define PSIMAGE_TRANSFORM_FROMLIST(TYPE, MODE) { \ … … 823 851 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 824 852 output->data.TYPE[y][x] = value; \ 825 } \ 826 } \ 827 } 853 printf("HERE C: Writing (%d, %d) Image size is (%d, %d)\n", y, x, output->numRows, output->numCols); \ 854 } \ 855 } \ 856 } 857 858 printf("junk(G): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 828 859 829 860 #define PSIMAGE_TRANSFORM_CASE(MODE) \ … … 843 874 typeStr); \ 844 875 psFree(output); \ 876 printf("junk(H): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 845 877 return NULL; \ 846 878 } \ … … 848 880 break; 849 881 882 printf("junk(J): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 850 883 switch (mode) { 851 884 PSIMAGE_TRANSFORM_CASE(FLAT); … … 857 890 mode); 858 891 psFree(output); 859 return NULL; 860 } 892 printf("junk(K): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 893 return NULL; 894 } 895 printf("junk(L): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 861 896 862 897 return output; -
trunk/psLib/src/image/psImageGeomManip.h
r4243 r4286 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-1 4 02:54:15$10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-16 22:00:04 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 153 153 * output image shall be transformed; otherwise, entire image generated*/ 154 154 psImageInterpolateMode mode, ///< the interpolation scheme to be used 155 int exposedValue ///< Exposed value to which non-corresponding pixels are set 155 int exposedValue, ///< Exposed value to which non-corresponding pixels are set 156 psPlaneTransform *junk 156 157 ); 157 158 -
trunk/psLib/src/imageops/psImageGeomManip.c
r4214 r4286 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-1 1 02:19:05$12 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-16 22:00:04 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 697 697 const psPixels* pixels, 698 698 psImageInterpolateMode mode, 699 int exposedValue) 699 int exposedValue, 700 psPlaneTransform *junk) 700 701 { 702 printf("junk(A): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 703 704 701 705 if (input == NULL) { 702 706 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 707 711 psElemType type = input->type.type; 708 712 713 printf("junk(B): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 709 714 if (inputMask != NULL) { 710 715 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { … … 733 738 } 734 739 740 printf("junk(C): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 735 741 int row0; 736 742 int row1; … … 774 780 } 775 781 782 printf("junk(D): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 776 783 // loop through the output image using the domain above and transform 777 784 // each output pixel to input coordinates and use psImagePixelInterpolate … … 780 787 psPlane* inPosition = NULL; 781 788 789 790 791 792 782 793 #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 783 794 /* apply the transform to get the position in the input image */ \ 795 printf("junk(Ea): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 784 796 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); \ 785 797 \ 798 printf("junk(Eaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 786 799 if (inPosition == NULL) { \ 787 800 psError(PS_ERR_UNKNOWN, false, \ … … 791 804 } \ 792 805 /* interpolate the cooresponding input pixel to get the output pixel value. */ \ 806 printf("junk(Eaaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 793 807 ps##TYPE value = p_psImagePixelInterpolate##MODE##_##TYPE(input, \ 794 808 inPosition->x, inPosition->y, \ 795 809 inputMask, inputMaskVal, NAN); \ 810 /* psFree(inPosition); */\ 811 printf("junk(Eaaaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\ 796 812 if (isnan(value)) { \ 797 813 if (blankPixels != NULL) { \ … … 800 816 value = exposedValue; \ 801 817 } \ 818 printf("junk(Eb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 819 820 802 821 803 822 #define PSIMAGE_TRANSFORM_LOOP(TYPE, MODE) { \ … … 806 825 ps##TYPE* outputData=output->data.TYPE[row]; \ 807 826 for (int col = 0; col < numCols; col++) { \ 827 printf("junk(Eb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 808 828 outPosition.x = col+col0; \ 829 printf("junk(Ebb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 809 830 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 831 printf("junk(Ebbb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 810 832 outputData[col] = value; \ 811 } \ 812 } \ 813 } 833 printf("junk(Ebbbb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 834 printf("HERE B: Writing (%d, %d) Image size is (%d, %d)\n", \ 835 row, col, output->numRows, output->numCols); \ 836 printf("junk(Ebbbbb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 837 } \ 838 } \ 839 } 840 841 printf("junk(F): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 814 842 815 843 #define PSIMAGE_TRANSFORM_FROMLIST(TYPE, MODE) { \ … … 823 851 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 824 852 output->data.TYPE[y][x] = value; \ 825 } \ 826 } \ 827 } 853 printf("HERE C: Writing (%d, %d) Image size is (%d, %d)\n", y, x, output->numRows, output->numCols); \ 854 } \ 855 } \ 856 } 857 858 printf("junk(G): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 828 859 829 860 #define PSIMAGE_TRANSFORM_CASE(MODE) \ … … 843 874 typeStr); \ 844 875 psFree(output); \ 876 printf("junk(H): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \ 845 877 return NULL; \ 846 878 } \ … … 848 880 break; 849 881 882 printf("junk(J): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 850 883 switch (mode) { 851 884 PSIMAGE_TRANSFORM_CASE(FLAT); … … 857 890 mode); 858 891 psFree(output); 859 return NULL; 860 } 892 printf("junk(K): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 893 return NULL; 894 } 895 printf("junk(L): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); 861 896 862 897 return output; -
trunk/psLib/src/imageops/psImageGeomManip.h
r4243 r4286 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-1 4 02:54:15$10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-16 22:00:04 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 153 153 * output image shall be transformed; otherwise, entire image generated*/ 154 154 psImageInterpolateMode mode, ///< the interpolation scheme to be used 155 int exposedValue ///< Exposed value to which non-corresponding pixels are set 155 int exposedValue, ///< Exposed value to which non-corresponding pixels are set 156 psPlaneTransform *junk 156 157 ); 157 158 -
trunk/psLib/src/math/psPolynomial.c
r4219 r4286 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.10 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 3 19:39:31$9 * @version $Revision: 1.107 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-16 22:00:03 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 671 671 } 672 672 673 static psF64 dOrdPolynomial2DEval(psF64 x, psF64 y, const psDPolynomial2D* myPoly) 673 static psF64 dOrdPolynomial2DEval(psF64 x, 674 psF64 y, 675 const psDPolynomial2D* myPoly) 674 676 { 675 677 psS32 loop_x = 0; … … 678 680 psF64 xSum = 1.0; 679 681 psF64 ySum = 1.0; 682 printf("dOrdPolynomial2DEval(%f, %f) (%d, %d)\n", x, y, myPoly->nX, myPoly->nY); 680 683 681 684 for (loop_x = 0; loop_x < myPoly->nX; loop_x++) { … … 689 692 xSum *= x; 690 693 } 694 printf("dOrdPolynomial2DEval(END)\n"); 691 695 692 696 return(polySum); -
trunk/psLib/src/math/psSpline.c
r4219 r4286 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.10 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 3 19:39:31$9 * @version $Revision: 1.107 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-16 22:00:03 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 671 671 } 672 672 673 static psF64 dOrdPolynomial2DEval(psF64 x, psF64 y, const psDPolynomial2D* myPoly) 673 static psF64 dOrdPolynomial2DEval(psF64 x, 674 psF64 y, 675 const psDPolynomial2D* myPoly) 674 676 { 675 677 psS32 loop_x = 0; … … 678 680 psF64 xSum = 1.0; 679 681 psF64 ySum = 1.0; 682 printf("dOrdPolynomial2DEval(%f, %f) (%d, %d)\n", x, y, myPoly->nX, myPoly->nY); 680 683 681 684 for (loop_x = 0; loop_x < myPoly->nX; loop_x++) { … … 689 692 xSum *= x; 690 693 } 694 printf("dOrdPolynomial2DEval(END)\n"); 691 695 692 696 return(polySum);
Note:
See TracChangeset
for help on using the changeset viewer.
