Changeset 1440 for trunk/psLib/src/image/psImageExtraction.c
- Timestamp:
- Aug 9, 2004, 1:34:58 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImageExtraction.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageExtraction.c
r1407 r1440 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.9 $ $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 … … 23 23 #include "psError.h" 24 24 25 psImage *psImageSubset(psImage* out,26 psImage * image,25 psImage* psImageSubset(psImage* out, 26 psImage* image, 27 27 unsigned int numCols, unsigned int numRows, unsigned int col0, unsigned int row0) 28 28 { … … 83 83 *(int *)&out->row0 = row0; 84 84 *(int *)&out->col0 = col0; 85 *(psImage **) & out->parent = (psImage *) image;85 *(psImage* *) & out->parent = (psImage* ) image; 86 86 87 87 // add output image as a child of the input 88 88 // image. 89 89 image->nChildren++; 90 image->children = (psImage **) psRealloc(image->children, image->nChildren * sizeof(psImage *));90 image->children = (psImage* *) psRealloc(image->children, image->nChildren * sizeof(psImage* )); 91 91 image->children[image->nChildren - 1] = out; 92 92 … … 101 101 } 102 102 103 psImage *psImageCopy(psImage * restrict output, const psImage* input, psElemType type)103 psImage* psImageCopy(psImage* restrict output, const psImage* input, psElemType type) 104 104 { 105 105 psElemType inDatatype; … … 242 242 } 243 243 244 psVector *psImageSlice(psVector* out,245 psVector * slicePositions,246 const psImage * restrict in,247 const psImage * restrict mask,244 psVector* psImageSlice(psVector* out, 245 psVector* slicePositions, 246 const psImage* restrict in, 247 const psImage* restrict mask, 248 248 unsigned int maskVal, 249 249 unsigned int col, 250 250 unsigned int row, 251 251 unsigned int numCols, 252 unsigned int numRows, psImageCutDirection direction, const psStats * stats)252 unsigned int numRows, psImageCutDirection direction, const psStats* stats) 253 253 { 254 254 double statVal; 255 psStats *myStats;255 psStats* myStats; 256 256 psElemType type; 257 257 int inRows; 258 258 int inCols; 259 259 int delta = 1; 260 psF64 *outData;260 psF64* outData; 261 261 262 262 if (in == NULL || in->data.V == NULL) { … … 328 328 329 329 if (direction == PS_CUT_X_POS || direction == PS_CUT_X_NEG) { 330 psVector *imgVec = psVectorAlloc(numRows, type);331 psVector *maskVec = NULL;332 psMaskType *maskData = NULL;333 psU32 *outPosition = NULL;330 psVector* imgVec = psVectorAlloc(numRows, type); 331 psVector* maskVec = NULL; 332 psMaskType* maskData = NULL; 333 psU32* outPosition = NULL; 334 334 335 335 // recycle output to make a proper … … 362 362 if (maskVec != NULL) { \ 363 363 maskVecData = maskVec->data.V; \ 364 maskData = (psMaskType* )(mask->data.V[row]) + col + c; \364 maskData = (psMaskType* )(mask->data.V[row]) + col + c; \ 365 365 } \ 366 366 for (int r=0;r<numRows;r++) { \ … … 417 417 // Y 418 418 // direction 419 psVector *imgVec = NULL;420 psVector *maskVec = NULL;419 psVector* imgVec = NULL; 420 psVector* maskVec = NULL; 421 421 int elementSize = PSELEMTYPE_SIZEOF(type); 422 psU32 *outPosition = NULL;422 psU32* outPosition = NULL; 423 423 424 424 // fill in psVectors to fake out the
Note:
See TracChangeset
for help on using the changeset viewer.
