Changeset 4290 for trunk/psModules/src/pmImageCombine.c
- Timestamp:
- Jun 16, 2005, 1:11:41 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmImageCombine.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmImageCombine.c
r4227 r4290 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-1 3 20:27:06$10 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-16 23:11:41 $ 12 12 * 13 13 * XXX: pmRejectPixels() has a known bug with the pmImageTransform() call. … … 207 207 (fabs(sigmaClip * stdev) + fabs(combinedPixel))) { 208 208 numRejects++; 209 //printf("Rejecting pixel. Image %d. (row, col) (%d, %d)\n", im, row, col);210 209 pixelMask->data.U8[im] = maskVal; 211 210 // … … 225 224 ((psPixels *) ((*questionablePixels)->data[im]))->data[ptr].y = row; 226 225 (qpPtr->data.S32[im])++; 226 // XXX: this pixel ->n increment is wierd 227 227 ((psPixels *) ((*questionablePixels)->data[im]))->n = qpPtr->data.S32[im]; 228 228 } … … 341 341 return median / image->data.F32[y][x]; 342 342 } 343 344 343 345 344 /****************************************************************************** … … 361 360 myRegion.y0 = PS_MAX_F32; 362 361 myRegion.y1 = PS_MIN_F32; 363 364 362 psPlane in; 365 363 psPlane out; … … 465 463 I think they mean syncs with PWP. 466 464 XXX: Must add mask parameter, use it in gradient calculation. 467 XXX: This function does not work.468 465 *****************************************************************************/ 469 466 psArray *pmRejectPixels(const psArray *images, ///< Array of input images … … 475 472 ) 476 473 { 477 psLogMsg(__func__, PS_LOG_WARN, "WARNING: pmRejectPixels() has known bugs. Specifically, in the psImageTransform() call.\n");478 474 PS_ASSERT_PTR_NON_NULL(images, NULL); 479 475 PS_ASSERT_PTR_NON_NULL(errors, NULL); … … 534 530 // Transform that mask image into detector coordinate space 535 531 // 536 psRegion myRegion = DetermineRegion(maskImageF32, myOutToIn);532 psRegion myRegionXForm = DetermineRegion(maskImageF32, myOutToIn); 537 533 psImage *transformedImage = psImageTransform(NULL, NULL, maskImageF32, NULL, 538 0, myOutToIn, myRegion , NULL,534 0, myOutToIn, myRegionXForm, NULL, 539 535 PS_INTERPOLATE_BILINEAR, 0); 540 //541 // XXX: Currently, a possibly buggy psImageTransform() corrupts the data in542 // in outToIn, and possibly other places. The following printf() demonstrates543 // this in conjunction with the test code.544 //545 //546 // psPlaneTransform *tmpOutToIn2 = (psPlaneTransform *) outToIn->data[0];547 // printf("tmpOutToIn2: (%d, %d) (%d %d)\n", tmpOutToIn2->x->nX, tmpOutToIn2->x->nY, tmpOutToIn2->y->nX, tmpOutToIn2->y->nY);548 //549 536 550 537 // … … 566 553 psF32 meanGrads = 0.0; 567 554 psS32 numGrads = 0; 568 569 555 // 570 556 // Loop through all other images, calculate their mean gradient. … … 599 585 // pixelList is large enough; if not, we realloc() 600 586 // 601 602 587 psS32 ptr = rPtr->data.S32[im]; 603 588 psPixels *pixelListPtr = (psPixels *) rejects->data[im]; … … 611 596 ((psPixels *) rejects->data[im])->data[ptr].y = (pixelList->data[p]).y; 612 597 (rPtr->data.S32[im])++; 598 // XXX: this pixel ->n increment is wierd 599 (((psPixels *) rejects->data[im])->n)++; 613 600 } 614 601 } 615 602 } 616 psFree(myInToOut); 617 psFree(myOutToIn); 603 618 604 psFree(maskImage); 619 605 psFree(maskImageF32); … … 625 611 return(rejects); 626 612 } 627
Note:
See TracChangeset
for help on using the changeset viewer.
