IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 20, 2007, 1:52:52 PM (19 years ago)
Author:
eugene
Message:

adding ability to return the subsample used for the stats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageBackground.c

    r12444 r14922  
    1818// XXX allow the user to choose the stats method?
    1919// (SAMPLE_MEAN, CLIPPED_MEAN, ROBUST_MEDIAN, FITTED_MEAN)
    20 bool psImageBackground(psStats *stats, const psImage *image, const psImage *mask, psMaskType maskValue, psRandom *rng)
     20bool psImageBackground(psStats *stats, psVector **sample, const psImage *image, const psImage *mask, psMaskType maskValue, psRandom *rng)
    2121{
    2222    PS_ASSERT_IMAGE_NON_NULL(image, NULL);
     
    115115    }
    116116
    117     psFree(values);
     117    if (sample != NULL) {
     118        *sample = values;
     119    } else {
     120        psFree(values);
     121    }
    118122    return true;
    119123}
Note: See TracChangeset for help on using the changeset viewer.