IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 28, 2004, 5:54:52 PM (22 years ago)
Author:
evanalst
Message:

Changed the data type Histogram member nums to be of type psU32 per SDR.

File:
1 edited

Legend:

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

    r1326 r1327  
    16001600
    16011601    // Allocate the bins, and initialize them to zero.
    1602     newHist->nums =  psVectorAlloc(n, PS_TYPE_S32);
     1602    newHist->nums =  psVectorAlloc(n, PS_TYPE_U32);
    16031603    newHist->nums->n = newHist->nums->nalloc;
    16041604    for (i=0;i<newHist->nums->n;i++) {
    1605         newHist->nums->data.S32[i] = 0;
     1605        newHist->nums->data.U32[i] = 0;
    16061606    }
    16071607
     
    16561656    // Allocate the bins, and initialize them to zero.  If there are N bounds,
    16571657    // then there are N-1 bins.
    1658     newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_S32);
     1658    newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_U32);
    16591659    newHist->nums->n = newHist->nums->nalloc;
    16601660    for (i=0;i<newHist->nums->n;i++) {
    1661         newHist->nums->data.S32[i] = 0;
     1661        newHist->nums->data.U32[i] = 0;
    16621662    }
    16631663
     
    17051705    if (out == NULL) {
    17061706        return(NULL);
     1707    }
     1708
     1709    // Check the specified output histogram for type psF32
     1710    if (out->bounds->type.type != PS_TYPE_F32) {
     1711        psAbort(__func__,
     1712                "Only data type PS_TYPE_F32 for the output.bounds member.");
     1713    }
     1714
     1715    if (out->nums->type.type != PS_TYPE_U32) {
     1716        psAbort(__func__,
     1717                "Only data type PS_TYPE_U32 for output.nums member.");
    17071718    }
    17081719
Note: See TracChangeset for help on using the changeset viewer.