Changeset 9730 for trunk/psModules/src/imcombine
- Timestamp:
- Oct 24, 2006, 12:55:05 PM (20 years ago)
- Location:
- trunk/psModules/src/imcombine
- Files:
-
- 3 edited
-
pmImageCombine.c (modified) (8 diffs)
-
pmImageSubtract.c (modified) (9 diffs)
-
pmReadoutCombine.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmImageCombine.c
r8815 r9730 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $11 * @date $Date: 2006- 09-15 09:49:01$10 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-10-24 22:55:05 $ 12 12 * 13 13 * XXX: pmRejectPixels() has a known bug with the pmImageTransform() call. … … 122 122 if (*questionablePixels == NULL) { 123 123 *questionablePixels = psArrayAlloc(numImages); 124 (*questionablePixels)->n = numImages;125 124 } else if ((*questionablePixels)->n != numImages) { 126 125 *questionablePixels = psArrayRealloc(*questionablePixels, numImages); … … 137 136 psVector *qpPtr = psVectorAlloc(numImages, PS_TYPE_S32); 138 137 psVectorInit(qpPtr, 0); 139 qpPtr->n = numImages;140 138 // 141 139 // Allocate the necessary psVectors for the call to psVectorStats(). … … 144 142 // 145 143 psVector *pixelData = psVectorAlloc(numImages, PS_TYPE_F32); 146 pixelData->n = pixelData->nalloc;147 144 psVector *pixelMask = NULL; 148 145 if (masks != NULL) { 149 146 pixelMask = psVectorAlloc(numImages, PS_TYPE_U8); 150 147 psVectorInit(pixelMask, 0); 151 pixelMask->n = numImages;152 148 } 153 149 … … 156 152 pixelErrors = psVectorAlloc(numImages, PS_TYPE_F32); 157 153 psVectorInit(pixelErrors, 1.0); 158 pixelErrors->n = numImages;159 154 } 160 155 … … 320 315 psVector *pixels = psVectorAlloc(8, PS_TYPE_F32); // Array of pixels 321 316 psVector *mask = psVectorAlloc(8, PS_TYPE_U8); // Corresponding mask 322 pixels->n = 8;323 mask->n = 8;324 317 325 318 // Get limits … … 538 531 // 539 532 psArray *rejects = psArrayAlloc(numImages); 540 rejects->n = numImages;541 533 for (psS32 im = 0 ; im < numImages ; im++) { 542 534 rejects->data[im] = (psPtr *) psPixelsAlloc(PS_REJECT_PIXEL_INITIAL_PIXEL_LIST_LENGTH); … … 550 542 psVector *rPtr = psVectorAlloc(numImages, PS_TYPE_S32); 551 543 psVectorInit(rPtr, 0); 552 rPtr->n = numImages;553 544 554 545 psS32 numCols = ((psImage *) images->data[0])->numCols; -
trunk/psModules/src/imcombine/pmImageSubtract.c
r8815 r9730 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2006- 09-15 09:49:01$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-10-24 22:55:05 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 122 122 tmp->u = psVectorAlloc(nBF, PS_TYPE_F32); 123 123 tmp->v = psVectorAlloc(nBF, PS_TYPE_F32); 124 tmp->u->n = tmp->u->nalloc;125 tmp->v->n = tmp->v->nalloc;126 124 tmp->sigma = NULL; 127 125 tmp->xOrder = psVectorAlloc(nBF, PS_TYPE_F32); 128 tmp->xOrder->n = tmp->xOrder->nalloc;129 126 tmp->yOrder = psVectorAlloc(nBF, PS_TYPE_F32); 130 tmp->yOrder->n = tmp->yOrder->nalloc;131 127 tmp->subIndex = 0; 132 128 tmp->preCalc = NULL; … … 223 219 tmp->u = psVectorAlloc(nBF, PS_TYPE_F32); 224 220 tmp->v = psVectorAlloc(nBF, PS_TYPE_F32); 225 tmp->u->n = tmp->u->nalloc;226 tmp->v->n = tmp->v->nalloc;227 221 tmp->sigma = psVectorAlloc(nBF, PS_TYPE_F32); 228 222 tmp->xOrder = psVectorAlloc(nBF, PS_TYPE_F32); … … 232 226 tmp->spatialOrder = spatialOrder; 233 227 tmp->preCalc = psArrayAlloc(nBF); 234 tmp->u->n = tmp->u->nalloc;235 tmp->v->n = tmp->v->nalloc;236 tmp->sigma->n = tmp->sigma->nalloc;237 tmp->xOrder->n = tmp->xOrder->nalloc;238 tmp->yOrder->n = tmp->yOrder->nalloc;239 tmp->preCalc->n = tmp->preCalc->nalloc;240 228 241 229 // … … 367 355 } else { 368 356 stamps = (psArray *) psArrayAlloc(xNum * yNum); 369 stamps->n = stamps->nalloc;370 357 for (psS32 s = 0 ; s < (xNum * yNum) ; s++) { 371 358 stamps->data[s] = (psPtr *) p_pmStampAlloc(PM_STAMP_REJECTED); … … 826 813 if (stampVector == NULL) { 827 814 stampVector = psVectorAlloc(numSolveParams, PS_TYPE_F64); 828 stampVector->n = stampVector->nalloc;829 815 stamp->vector = stampVector; 830 816 } else { … … 1045 1031 } else { 1046 1032 solution = psVectorAlloc(size, PS_TYPE_F64); 1047 solution->n = solution->nalloc;1048 1033 } 1049 1034 … … 1057 1042 psImage *sumMatrix = psImageAlloc(size, size, PS_TYPE_F64); 1058 1043 psVector *sumVector = psVectorAlloc(size, PS_TYPE_F64); 1059 sumVector->n = sumVector->nalloc;1060 1044 psVectorInit(sumVector, 0.0); 1061 1045 psImageInit(sumMatrix, 0.0); … … 1150 1134 } else { 1151 1135 deviations = psVectorAlloc(stamps->n, PS_TYPE_F32); 1152 deviations->n = deviations->nalloc;1153 1136 // XXX: Probably not necessary. 1154 1137 psVectorInit(deviations, 0.0); -
trunk/psModules/src/imcombine/pmReadoutCombine.c
r9611 r9730 201 201 202 202 psVector *pixels = psVectorAlloc(inputs->n, PS_TYPE_F32); // Stack of pixels 203 pixels->n = inputs->n;204 203 psF32 *pixelsData = pixels->data.F32; // Dereference pixels 205 204 206 205 psVector *mask = psVectorAlloc(inputs->n, PS_TYPE_U8); // Mask for stack 207 mask->n = inputs->n;208 206 psU8 *maskData = mask->data.U8; // Dereference mask 209 207 … … 212 210 if (haveWeights) { 213 211 weights = psVectorAlloc(inputs->n, PS_TYPE_F32); // Stack of weights 214 weights->n = inputs->n;215 212 weightsData = weights->data.F32; 216 213 }
Note:
See TracChangeset
for help on using the changeset viewer.
