IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 24, 2006, 1:43:16 PM (20 years ago)
Author:
drobbin
Message:

Changed psArray & psVector to zero 'n' upon allocation. Used to set vector->n = nalloc.

File:
1 edited

Legend:

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

    r6294 r6484  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-02-02 04:41:42 $
     10 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-02-24 23:43:15 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    326326        // psStats.
    327327        out = psVectorRecycle(out, numCols, PS_TYPE_F64);
     328        out->n = numCols;
    328329        if (coords != NULL) {
    329330            coords = psPixelsRealloc(coords, numCols);
     
    342343            maskVec = psVectorAlloc(numRows, mask->type.type);
    343344        }
     345        imgVec->n = imgVec->nalloc;
     346        maskVec->n = maskVec->nalloc;
    344347        #define PSIMAGE_CUT_VERTICAL(TYPE) \
    345348    case PS_TYPE_##TYPE: { \
     
    408411        imgVec = psAlloc(sizeof(psVector));
    409412        imgVec->type = input->type;
    410 
    411413        P_PSVECTOR_SET_NALLOC(imgVec,numCols);
    412         imgVec->n = numCols;
    413414        if (mask != NULL) {
    414415            maskVec = psAlloc(sizeof(psVector));
    415416            maskVec->type = mask->type;
    416417            P_PSVECTOR_SET_NALLOC(maskVec,numCols);
    417             maskVec->n = numCols;
    418418        }
    419419        // recycle output to make a proper sized/type output structure
     
    421421        // psStats.
    422422        out = psVectorRecycle(out, numRows, PS_TYPE_F64);
     423        out->n = numRows;
     424        imgVec->n = imgVec->nalloc;
     425        maskVec->n = maskVec->nalloc;
    423426        if (coords != NULL) {
    424427            coords = psPixelsRealloc(coords, numRows);
Note: See TracChangeset for help on using the changeset viewer.