IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2007, 12:54:56 PM (19 years ago)
Author:
Paul Price
Message:

Updating following API change to psImagePixelInterpolate

File:
1 edited

Legend:

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

    r9740 r12744  
    111111#endif
    112112
     113        psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR,
     114                                                                           reject, NULL, NULL, 0, 0.0, 0.0,
     115                                                                           0, 0, 0.0);
     116
    113117        // Transform the mask
    114118        // Optimisation option is to only transform the pixels that have been rejected in the output,
     
    125129                    inCoords->y = (double)y + 0.5;
    126130                    (void)psPlaneTransformApply(outCoords, map, inCoords);
    127                     float maskVal = (float)psImagePixelInterpolate(reject, outCoords->x, outCoords->y,
    128                                                                    NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
     131                    double maskVal;
     132                    if (!psImageInterpolate(&maskVal, NULL, NULL, outCoords->x, outCoords->y, interp)) {
     133                        psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
     134                        psFree(grads);
     135                        psFree(gradsMask);
     136                        psFree(inCoords);
     137                        psFree(outCoords);
     138                        return NULL;
     139                    }
     140
    129141#ifdef TESTING
    130142                    rejmap->data.F32[y][x] = maskVal;
Note: See TracChangeset for help on using the changeset viewer.