IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 3, 2006, 3:01:34 PM (20 years ago)
Author:
drobbin
Message:

Updated files to reflect psArray, psVector, & psPixels changes in psLib that set n=0 upon allocation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/imcombine/tst_pmImageCombine.c

    r5258 r6511  
    1010 *  XXX: Must test masks with pmRejectPixels()
    1111 *
    12  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-10-10 21:58:34 $
     12 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-03-04 01:01:34 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6767    psArray *errors = psArrayAlloc(numImages);
    6868    psArray *masks = psArrayAlloc(numImages);
     69    images->n = images->nalloc;
     70    errors->n = errors->nalloc;
     71    masks->n = masks->nalloc;
    6972    for (psS32 i = 0 ; i < numImages ; i++) {
    7073        images->data[i] = (psPtr *) psImageAlloc(numCols, numRows, PS_TYPE_F32);
     
    9497    psArray *errorsLong = psArrayAlloc(numImages+1);
    9598    psArray *masksLong = psArrayAlloc(numImages+1);
     99    imagesLong->n = imagesLong->nalloc;
     100    errorsLong->n = errorsLong->nalloc;
     101    masksLong->n = masksLong->nalloc;
    96102    for (psS32 i = 0 ; i < numImages+1 ; i++) {
    97103        imagesLong->data[i] = (psPtr *) psImageAlloc(numCols, numRows, PS_TYPE_F32);
     
    121127    psArray *errorsBadType = psArrayAlloc(numImages);
    122128    psArray *masksBadType = psArrayAlloc(numImages);
     129    imagesBadType->n = imagesBadType->nalloc;
     130    errorsBadType->n = errorsBadType->nalloc;
     131    masksBadType->n = masksBadType->nalloc;
    123132    for (psS32 i = 0 ; i < numImages ; i++) {
    124133        imagesBadType->data[i] = (psPtr *) psImageAlloc(numCols, numRows, PS_TYPE_F64);
     
    143152
    144153    psPixels *pixels = psPixelsAlloc(TST00_NUM_PIXELS);
     154    pixels->n = pixels->nalloc;
    145155    for (psS32 p = 0 ; p < TST00_NUM_PIXELS ; p++) {
    146156        psS32 col =  genRanInt(0, numCols);
     
    284294    psArray *expandTransforms = psArrayAlloc(numImages);
    285295    psArray *contractTransforms = psArrayAlloc(numImages);
     296    expandTransforms->n = expandTransforms->nalloc;
     297    contractTransforms->n = contractTransforms->nalloc;
    286298    for (psS32 im = 0 ; im < numImages ; im++) {
    287299        psPlaneTransform *ptExpand = psPlaneTransformAlloc(2, 2);
Note: See TracChangeset for help on using the changeset viewer.