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/stacTransform.c

    r9740 r12744  
    193193        }
    194194
     195        psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR,
     196                                                                           image, error, mask, 1, NAN, NAN,
     197                                                                           1, 0, 0.0);
     198
    195199        // Iterate over the output image pixels
    196200        for (int y = 0; y < outny; y++) {
     
    204208
    205209                    // Change PS_INTERPOLATE_BILINEAR to best available technique.
    206                     outImage->data.F32[y][x] = (psF32)psImagePixelInterpolate(image, detector->x,
    207                                                                               detector->y, mask, 1, NAN,
    208                                                                               PS_INTERPOLATE_BILINEAR);
     210                    double imageValue, varianceValue;
     211                    if (!psImageInterpolate(&imageValue, &varianceValue, NULL,
     212                                            detector->x, detector->y, interp)) {
     213                        psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
     214                        psFree(interp);
     215                        psFree(detector);
     216                        psFree(sky);
     217                        return false;
     218                    }
     219                    outImage->data.F32[y][x] = imageValue;
     220
    209221                    if (error) {
    210222                        // Error is actually the variance
    211                         outError->data.F32[y][x] = (psF32)p_psImageErrorInterpolateBILINEAR_F32(error,
    212                                                                                                 detector->x,
    213                                                                                                 detector->y,
    214                                                                                                 mask, 1, NAN);
     223                        outError->data.F32[y][x] = varianceValue;
    215224                    }
    216225
     
    224233            }
    225234        } // Iterating over output pixels
     235        psFree(interp);
    226236
    227237    } // Iterating over images
Note: See TracChangeset for help on using the changeset viewer.