IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 8, 2006, 1:38:54 AM (19 years ago)
Author:
magnier
Message:
  • moved psHistogram functions to psHistogram.c,h (pslib_strict.h, MAkefile.am, psMemory.c)
  • changed psVectorStats return value to bool (psImageGeomManip.c, psImagePixelExtract.c, psImageStats.c, psMinPoly.c,
  • added FITTED_MEAN,STDEV_V2 (quadratic fit to log-peak)
  • added stats->results
  • set stats->results when stats are measured
  • return stats calculated even if not requested
  • moved vectorFittedStats call out of vectorRobustStats to psVectorStats
  • internal calls to private stats function XXX now tests stats->results for the corresponding flag, NOT if value of stats->XXX == NAN.
  • dropped unused function NonEmpty (commented out)
  • rolled up vectorSampleMedian with if tests in the loop
  • rolled up vectorSampleStdev with if tests in the loop
  • call psError on failure for any internal stats call (the user should call psErrorClear if they ignore errors from psVectorStats)
File:
1 edited

Legend:

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

    r10396 r10550  
    7373        if (!psVectorSort(values, values)) {
    7474            psError(PS_ERR_UNKNOWN, false, "Unable to sort values.\n");
    75             psFree(stats);
    7675            psFree(values);
    77             return NULL;
     76            return false;
    7877        }
    7978
     
    9190    } else {
    9291        // XXX leave this as a psphot user option (passed in as part of stats?)
    93         if (stats->options & PS_STAT_FITTED_MEAN) {
     92        if ((stats->options & PS_STAT_FITTED_MEAN) || (stats->options & PS_STAT_FITTED_MEAN_V2)) {
    9493            stats->clipSigma = 1.0;
    9594        }
    96         if (psVectorStats (stats, values, NULL, NULL, 0) == NULL) {
     95        if (!psVectorStats (stats, values, NULL, NULL, 0)) {
    9796            psError(PS_ERR_UNKNOWN, false, "Unable to measure statistics for image background "
    9897                    "(%dx%d, (row0,col0) = (%d,%d)",
    9998                    image->numRows, image->numCols, image->row0, image->col0);
    100             psFree(stats);
    10199            psFree(values);
    102             return NULL;
     100            return false;
    103101        }
    104102    }
    105103
    106104    psFree(values);
    107     return stats;
     105    return true;
    108106}
Note: See TracChangeset for help on using the changeset viewer.