IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 23, 2004, 4:00:21 PM (22 years ago)
Author:
desonia
Message:

initial coding of psImageSlice and changed psImageRotate to be more inline
with ADD (mathematically equivalent).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psStats.c

    r1284 r1292  
    18391839    return(stats);
    18401840}
     1841
     1842bool p_psGetStatValue(const psStats* stats, double* value)
     1843{
     1844
     1845    switch (stats->options &
     1846            ~ (PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
     1847    case PS_STAT_SAMPLE_MEAN:
     1848        *value = stats->sampleMean;
     1849        return true;
     1850
     1851    case PS_STAT_SAMPLE_MEDIAN:
     1852        *value = stats->sampleMedian;
     1853        return true;
     1854
     1855    case PS_STAT_SAMPLE_STDEV:
     1856        *value = stats->sampleStdev;
     1857        return true;
     1858
     1859    case PS_STAT_ROBUST_MEAN:
     1860        *value = stats->robustMean;
     1861        return true;
     1862
     1863    case PS_STAT_ROBUST_MEDIAN:
     1864        *value = stats->robustMedian;
     1865        return true;
     1866
     1867    case PS_STAT_ROBUST_MODE:
     1868        *value = stats->robustMode;
     1869        return true;
     1870
     1871    case PS_STAT_ROBUST_STDEV:
     1872        *value = stats->robustStdev;
     1873        return true;
     1874
     1875    case PS_STAT_CLIPPED_MEAN:
     1876        *value = stats->clippedMean;
     1877        return true;
     1878
     1879    case PS_STAT_CLIPPED_STDEV:
     1880        *value = stats->clippedStdev;
     1881        return true;
     1882
     1883    case PS_STAT_MAX:
     1884        *value = stats->max;
     1885        return true;
     1886
     1887    case PS_STAT_MIN:
     1888        *value = stats->min;
     1889        return true;
     1890
     1891    default:
     1892        return false;
     1893    }
     1894}
Note: See TracChangeset for help on using the changeset viewer.