Changeset 4526 for trunk/psLib/src/image
- Timestamp:
- Jul 8, 2005, 3:24:30 PM (21 years ago)
- Location:
- trunk/psLib/src/image
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r4493 r4526 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.7 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-07-0 7 02:17:53$11 * @version $Revision: 1.74 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-07-09 01:24:30 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 48 48 } 49 49 50 psImage* psImageAlloc( psU32numCols,51 psU32numRows,50 psImage* psImageAlloc(int numCols, 51 int numRows, 52 52 psElemType type) 53 53 { … … 149 149 150 150 psImage* psImageRecycle(psImage* old, 151 psU32numCols,152 psU32numRows,151 int numCols, 152 int numRows, 153 153 const psElemType type) 154 154 { -
trunk/psLib/src/image/psImage.h
r4493 r4526 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.6 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-07-0 7 02:17:53$13 * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-07-09 01:24:30 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 typedef struct psImage 52 52 { 53 const psMathType type; ///< Image data type and dimension.54 const psU32 numCols;///< Number of columns in image55 const psU32 numRows;///< Number of rows in image.56 const psS32 col0;///< Column position relative to parent.57 const psS32 row0;///< Row position relative to parent.53 const psMathType type; ///< Image data type and dimension. 54 const int numCols; ///< Number of columns in image 55 const int numRows; ///< Number of rows in image. 56 const int col0; ///< Column position relative to parent. 57 const int row0; ///< Row position relative to parent. 58 58 59 59 union { … … 77 77 78 78 psPtr rawDataBuffer; ///< Raw data buffer for Allocating/Freeing Images 79 void *lock; ///< Optional lock for thread safety 79 80 } 80 81 psImage; … … 103 104 */ 104 105 psImage* psImageAlloc( 105 psU32 numCols,///< Number of rows in image.106 psU32 numRows,///< Number of columns in image.106 int numCols, ///< Number of rows in image. 107 int numRows, ///< Number of columns in image. 107 108 psElemType type ///< Type of data for image. 108 ); 109 ) 110 ; 109 111 110 112 /** Create a psRegion with the specified attributes. … … 113 115 */ 114 116 psRegion psRegionSet( 115 float x0, ///< the first column of the region.116 float x1, ///< the last column of the region + 1.117 float y0, ///< the first row of the region.118 float y1 ///< the last row of the region + 1.117 float x0, ///< the first column of the region. 118 float x1, ///< the last column of the region + 1. 119 float y0, ///< the first row of the region. 120 float y1 ///< the last row of the region + 1. 119 121 ); 120 122 … … 146 148 psImage* psImageRecycle( 147 149 psImage* old, ///< the psImage to recycle by resizing image buffer 148 psU32 numCols,///< the desired number of columns in image149 psU32 numRows,///< the desired number of rows in image150 int numCols, ///< the desired number of columns in image 151 int numRows, ///< the desired number of rows in image 150 152 const psElemType type ///< the desired datatype of the image 151 153 ); -
trunk/psLib/src/image/psImageStructManip.c
r4493 r4526 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-07-0 7 02:17:53$10 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-07-09 01:24:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 { 32 32 psU32 elementSize; // size of image element in bytes 33 psU32 inputColOffset; // offset in bytes to first subset pixel in input row 33 psS32 inputColOffset; // offset in bytes to first subset pixel in input row 34 35 if ( col0 < 0 || row0 < 0 ) { 36 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, 37 // PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID); 38 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 39 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID, 40 col0, col1-1, row0, row1-1, 41 image->numCols-1, image->numRows-1); 42 return NULL; 43 } 34 44 35 45 if (image == NULL || image->data.V == NULL) { … … 64 74 return NULL; 65 75 } 76 77 78 66 79 psS32 numRows = row1-row0; 67 80 psS32 numCols = col1-col0; … … 95 108 out->data.V = psRealloc(out->data.V,sizeof(psPtr)*numRows); // resize row pointer array 96 109 *(psMathType*)&out->type = image->type; 97 *(psU32*)&out->numCols = numCols; 98 *(psU32*)&out->numRows = numRows; 110 // *(psU32*)&out->numCols = numCols; 111 // *(psU32*)&out->numRows = numRows; 112 *(psS32*)&out->numCols = numCols; 113 *(psS32*)&out->numRows = numRows; 99 114 *(psS32*)&out->row0 = row0; 100 115 *(psS32*)&out->col0 = col0;
Note:
See TracChangeset
for help on using the changeset viewer.
