Changeset 6750 for trunk/psLib/test/imageops/tst_psImagePixelExtract.c
- Timestamp:
- Mar 31, 2006, 4:43:57 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tst_psImagePixelExtract.c
r6484 r6750 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 2-24 23:43:15$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-01 02:43:57 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 static psS32 testImageCut(void); 22 22 static psS32 testImageRadialCut(void); 23 static psS32 testImageRowColError(void); 23 24 static psS32 testImageRowColF32(void); 24 25 static psS32 testImageRowColF64(void); … … 37 38 {testImageSlice, 552, "psImageSlice", 0, false}, 38 39 {testImageCut, 555, "psImageCut", 0, false}, 39 {testImageRadialCut, 557, "psImageRadialCut", 0, false}, 40 {testImageRadialCut, 556, "psImageRadialCut", 0, false}, 41 {testImageRowColError, 557, "testImageRowColError", 0, false}, 40 42 {testImageRowColF32, 558, "psImageRowColF32", 0, false}, 41 43 {testImageRowColF64, 559, "psImageRowColF64", 0, false}, … … 765 767 } 766 768 767 psS32 testImageRowColF64(void) 768 { 769 psVector *rowcol = NULL; 770 psVector *empty = NULL; 769 psS32 testImageRowColError(void) 770 { 771 771 psImage *image = NULL; 772 psImage *emptyImage = NULL; 772 psVector *out = NULL; 773 int num = 0; 774 775 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 776 out = psImageRow(NULL, image, num); 777 if (out != NULL) { 778 return 1; 779 } 780 773 781 774 782 image = psImageAlloc(3, 3, PS_TYPE_F64); 775 rowcol = psVectorAlloc(3, PS_TYPE_F64);776 783 *(psS32*)&(image->row0) = 5; 784 *(psS32*)&(image->col0) = 10; 777 785 image->data.F64[0][0] = 666.666; 778 786 image->data.F64[1][0] = 66.6; … … 785 793 image->data.F64[2][2] = 66.66; 786 794 795 796 797 psFree(out); 798 psFree(image); 799 return 0; 800 } 801 802 psS32 testImageRowColF64(void) 803 { 804 psVector *rowcol = NULL; 805 psVector *empty = NULL; 806 psImage *image = NULL; 807 psImage *emptyImage = NULL; 808 809 image = psImageAlloc(3, 3, PS_TYPE_F64); 810 rowcol = psVectorAlloc(3, PS_TYPE_F64); 811 812 image->data.F64[0][0] = 666.666; 813 image->data.F64[1][0] = 66.6; 814 image->data.F64[2][0] = 6.66; 815 image->data.F64[0][1] = 6.6; 816 image->data.F64[1][1] = 6.666; 817 image->data.F64[2][1] = 66.666; 818 image->data.F64[0][2] = 666.6; 819 image->data.F64[1][2] = 666.66; 820 image->data.F64[2][2] = 66.66; 821 787 822 //Test for error with NULL image 788 823 empty = psImageCol(empty, emptyImage, 0);
Note:
See TracChangeset
for help on using the changeset viewer.
