IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 12:55:05 PM (20 years ago)
Author:
Paul Price
Message:

Following today's meeting, we agreed that psVectorAlloc (and therefore
psArrayAlloc also) shall set the number of elements in use to equal the
number of elements allocated. We introduce new functions,
psVectorAllocEmpty and psArrayAllocEmpty, that allocate a vector and set
the length to zero.

File:
1 edited

Legend:

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

    r8232 r9730  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-08-08 23:32:23 $
     12 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-10-24 22:52:55 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8080    }
    8181
    82     vec = psVectorAlloc(scale * scale, in->type.type);
     82    vec = psVectorAllocEmpty(scale * scale, in->type.type);
    8383
    8484    if (mask != NULL) {
     
    9393            return NULL;
    9494        }
    95         maskVec = psVectorAlloc(scale * scale, PS_TYPE_MASK);
    96         maskVec->n = maskVec->nalloc;
     95        maskVec = psVectorAllocEmpty(scale * scale, PS_TYPE_MASK);
    9796        maskData = maskVec->data.PS_TYPE_MASK_DATA;
    9897    }
     
    134133                } \
    135134                vec->n = n; \
     135                maskVec->n = n; \
    136136                myStats = psVectorStats(myStats, vec, NULL, maskVec, maskVal); \
    137137                outRowData[col] = (ps##TYPE)psStatsGetValue(myStats, statistic); \
Note: See TracChangeset for help on using the changeset viewer.