Changeset 6511 for trunk/psModules/src/imcombine
- Timestamp:
- Mar 3, 2006, 3:01:34 PM (20 years ago)
- Location:
- trunk/psModules/src/imcombine
- Files:
-
- 2 edited
-
pmImageCombine.c (modified) (9 diffs)
-
pmReadoutCombine.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmImageCombine.c
r5741 r6511 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 200 5-12-08 00:29:53 $10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-03-04 01:01:33 $ 12 12 * 13 13 * XXX: pmRejectPixels() has a known bug with the pmImageTransform() call. … … 113 113 if (*questionablePixels == NULL) { 114 114 *questionablePixels = psArrayAlloc(numImages); 115 (*questionablePixels)->n = numImages; 115 116 } else if ((*questionablePixels)->n != numImages) { 116 117 *questionablePixels = psArrayRealloc(*questionablePixels, numImages); … … 118 119 for (psS32 im = 0 ; im < numImages ; im++) { 119 120 psFree((*questionablePixels)->data[im]); 120 ((*questionablePixels)->data[im]) = (psPtr *) psPixelsAlloc(PS_COMBINE_IMAGE_INITIAL_PIXEL_LIST_LENGTH); 121 ((*questionablePixels)->data[im]) = 122 (psPtr *) psPixelsAlloc(PS_COMBINE_IMAGE_INITIAL_PIXEL_LIST_LENGTH); 121 123 ((psPixels *) ((*questionablePixels)->data[im]))->n = 0; 122 124 } … … 126 128 psVector *qpPtr = psVectorAlloc(numImages, PS_TYPE_S32); 127 129 PS_VECTOR_SET_S32(qpPtr, 0); 128 130 qpPtr->n = numImages; 129 131 // 130 132 // Allocate the necessary psVectors for the call to psVectorStats(). … … 133 135 // 134 136 psVector *pixelData = psVectorAlloc(numImages, PS_TYPE_F32); 135 137 pixelData->n = pixelData->nalloc; 136 138 psVector *pixelMask = NULL; 137 139 if (masks != NULL) { 138 140 pixelMask = psVectorAlloc(numImages, PS_TYPE_U8); 139 141 PS_VECTOR_SET_U8(pixelMask, 0); 142 pixelMask->n = numImages; 140 143 } 141 144 … … 144 147 pixelErrors = psVectorAlloc(numImages, PS_TYPE_F32); 145 148 PS_VECTOR_SET_F32(pixelErrors, 1.0); 149 pixelErrors->n = numImages; 146 150 } 147 151 … … 320 324 psVector *pixels = psVectorAlloc(8, PS_TYPE_F32); // Array of pixels 321 325 psVector *mask = psVectorAlloc(8, PS_TYPE_U8); // Corresponding mask 326 pixels->n = 8; 327 mask->n = 8; 322 328 323 329 // Get limits … … 536 542 // 537 543 psArray *rejects = psArrayAlloc(numImages); 544 rejects->n = numImages; 538 545 for (psS32 im = 0 ; im < numImages ; im++) { 539 546 rejects->data[im] = (psPtr *) psPixelsAlloc(PS_REJECT_PIXEL_INITIAL_PIXEL_LIST_LENGTH); 547 ((psPixels *)(rejects->data[im]))->n = ((psPixels *)(rejects->data[im]))->nalloc; 540 548 psPixels *pixels = (psPixels *) rejects->data[im]; 541 549 pixels->n = 0; … … 546 554 psVector *rPtr = psVectorAlloc(numImages, PS_TYPE_S32); 547 555 PS_VECTOR_SET_S32(rPtr, 0); 556 rPtr->n = numImages; 548 557 549 558 psS32 numCols = ((psImage *) images->data[0])->numCols; -
trunk/psModules/src/imcombine/pmReadoutCombine.c
r6325 r6511 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-0 2-06 21:03:25$7 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-03-04 01:01:33 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 176 176 177 177 psVector *tmpPixels = psVectorAlloc(numInputs, PS_TYPE_F32); 178 tmpPixels->n = tmpPixels->nalloc; 178 179 psVector *tmpPixelErrors = psVectorAlloc(numInputs, PS_TYPE_F32); 180 tmpPixelErrors->n = tmpPixelErrors->nalloc; 179 181 psVector *tmpPixelMask = psVectorAlloc(numInputs, PS_TYPE_U8); 182 tmpPixelMask->n = tmpPixelMask->nalloc; 180 183 psVector *tmpPixelMaskNKeep = psVectorAlloc(numInputs, PS_TYPE_U8); 184 tmpPixelMaskNKeep->n = tmpPixelMaskNKeep->nalloc; 181 185 psVector *outRowLower = psVectorAlloc(numInputs, PS_TYPE_U32); 186 outRowLower->n = outRowLower->nalloc; 182 187 psVector *outRowUpper = psVectorAlloc(numInputs, PS_TYPE_U32); 188 outRowUpper->n = outRowUpper->nalloc; 183 189 psVector *outColLower = psVectorAlloc(numInputs, PS_TYPE_U32); 190 outColLower->n = outColLower->nalloc; 184 191 psVector *outColUpper = psVectorAlloc(numInputs, PS_TYPE_U32); 192 outColUpper->n = outColUpper->nalloc; 185 193 pmReadout **tmpReadouts = (pmReadout **) psAlloc(numInputs * sizeof(pmReadout *)); 186 194 … … 414 422 psStats *diffStats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); 415 423 psVector *diffs = psVectorAlloc(fringePoints->n, PS_TYPE_F32); 424 diffs->n = diffs->nalloc; 416 425 417 426 // … … 517 526 psVector *localChipGains = chipGains; 518 527 if (numChips != chipGains->n) { 519 psLogMsg(__func__, PS_LOG_WARN, "WARNING: the chipGains vector length does not match the number of chips.\n"); 528 psLogMsg(__func__, PS_LOG_WARN, 529 "WARNING: the chipGains vector length does not match the number of chips.\n"); 520 530 localChipGains = psVectorAlloc(numChips, PS_TYPE_F64); 531 localChipGains->n = localChipGains->nalloc; 521 532 psBool rc = psVectorInit(localChipGains, 1.0); 522 533 if (rc == false) { … … 531 542 psBool meanFlag = false; 532 543 psVector *chipGainsMask = psVectorAlloc(chipGains->n, PS_TYPE_U8); 544 chipGainsMask->n = chipGainsMask->nalloc; 533 545 for (psS32 i = 0 ; i < chipGains->n ; i++) { 534 546 if ((fabs(chipGains->data.F64[i]) < FLT_EPSILON) ||
Note:
See TracChangeset
for help on using the changeset viewer.
