Changeset 24837
- Timestamp:
- Jul 17, 2009, 1:14:17 PM (17 years ago)
- Location:
- trunk/ppMerge/src
- Files:
-
- 2 edited
-
ppMergeArguments.c (modified) (2 diffs)
-
ppMergeLoop.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeArguments.c
r24821 r24837 170 170 psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-xsmooth", 0, "Number of smoothing regions in x", 0); 171 171 psMetadataAddS32(arguments, PS_LIST_TAIL, "-fringe-ysmooth", 0, "Number of smoothing regions in y", 0); 172 psMetadataAddBool(arguments, PS_LIST_TAIL, "-fringe-smooth", 0, "Smooth output image", false); 173 psMetadataAddF32(arguments, PS_LIST_TAIL, "-fringe-smooth-sigma", 0, "Size of smoothing Gaussian", NAN); 172 174 173 175 /** CTEMASK construction parameters */ … … 329 331 VALUE_ARG_RECIPE_INT("-fringe-xsmooth", "FRINGE.XSMOOTH", S32, 0); 330 332 VALUE_ARG_RECIPE_INT("-fringe-ysmooth", "FRINGE.YSMOOTH", S32, 0); 333 VALUE_ARG_RECIPE_BOOL("-fringe-smooth", "FRINGE.SMOOTH"); 334 VALUE_ARG_RECIPE_FLOAT("-fringe-smooth-sigma", "FRINGE.SMOOTH.SIGMA", F32); 331 335 332 336 /** CTEMASK construction parameters */ -
trunk/ppMerge/src/ppMergeLoop.c
r24797 r24837 65 65 int fringeSmoothX = psMetadataLookupS32(NULL, arguments, "FRINGE.XSMOOTH"); // Smoothing regions in x 66 66 int fringeSmoothY = psMetadataLookupS32(NULL, arguments, "FRINGE.YSMOOTH"); // Smoothing regions in y 67 bool fringeSmooth = psMetadataLookupBool(NULL, arguments, "FRINGE.SMOOTH"); // Smooth the output image? 68 float fringeSmoothSigma = psMetadataLookupF32(NULL, arguments, "FRINGE.SMOOTH.SIGMA"); // Smooth the output image? 67 69 68 70 // set the mask and mark bit values based on the named masks … … 416 418 // Put the new readout into the cell after the existing readouts. 417 419 if (type == PPMERGE_TYPE_FRINGE && outRO) { 418 pmFringeRegions *regions = pmFringeRegionsAlloc(fringeNum, fringeSize, fringeSize, 419 fringeSmoothX, fringeSmoothY); 420 if (fringeSmooth) { 421 if (outRO->mask) { 422 psImage *smoothed = psImageSmoothMask (NULL, outRO->image, outRO->mask, maskVal, fringeSmoothSigma, 3, 0.2); 423 psFree (outRO->image); 424 outRO->image = smoothed; 425 } else { 426 psImageSmooth (outRO->image, fringeSmoothSigma, 3); 427 } 428 } 429 430 pmFringeRegions *regions = pmFringeRegionsAlloc(fringeNum, fringeSize, fringeSize, fringeSmoothX, fringeSmoothY); 420 431 pmFringeStats *fringe = pmFringeStatsMeasure(regions, outRO, maskVal); 421 432 psFree(regions); … … 429 440 fringes->data[0] = fringe; 430 441 431 pmFringesFormat(outCell, NULL, fringes); 442 // XXX replaced this : pmFringesFormat(outCell, NULL, fringes); 443 if (!psMetadataAdd(outCell->analysis, PS_LIST_TAIL, "FRINGE.MEASUREMENTS", PS_DATA_ARRAY, "Fringes", fringes)) { 444 psError(PS_ERR_UNKNOWN, false, "Unable to add fringe to analysis metadata\n"); 445 goto ERROR; 446 } 432 447 psFree(fringes); // Drop reference 433 448 }
Note:
See TracChangeset
for help on using the changeset viewer.
