Changeset 4214
- Timestamp:
- Jun 10, 2005, 4:19:05 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 13 edited
-
src/collections/psPixels.c (modified) (2 diffs)
-
src/collections/psPixels.h (modified) (2 diffs)
-
src/dataIO/psFits.h (modified) (2 diffs)
-
src/fits/psFits.h (modified) (2 diffs)
-
src/image/psImageGeomManip.c (modified) (5 diffs)
-
src/image/psImageGeomManip.h (modified) (2 diffs)
-
src/imageops/psImageGeomManip.c (modified) (5 diffs)
-
src/imageops/psImageGeomManip.h (modified) (2 diffs)
-
src/sys/psConfigure.c (modified) (2 diffs)
-
src/sysUtils/psConfigure.c (modified) (2 diffs)
-
src/types/psPixels.c (modified) (2 diffs)
-
src/types/psPixels.h (modified) (2 diffs)
-
test/image/tst_psImageGeomManip.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psPixels.c
r4212 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 0 21:46:46$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 89 89 pixels->n = pixels->nalloc; 90 90 } 91 92 return pixels; 93 } 94 95 psPixels* p_psPixelsAppend(psPixels* pixels, int growth, psS32 x, psS32 y) 96 { 97 if (growth < 1) { 98 growth = 10; 99 } 100 101 if ( (pixels == NULL) || (pixels->n >= pixels->nalloc) ) { 102 pixels=psPixelsRealloc(pixels, pixels->nalloc+growth); 103 } 104 105 int n = pixels->n; 106 107 pixels->data[n].x = x; 108 pixels->data[n].y = y; 109 110 pixels->n++; 91 111 92 112 return pixels; -
trunk/psLib/src/collections/psPixels.h
r4162 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 08 23:40:45 $9 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 62 62 psPixels* pixels, ///< psPixels to resize, or NULL to create new psPixels 63 63 int size ///< the size of the coordinate vectors 64 ); 65 66 /** Add a pixel location to a psPixels 67 * 68 * @return psPixels* psPixels with the value appended. 69 */ 70 psPixels* p_psPixelsAppend( 71 psPixels* pixels, ///< psPixels to append new coordinate to. NULL creates a new one. 72 int growth, ///< number of elements to grow the psPixels list, if necessary. if growth < 1, 10 is used. 73 psS32 x, ///< x coordinate to append 74 psS32 y ///< y coordinate to append 64 75 ); 65 76 -
trunk/psLib/src/dataIO/psFits.h
r4191 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 09 19:40:51$9 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 251 251 ); 252 252 253 254 253 /** Updates a FITS table. The current HDU type must be either 255 254 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. -
trunk/psLib/src/fits/psFits.h
r4191 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 09 19:40:51$9 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 251 251 ); 252 252 253 254 253 /** Updates a FITS table. The current HDU type must be either 255 254 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. -
trunk/psLib/src/image/psImageGeomManip.c
r4211 r4214 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-1 0 21:26:47$12 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-11 02:19:05 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 688 688 } 689 689 690 691 // XXX: implementation is awaiting working psPlaneTransform functions like692 // invert. Also, the next SDRS should have a different signature.693 690 psImage* psImageTransform(psImage *output, 694 ps Array** blankPixels,691 psPixels* blankPixels, 695 692 const psImage *input, 696 693 const psImage *inputMask, … … 705 702 psError(PS_ERR_BAD_PARAMETER_NULL, true, 706 703 PS_ERRORTEXT_psImage_IMAGE_NULL); 707 return NULL; 704 psFree(output); 705 return NULL; 706 } 707 psElemType type = input->type.type; 708 709 if (inputMask != NULL) { 710 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { 711 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 712 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE, 713 input->numCols, input->numRows, 714 inputMask->numCols, inputMask->numRows ); 715 psFree(output); 716 return NULL; 717 } 718 if (inputMask->type.type != PS_TYPE_MASK) { 719 char* typeStr; 720 PS_TYPE_NAME(typeStr,inputMask->type.type); 721 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 722 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE, 723 typeStr, PS_TYPE_MASK_NAME); 724 psFree(output); 725 return NULL; 726 } 708 727 } 709 728 … … 714 733 } 715 734 716 int row0 = region.y0; 717 int row1 = region.y1; 718 int col0 = region.x0; 719 int col1 = region.x1; 720 if (col1 < 1) { 721 col1 += input->numCols; 722 } 723 724 if (row1 < 1) { 725 row1 += input->numRows; 726 } 727 728 int numRows = row1 - row0; 729 int numCols = col1 - col0; 730 731 if (numRows < 1 || numCols < 1) { 732 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 733 "The specified region is invalid."); 734 psFree(output); 735 return NULL; 736 } 737 738 // create the output image. 739 output = psImageRecycle(output, numCols, numRows, input->type.type); 740 *(psS32*)&output->col0 = region.x0; 741 *(psS32*)&output->row0 = region.y0; 742 735 int row0; 736 int row1; 737 int col0; 738 int col1; 739 int numRows; 740 int numCols; 741 if (output == NULL) { // output image size is determined by psRegion 742 row0 = region.y0; 743 row1 = region.y1; 744 col0 = region.x0; 745 col1 = region.x1; 746 if (col1 < 1) { 747 col1 += input->numCols; 748 } 749 750 if (row1 < 1) { 751 row1 += input->numRows; 752 } 753 754 numRows = row1 - row0; 755 numCols = col1 - col0; 756 757 if (numRows < 1 || numCols < 1) { 758 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 759 "The specified region is invalid."); 760 psFree(output); 761 return NULL; 762 } 763 // create the output image. 764 output = psImageRecycle(output, numCols, numRows, input->type.type); 765 *(psS32*)&output->col0 = region.x0; 766 *(psS32*)&output->row0 = region.y0; 767 } else { // size of output is determined by output parameter 768 numRows = output->numRows; 769 numCols = output->numCols; 770 row0 = output->row0; 771 col0 = output->col0; 772 row1 = row0+numRows; 773 col1 = col0+numCols; 774 } 743 775 744 776 // loop through the output image using the domain above and transform … … 747 779 psPlane outPosition; 748 780 psPlane* inPosition = NULL; 749 for (int row = 0; row < numRows; row++) { 750 outPosition.y = row+row0; 751 psF32* outputData=output->data.F32[row]; 752 for (int col = 0; col < numCols; col++) { 753 outPosition.x = col+col0; 754 // apply the transform to get the position in the input image 755 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); 756 757 if (inPosition == NULL) { 758 psError(PS_ERR_UNKNOWN, false, 759 "Failed to apply the transform"); 760 psFree(output); 761 return NULL; 762 } 763 // interpolate the cooresponding input pixel to get the output pixel value. 764 outputData[col] = (psF32)psImagePixelInterpolate(input, 765 inPosition->x, inPosition->y, 766 inputMask, inputMaskVal, exposedValue, 767 mode); 768 769 } 781 782 #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 783 /* apply the transform to get the position in the input image */ \ 784 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); \ 785 \ 786 if (inPosition == NULL) { \ 787 psError(PS_ERR_UNKNOWN, false, \ 788 "Failed to apply the transform"); \ 789 psFree(output); \ 790 return NULL; \ 791 } \ 792 /* interpolate the cooresponding input pixel to get the output pixel value. */ \ 793 ps##TYPE value = p_psImagePixelInterpolate##MODE##_##TYPE(input, \ 794 inPosition->x, inPosition->y, \ 795 inputMask, inputMaskVal, NAN); \ 796 if (isnan(value)) { \ 797 if (blankPixels != NULL) { \ 798 p_psPixelsAppend(blankPixels, blankPixels->nalloc, outPosition.x, outPosition.y); \ 799 } \ 800 value = exposedValue; \ 801 } \ 802 803 #define PSIMAGE_TRANSFORM_LOOP(TYPE, MODE) { \ 804 for (int row = 0; row < numRows; row++) { \ 805 outPosition.y = row+row0; \ 806 ps##TYPE* outputData=output->data.TYPE[row]; \ 807 for (int col = 0; col < numCols; col++) { \ 808 outPosition.x = col+col0; \ 809 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 810 outputData[col] = value; \ 811 } \ 812 } \ 813 } 814 815 #define PSIMAGE_TRANSFORM_FROMLIST(TYPE, MODE) { \ 816 int n = pixels->n; \ 817 for (int i= 0; i < n; i++) { \ 818 int x = pixels->data[i].x; \ 819 int y = pixels->data[i].y; \ 820 if (x >= col0 && x < col1 && y >= row0 && y < row1) { \ 821 outPosition.x = x; \ 822 outPosition.y = y; \ 823 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 824 output->data.TYPE[y][x] = value; \ 825 } \ 826 } \ 827 } 828 829 #define PSIMAGE_TRANSFORM_CASE(MODE) \ 830 case PS_INTERPOLATE_##MODE: \ 831 switch (type) { \ 832 case PS_TYPE_F32: \ 833 PSIMAGE_TRANSFORM_LOOP(F32,MODE); \ 834 break; \ 835 case PS_TYPE_F64: \ 836 PSIMAGE_TRANSFORM_LOOP(F64,MODE); \ 837 break; \ 838 default: { \ 839 char* typeStr; \ 840 PS_TYPE_NAME(typeStr,type); \ 841 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 842 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \ 843 typeStr); \ 844 psFree(output); \ 845 return NULL; \ 846 } \ 847 } \ 848 break; 849 850 switch (mode) { 851 PSIMAGE_TRANSFORM_CASE(FLAT); 852 PSIMAGE_TRANSFORM_CASE(BILINEAR); 853 PSIMAGE_TRANSFORM_CASE(BILINEAR_VARIANCE); 854 default: 855 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 856 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED, 857 mode); 858 psFree(output); 859 return NULL; 770 860 } 771 861 -
trunk/psLib/src/image/psImageGeomManip.h
r4162 r4214 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 08 23:40:45 $10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-11 02:19:05 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 144 144 psImage* psImageTransform( 145 145 psImage *output, ///< psImage to recycle, or NULL 146 ps Array** blankPixels, ///<146 psPixels* blankPixels, ///< list of pixels in output image not set, or NULL if no list is desired. 147 147 const psImage *input, ///< psImage to apply transform to 148 148 const psImage *inputMask, ///< if not NULL, mask of input psImage -
trunk/psLib/src/imageops/psImageGeomManip.c
r4211 r4214 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-1 0 21:26:47$12 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-11 02:19:05 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 688 688 } 689 689 690 691 // XXX: implementation is awaiting working psPlaneTransform functions like692 // invert. Also, the next SDRS should have a different signature.693 690 psImage* psImageTransform(psImage *output, 694 ps Array** blankPixels,691 psPixels* blankPixels, 695 692 const psImage *input, 696 693 const psImage *inputMask, … … 705 702 psError(PS_ERR_BAD_PARAMETER_NULL, true, 706 703 PS_ERRORTEXT_psImage_IMAGE_NULL); 707 return NULL; 704 psFree(output); 705 return NULL; 706 } 707 psElemType type = input->type.type; 708 709 if (inputMask != NULL) { 710 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { 711 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 712 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE, 713 input->numCols, input->numRows, 714 inputMask->numCols, inputMask->numRows ); 715 psFree(output); 716 return NULL; 717 } 718 if (inputMask->type.type != PS_TYPE_MASK) { 719 char* typeStr; 720 PS_TYPE_NAME(typeStr,inputMask->type.type); 721 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 722 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE, 723 typeStr, PS_TYPE_MASK_NAME); 724 psFree(output); 725 return NULL; 726 } 708 727 } 709 728 … … 714 733 } 715 734 716 int row0 = region.y0; 717 int row1 = region.y1; 718 int col0 = region.x0; 719 int col1 = region.x1; 720 if (col1 < 1) { 721 col1 += input->numCols; 722 } 723 724 if (row1 < 1) { 725 row1 += input->numRows; 726 } 727 728 int numRows = row1 - row0; 729 int numCols = col1 - col0; 730 731 if (numRows < 1 || numCols < 1) { 732 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 733 "The specified region is invalid."); 734 psFree(output); 735 return NULL; 736 } 737 738 // create the output image. 739 output = psImageRecycle(output, numCols, numRows, input->type.type); 740 *(psS32*)&output->col0 = region.x0; 741 *(psS32*)&output->row0 = region.y0; 742 735 int row0; 736 int row1; 737 int col0; 738 int col1; 739 int numRows; 740 int numCols; 741 if (output == NULL) { // output image size is determined by psRegion 742 row0 = region.y0; 743 row1 = region.y1; 744 col0 = region.x0; 745 col1 = region.x1; 746 if (col1 < 1) { 747 col1 += input->numCols; 748 } 749 750 if (row1 < 1) { 751 row1 += input->numRows; 752 } 753 754 numRows = row1 - row0; 755 numCols = col1 - col0; 756 757 if (numRows < 1 || numCols < 1) { 758 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 759 "The specified region is invalid."); 760 psFree(output); 761 return NULL; 762 } 763 // create the output image. 764 output = psImageRecycle(output, numCols, numRows, input->type.type); 765 *(psS32*)&output->col0 = region.x0; 766 *(psS32*)&output->row0 = region.y0; 767 } else { // size of output is determined by output parameter 768 numRows = output->numRows; 769 numCols = output->numCols; 770 row0 = output->row0; 771 col0 = output->col0; 772 row1 = row0+numRows; 773 col1 = col0+numCols; 774 } 743 775 744 776 // loop through the output image using the domain above and transform … … 747 779 psPlane outPosition; 748 780 psPlane* inPosition = NULL; 749 for (int row = 0; row < numRows; row++) { 750 outPosition.y = row+row0; 751 psF32* outputData=output->data.F32[row]; 752 for (int col = 0; col < numCols; col++) { 753 outPosition.x = col+col0; 754 // apply the transform to get the position in the input image 755 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); 756 757 if (inPosition == NULL) { 758 psError(PS_ERR_UNKNOWN, false, 759 "Failed to apply the transform"); 760 psFree(output); 761 return NULL; 762 } 763 // interpolate the cooresponding input pixel to get the output pixel value. 764 outputData[col] = (psF32)psImagePixelInterpolate(input, 765 inPosition->x, inPosition->y, 766 inputMask, inputMaskVal, exposedValue, 767 mode); 768 769 } 781 782 #define PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 783 /* apply the transform to get the position in the input image */ \ 784 inPosition = psPlaneTransformApply(inPosition, outToIn, &outPosition); \ 785 \ 786 if (inPosition == NULL) { \ 787 psError(PS_ERR_UNKNOWN, false, \ 788 "Failed to apply the transform"); \ 789 psFree(output); \ 790 return NULL; \ 791 } \ 792 /* interpolate the cooresponding input pixel to get the output pixel value. */ \ 793 ps##TYPE value = p_psImagePixelInterpolate##MODE##_##TYPE(input, \ 794 inPosition->x, inPosition->y, \ 795 inputMask, inputMaskVal, NAN); \ 796 if (isnan(value)) { \ 797 if (blankPixels != NULL) { \ 798 p_psPixelsAppend(blankPixels, blankPixels->nalloc, outPosition.x, outPosition.y); \ 799 } \ 800 value = exposedValue; \ 801 } \ 802 803 #define PSIMAGE_TRANSFORM_LOOP(TYPE, MODE) { \ 804 for (int row = 0; row < numRows; row++) { \ 805 outPosition.y = row+row0; \ 806 ps##TYPE* outputData=output->data.TYPE[row]; \ 807 for (int col = 0; col < numCols; col++) { \ 808 outPosition.x = col+col0; \ 809 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 810 outputData[col] = value; \ 811 } \ 812 } \ 813 } 814 815 #define PSIMAGE_TRANSFORM_FROMLIST(TYPE, MODE) { \ 816 int n = pixels->n; \ 817 for (int i= 0; i < n; i++) { \ 818 int x = pixels->data[i].x; \ 819 int y = pixels->data[i].y; \ 820 if (x >= col0 && x < col1 && y >= row0 && y < row1) { \ 821 outPosition.x = x; \ 822 outPosition.y = y; \ 823 PSIMAGE_TRANSFORM_DOTRANSFORM(TYPE,MODE) \ 824 output->data.TYPE[y][x] = value; \ 825 } \ 826 } \ 827 } 828 829 #define PSIMAGE_TRANSFORM_CASE(MODE) \ 830 case PS_INTERPOLATE_##MODE: \ 831 switch (type) { \ 832 case PS_TYPE_F32: \ 833 PSIMAGE_TRANSFORM_LOOP(F32,MODE); \ 834 break; \ 835 case PS_TYPE_F64: \ 836 PSIMAGE_TRANSFORM_LOOP(F64,MODE); \ 837 break; \ 838 default: { \ 839 char* typeStr; \ 840 PS_TYPE_NAME(typeStr,type); \ 841 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 842 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \ 843 typeStr); \ 844 psFree(output); \ 845 return NULL; \ 846 } \ 847 } \ 848 break; 849 850 switch (mode) { 851 PSIMAGE_TRANSFORM_CASE(FLAT); 852 PSIMAGE_TRANSFORM_CASE(BILINEAR); 853 PSIMAGE_TRANSFORM_CASE(BILINEAR_VARIANCE); 854 default: 855 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 856 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED, 857 mode); 858 psFree(output); 859 return NULL; 770 860 } 771 861 -
trunk/psLib/src/imageops/psImageGeomManip.h
r4162 r4214 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 08 23:40:45 $10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-11 02:19:05 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 144 144 psImage* psImageTransform( 145 145 psImage *output, ///< psImage to recycle, or NULL 146 ps Array** blankPixels, ///<146 psPixels* blankPixels, ///< list of pixels in output image not set, or NULL if no list is desired. 147 147 const psImage *input, ///< psImage to apply transform to 148 148 const psImage *inputMask, ///< if not NULL, mask of input psImage -
trunk/psLib/src/sys/psConfigure.c
r4205 r4214 13 13 * @author Robert DeSonia, MHPCC 14 14 * 15 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-06-1 0 01:41:35 $15 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-06-11 02:19:05 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 { 29 29 char version[80]; 30 snprintf(version,80,"%s-v%s",PACKAGE ,VERSION);30 snprintf(version,80,"%s-v%s",PACKAGE_NAME,PACKAGE_VERSION); 31 31 32 32 return(psStringCopy(version)); -
trunk/psLib/src/sysUtils/psConfigure.c
r4205 r4214 13 13 * @author Robert DeSonia, MHPCC 14 14 * 15 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-06-1 0 01:41:35 $15 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-06-11 02:19:05 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 { 29 29 char version[80]; 30 snprintf(version,80,"%s-v%s",PACKAGE ,VERSION);30 snprintf(version,80,"%s-v%s",PACKAGE_NAME,PACKAGE_VERSION); 31 31 32 32 return(psStringCopy(version)); -
trunk/psLib/src/types/psPixels.c
r4212 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 0 21:46:46$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 89 89 pixels->n = pixels->nalloc; 90 90 } 91 92 return pixels; 93 } 94 95 psPixels* p_psPixelsAppend(psPixels* pixels, int growth, psS32 x, psS32 y) 96 { 97 if (growth < 1) { 98 growth = 10; 99 } 100 101 if ( (pixels == NULL) || (pixels->n >= pixels->nalloc) ) { 102 pixels=psPixelsRealloc(pixels, pixels->nalloc+growth); 103 } 104 105 int n = pixels->n; 106 107 pixels->data[n].x = x; 108 pixels->data[n].y = y; 109 110 pixels->n++; 91 111 92 112 return pixels; -
trunk/psLib/src/types/psPixels.h
r4162 r4214 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 08 23:40:45 $9 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-11 02:19:05 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 62 62 psPixels* pixels, ///< psPixels to resize, or NULL to create new psPixels 63 63 int size ///< the size of the coordinate vectors 64 ); 65 66 /** Add a pixel location to a psPixels 67 * 68 * @return psPixels* psPixels with the value appended. 69 */ 70 psPixels* p_psPixelsAppend( 71 psPixels* pixels, ///< psPixels to append new coordinate to. NULL creates a new one. 72 int growth, ///< number of elements to grow the psPixels list, if necessary. if growth < 1, 10 is used. 73 psS32 x, ///< x coordinate to append 74 psS32 y ///< y coordinate to append 64 75 ); 65 76 -
trunk/psLib/test/image/tst_psImageGeomManip.c
r4191 r4214 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-06- 09 19:40:51$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-06-11 02:19:05 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 static psS32 testImageShiftCase(psS32 cols, psS32 rows, float colShift,float rowShift); 32 32 static psS32 testImageResample(void); 33 static psS32 testImageTransform(void); 33 34 34 35 testDescription tests[] = { … … 38 39 {testImageShift,561,"psImageShift",0,false}, 39 40 {testImageResample,743,"psImageResample",0,false}, 41 {testImageTransform,-1,"psImageTransform",0,false}, 40 42 {NULL} 41 43 }; … … 1073 1075 } 1074 1076 1077 static psS32 testImageTransform(void) 1078 { 1079 1080 /// XXX: TODO 1081 return 0; 1082 }
Note:
See TracChangeset
for help on using the changeset viewer.
