Changeset 4286 for trunk/psLib/src/image/psImageGeomManip.c
- Timestamp:
- Jun 16, 2005, 12:00:04 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImageGeomManip.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.
