Changeset 6294 for trunk/psLib/src/imageops/psImagePixelExtract.c
- Timestamp:
- Feb 1, 2006, 6:41:45 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImagePixelExtract.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelExtract.c
r5530 r6294 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $11 * @date $Date: 200 5-11-16 23:06:14$10 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-02-02 04:41:42 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 216 216 217 217 psVector* psImageSlice(psVector* out, 218 ps Vector* coords,218 psPixels* coords, 219 219 const psImage* input, 220 220 const psImage* mask, … … 320 320 psVector* maskVec = NULL; 321 321 psMaskType* maskData = NULL; 322 ps U32* outPosition = NULL;322 psPixelCoord* outPosition = NULL; 323 323 324 324 // recycle output to make a proper sized/type output structure … … 327 327 out = psVectorRecycle(out, numCols, PS_TYPE_F64); 328 328 if (coords != NULL) { 329 coords = psVectorRecycle(coords, numCols, PS_TYPE_U32); 330 outPosition = coords->data.U32; 329 coords = psPixelsRealloc(coords, numCols); 330 coords->n = numCols; 331 outPosition = coords->data; 331 332 } 332 333 outData = out->data.F64; … … 363 364 *outData = statVal; \ 364 365 if (outPosition != NULL) { \ 365 *outPosition = c; \ 366 outPosition->x = c; \ 367 outPosition->y = row0; \ 366 368 outPosition += delta; \ 367 369 } \ … … 401 403 psVector* maskVec = NULL; 402 404 psS32 elementSize = PSELEMTYPE_SIZEOF(type); 403 ps U32* outPosition = NULL;405 psPixelCoord* outPosition = NULL; 404 406 405 407 // fill in psVector to fake out the statistics functions. … … 420 422 out = psVectorRecycle(out, numRows, PS_TYPE_F64); 421 423 if (coords != NULL) { 422 coords = psVectorRecycle(coords, numRows, PS_TYPE_U32); 423 outPosition = coords->data.U32; 424 coords = psPixelsRealloc(coords, numRows); 425 coords->n = numRows; 426 outPosition = coords->data; 424 427 } 425 428 outData = out->data.F64; … … 442 445 *outData = statVal; 443 446 if (outPosition != NULL) { 444 *outPosition = r; 447 outPosition->y = r; 448 outPosition->x = col0; 445 449 outPosition += delta; 446 450
Note:
See TracChangeset
for help on using the changeset viewer.
