Changeset 4287
- Timestamp:
- Jun 16, 2005, 12:07:41 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
image/psImageGeomManip.c (modified) (13 diffs)
-
image/psImageGeomManip.h (modified) (2 diffs)
-
imageops/psImageGeomManip.c (modified) (13 diffs)
-
imageops/psImageGeomManip.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageGeomManip.c
r4286 r4287 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-16 22:0 0:04$12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-16 22:07:41 $ 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, 700 psPlaneTransform *junk) 699 int exposedValue) 701 700 { 702 printf("junk(A): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);703 704 705 701 if (input == NULL) { 706 702 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 711 707 psElemType type = input->type.type; 712 708 713 printf("junk(B): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);714 709 if (inputMask != NULL) { 715 710 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { … … 738 733 } 739 734 740 printf("junk(C): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);741 735 int row0; 742 736 int row1; … … 780 774 } 781 775 782 printf("junk(D): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);783 776 // loop through the output image using the domain above and transform 784 777 // each output pixel to input coordinates and use psImagePixelInterpolate … … 793 786 #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 794 787 /* 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);\796 788 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); \ 797 789 \ 798 printf("junk(Eaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\799 790 if (inPosition == NULL) { \ 800 791 psError(PS_ERR_UNKNOWN, false, \ … … 804 795 } \ 805 796 /* 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);\807 797 ps##TYPE value = p_psImagePixelInterpolate##MODE##_##TYPE(input, \ 808 798 inPosition->x, inPosition->y, \ 809 799 inputMask, inputMaskVal, NAN); \ 810 800 /* psFree(inPosition); */\ 811 printf("junk(Eaaaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\812 801 if (isnan(value)) { \ 813 802 if (blankPixels != NULL) { \ … … 816 805 value = exposedValue; \ 817 806 } \ 818 printf("junk(Eb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);819 820 821 807 822 808 #define PSIMAGE_TRANSFORM_LOOP(TYPE, MODE) { \ … … 825 811 ps##TYPE* outputData=output->data.TYPE[row]; \ 826 812 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); \828 813 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); \830 814 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); \832 815 outputData[col] = value; \ 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); 816 } \ 817 } \ 818 } 842 819 843 820 #define PSIMAGE_TRANSFORM_FROMLIST(TYPE, MODE) { \ … … 851 828 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 852 829 output->data.TYPE[y][x] = value; \ 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); 830 } \ 831 } \ 832 } 859 833 860 834 #define PSIMAGE_TRANSFORM_CASE(MODE) \ … … 874 848 typeStr); \ 875 849 psFree(output); \ 876 printf("junk(H): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \877 850 return NULL; \ 878 851 } \ … … 880 853 break; 881 854 882 printf("junk(J): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);883 855 switch (mode) { 884 856 PSIMAGE_TRANSFORM_CASE(FLAT); … … 890 862 mode); 891 863 psFree(output); 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); 864 return NULL; 865 } 896 866 897 867 return output; -
trunk/psLib/src/image/psImageGeomManip.h
r4286 r4287 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-16 22:0 0:04$10 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-16 22:07:41 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 151 151 const psRegion region, ///< the size of the transformed image 152 152 const psPixels* pixels, /**< if not NULL, consists of psPixelCoords and specifies which pixels in 153 * output image shall be transformed; otherwise, entire image generated*/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 156 psPlaneTransform *junk 155 int exposedValue ///< Exposed value to which non-corresponding pixels are set 157 156 ); 158 157 -
trunk/psLib/src/imageops/psImageGeomManip.c
r4286 r4287 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-16 22:0 0:04$12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-16 22:07:41 $ 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, 700 psPlaneTransform *junk) 699 int exposedValue) 701 700 { 702 printf("junk(A): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);703 704 705 701 if (input == NULL) { 706 702 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 711 707 psElemType type = input->type.type; 712 708 713 printf("junk(B): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);714 709 if (inputMask != NULL) { 715 710 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { … … 738 733 } 739 734 740 printf("junk(C): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);741 735 int row0; 742 736 int row1; … … 780 774 } 781 775 782 printf("junk(D): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);783 776 // loop through the output image using the domain above and transform 784 777 // each output pixel to input coordinates and use psImagePixelInterpolate … … 793 786 #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 794 787 /* 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);\796 788 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); \ 797 789 \ 798 printf("junk(Eaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\799 790 if (inPosition == NULL) { \ 800 791 psError(PS_ERR_UNKNOWN, false, \ … … 804 795 } \ 805 796 /* 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);\807 797 ps##TYPE value = p_psImagePixelInterpolate##MODE##_##TYPE(input, \ 808 798 inPosition->x, inPosition->y, \ 809 799 inputMask, inputMaskVal, NAN); \ 810 800 /* psFree(inPosition); */\ 811 printf("junk(Eaaaa): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);\812 801 if (isnan(value)) { \ 813 802 if (blankPixels != NULL) { \ … … 816 805 value = exposedValue; \ 817 806 } \ 818 printf("junk(Eb): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);819 820 821 807 822 808 #define PSIMAGE_TRANSFORM_LOOP(TYPE, MODE) { \ … … 825 811 ps##TYPE* outputData=output->data.TYPE[row]; \ 826 812 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); \828 813 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); \830 814 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); \832 815 outputData[col] = value; \ 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); 816 } \ 817 } \ 818 } 842 819 843 820 #define PSIMAGE_TRANSFORM_FROMLIST(TYPE, MODE) { \ … … 851 828 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 852 829 output->data.TYPE[y][x] = value; \ 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); 830 } \ 831 } \ 832 } 859 833 860 834 #define PSIMAGE_TRANSFORM_CASE(MODE) \ … … 874 848 typeStr); \ 875 849 psFree(output); \ 876 printf("junk(H): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY); \877 850 return NULL; \ 878 851 } \ … … 880 853 break; 881 854 882 printf("junk(J): (%d, %d) (%d %d)\n", junk->x->nX, junk->x->nY, junk->y->nX, junk->y->nY);883 855 switch (mode) { 884 856 PSIMAGE_TRANSFORM_CASE(FLAT); … … 890 862 mode); 891 863 psFree(output); 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); 864 return NULL; 865 } 896 866 897 867 return output; -
trunk/psLib/src/imageops/psImageGeomManip.h
r4286 r4287 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-16 22:0 0:04$10 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-16 22:07:41 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 151 151 const psRegion region, ///< the size of the transformed image 152 152 const psPixels* pixels, /**< if not NULL, consists of psPixelCoords and specifies which pixels in 153 * output image shall be transformed; otherwise, entire image generated*/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 156 psPlaneTransform *junk 155 int exposedValue ///< Exposed value to which non-corresponding pixels are set 157 156 ); 158 157
Note:
See TracChangeset
for help on using the changeset viewer.
