Changeset 1440 for trunk/psLib/src/image/psImage.c
- Timestamp:
- Aug 9, 2004, 1:34:58 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImage.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r1407 r1440 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.3 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.39 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 23:34:58 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 #include "psImage.h" 33 33 34 static void imageFree(psImage * image);34 static void imageFree(psImage* image); 35 35 36 36 /*****************************************************************************/ … … 40 40 /*****************************************************************************/ 41 41 42 psImage *psImageAlloc(unsigned int numCols, unsigned int numRows, const psElemType type)42 psImage* psImageAlloc(unsigned int numCols, unsigned int numRows, const psElemType type) 43 43 { 44 44 int area = 0; … … 61 61 } 62 62 63 psImage *image = (psImage *) psAlloc(sizeof(psImage));63 psImage* image = (psImage* ) psAlloc(sizeof(psImage)); 64 64 65 65 if (image == NULL) { … … 87 87 *(unsigned int *)&image->numCols = numCols; 88 88 *(unsigned int *)&image->numRows = numRows; 89 *(psDimen *) & image->type.dimen = PS_DIMEN_IMAGE;90 *(psElemType *) & image->type.type = type;89 *(psDimen* ) & image->type.dimen = PS_DIMEN_IMAGE; 90 *(psElemType* ) & image->type.type = type; 91 91 image->parent = NULL; 92 92 image->nChildren = 0; … … 96 96 } 97 97 98 static void imageFree(psImage * image)98 static void imageFree(psImage* image) 99 99 { 100 100 if (image == NULL) { … … 107 107 unsigned int oldNumRows = image->numRows; 108 108 unsigned int oldNumCols = image->numCols; 109 psPTR *rowPtr;109 psPTR* rowPtr; 110 110 111 111 for (unsigned int row = 0; row < oldNumRows; row++) { … … 124 124 } 125 125 126 psImage *psImageRecycle(psImage* old, unsigned int numCols, unsigned int numRows, const psElemType type)126 psImage* psImageRecycle(psImage* old, unsigned int numCols, unsigned int numRows, const psElemType type) 127 127 { 128 128 int elementSize = PSELEMTYPE_SIZEOF(type); // element … … 151 151 unsigned int oldNumRows = old->numRows; 152 152 unsigned int oldNumCols = old->numCols; 153 psPTR *rowPtr;153 psPTR* rowPtr; 154 154 155 155 for (unsigned int row = 0; row < oldNumRows; row++) { … … 177 177 *(unsigned int *)&old->numCols = numCols; 178 178 *(unsigned int *)&old->numRows = numRows; 179 *(psElemType *) & old->type.type = type;179 *(psElemType* ) & old->type.type = type; 180 180 181 181 return old; 182 182 } 183 183 184 int psImageFreeChildren(psImage * image)184 int psImageFreeChildren(psImage* image) 185 185 { 186 186 int i = 0; 187 187 int nChildren = 0; 188 psImage **children = NULL;188 psImage* *children = NULL; 189 189 int numFreed = 0; 190 190 … … 216 216 linear interpolation is performed on the image. 217 217 *****************************************************************************/ 218 psF32 psImagePixelInterpolate(const psImage * input,218 psF32 psImagePixelInterpolate(const psImage* input, 219 219 float x, float y, psF32 unexposedValue, psImageInterpolateMode mode) 220 220 { … … 259 259 260 260 #define PSIMAGE_PIXEL_INTERPOLATE_FLAT(TYPE) \ 261 inline psF64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage *input, \261 inline psF64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage* input, \ 262 262 float x, \ 263 263 float y, \ … … 280 280 281 281 #define PSIMAGE_PIXEL_INTERPOLATE_FLAT_COMPLEX(TYPE) \ 282 inline psC64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage *input, \282 inline psC64 p_psImagePixelInterpolateFLAT_##TYPE(const psImage* input, \ 283 283 float x, \ 284 284 float y, \ … … 313 313 PSIMAGE_PIXEL_INTERPOLATE_FLAT_COMPLEX(C64) 314 314 #define PSIMAGE_PIXEL_INTERPOLATE_BILINEAR(TYPE) \ 315 inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage *input, \315 inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage* input, \ 316 316 float x, \ 317 317 float y, \ … … 368 368 } 369 369 #define PSIMAGE_PIXEL_INTERPOLATE_BILINEAR_COMPLEX(TYPE) \ 370 inline psC64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage *input, \370 inline psC64 p_psImagePixelInterpolateBILINEAR_##TYPE(const psImage* input, \ 371 371 float x, \ 372 372 float y, \
Note:
See TracChangeset
for help on using the changeset viewer.
