Changeset 5530 for trunk/psLib/src/imageops
- Timestamp:
- Nov 16, 2005, 1:07:10 PM (21 years ago)
- Location:
- trunk/psLib/src/imageops
- Files:
-
- 2 edited
-
psImagePixelExtract.c (modified) (3 diffs)
-
psImageStats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImagePixelExtract.c
r5511 r5530 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-11-1 4 22:18:33$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-11-16 23:06:14 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 22 22 23 23 #include "psErrorText.h" 24 25 24 26 25 #define FUNC_MACRO_VECTOR_STORE_ROW(TYPE) \ … … 407 406 imgVec = psAlloc(sizeof(psVector)); 408 407 imgVec->type = input->type; 409 imgVec->n = *(int*)&imgVec->nalloc = numCols; 408 409 P_PSVECTOR_SET_NALLOC(imgVec,numCols); 410 imgVec->n = numCols; 410 411 if (mask != NULL) { 411 412 maskVec = psAlloc(sizeof(psVector)); 412 413 maskVec->type = mask->type; 413 maskVec->n = *(int*)&maskVec->nalloc = numCols; 414 P_PSVECTOR_SET_NALLOC(maskVec,numCols); 415 maskVec->n = numCols; 414 416 } 415 417 // recycle output to make a proper sized/type output structure -
trunk/psLib/src/imageops/psImageStats.c
r5294 r5530 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.8 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-1 0-12 21:02:20$11 * @version $Revision: 1.84 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-11-16 23:06:14 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 junkData = (psVector *) psAlloc(sizeof(psVector)); 65 65 junkData->type = in->type; 66 *(int*)&junkData->nalloc = in->numRows * in->numCols;66 P_PSVECTOR_SET_NALLOC(junkData,in->numRows * in->numCols); 67 67 junkData->n = junkData->nalloc; 68 68 junkData->data.U8 = in->data.V[0]; // since psImage data is contiguous... … … 88 88 junkMask = psAlloc(sizeof(psVector)); 89 89 junkMask->type = mask->type; 90 *(int*)&junkMask->nalloc = mask->numRows * mask->numCols;90 P_PSVECTOR_SET_NALLOC(junkMask,mask->numRows * mask->numCols); 91 91 junkMask->n = junkMask->nalloc; 92 92 junkMask->data.U8 = mask->data.V[0]; … … 137 137 junkData = (psVector *) psAlloc(sizeof(psVector)); 138 138 junkData->type = in->type; 139 *(int*)&junkData->nalloc = in->numRows * in->numCols;139 P_PSVECTOR_SET_NALLOC(junkData,in->numRows * in->numCols); 140 140 junkData->n = junkData->nalloc; 141 141 junkData->data.U8 = in->data.V[0]; // since psImage data is contiguous... … … 161 161 junkMask = psAlloc(sizeof(psVector)); 162 162 junkMask->type = mask->type; 163 *(int*)&junkMask->nalloc = mask->numRows * mask->numCols;163 P_PSVECTOR_SET_NALLOC(junkMask,mask->numRows * mask->numCols); 164 164 junkMask->n = junkMask->nalloc; 165 165 junkMask->data.U8 = mask->data.V[0];
Note:
See TracChangeset
for help on using the changeset viewer.
