IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14772


Ignore:
Timestamp:
Sep 7, 2007, 10:18:03 AM (19 years ago)
Author:
magnier
Message:

adjusted api to optionally return a vector containing the subset pixel values

Location:
branches/eam_branch_20070830/psLib/src/imageops
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070830/psLib/src/imageops/psImageBackground.c

    r12444 r14772  
    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}
  • branches/eam_branch_20070830/psLib/src/imageops/psImageBackground.h

    r11248 r14772  
    55 *  @author EAM, IfA
    66 *
    7  *  $Revision: 1.4 $ $Name: not supported by cvs2svn $
    8  *  $Date: 2007-01-23 22:47:23 $
     7 *  $Revision: 1.4.12.1 $ $Name: not supported by cvs2svn $
     8 *  $Date: 2007-09-07 20:18:03 $
    99 *  Copyright 2004-2005 IfA, University of Hawaii
    1010 */
     
    2222// Get the background for an image
    2323bool psImageBackground(psStats *stats, // desired measurement and options
     24                       psVector **sample, // vector of data used for analysis
    2425                       const psImage *image, // Image for which to get the background
    2526                       const psImage *mask, // Mask image
     
    3031/// @}
    3132#endif // #ifndef PS_IMAGE_BACKGROUND_H
     33
     34/* the user may supply a psVector ** or NULL to sample.  if a vector is supplied,
     35   the user must free the resulting vector */
Note: See TracChangeset for help on using the changeset viewer.