IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 18, 2006, 12:20:45 PM (20 years ago)
Author:
Paul Price
Message:

Updating to use psLib rel11. Main problem was that vector and array lengths ('n' element) are no longer set to equal the number of allocated values ('nalloc' element) when allocated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/shift.c

    r6771 r6887  
    126126    psArray *maps = psArrayAlloc(1);    // An array of one
    127127    psArray *masks = psArrayAlloc(1);   // An array of one
     128    images->n = maps->n = masks->n = 1;
    128129    images->data[0] = image;
    129130    maps->data[0] = map;
     
    132133    // Get size
    133134    if (outnx == 0 || outny == 0) {
    134         stacSize(&outnx, &outny, NULL, NULL, images, maps);
     135        psVector *xSize = psVectorAlloc(1, PS_TYPE_S32); // A vector of one
     136        psVector *ySize = psVectorAlloc(1, PS_TYPE_S32); // A vector of one
     137        xSize->n = 1;
     138        ySize->n = 1;
     139        xSize->data.S32[0] = image->numCols;
     140        ySize->data.S32[0] = image->numRows;
     141        stacSize(&outnx, &outny, NULL, NULL, xSize, ySize, maps);
     142        psFree(xSize);
     143        psFree(ySize);
    135144    }
    136145
Note: See TracChangeset for help on using the changeset viewer.