- Timestamp:
- Dec 18, 2012, 5:56:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121130/pswarp/src/pswarpTransformReadout.c
r34089 r34838 29 29 psImageInterpolateMode interpolationMode = psMetadataLookupS32(NULL, config->arguments, 30 30 "INTERPOLATION.MODE"); ///< Mode for interp 31 31 32 int numKernels = psMetadataLookupS32(NULL, config->arguments, "INTERPOLATION.NUM"); ///< Number of kernels 32 33 … … 60 61 // output coordinates to input coordinates 61 62 pswarpMapGrid *grid = pswarpMapGridFromImage(input, output, nGridX, nGridY); 62 63 // if (psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) { 64 63 65 // XXX optionally modify the grid based on this result and force the maxError < XXX 64 66 double maxError = pswarpMapGridMaxError(grid); // Maximum (positional) error from using grid … … 130 132 args->goodPixels = 0; 131 133 134 if (psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) { 135 args->background_warping = true; 136 args->offset_x = psMetadataLookupF32(NULL,config->arguments,"BKG_WARP_XOFFSET"); 137 args->offset_y = psMetadataLookupF32(NULL,config->arguments,"BKG_WARP_YOFFSET"); 138 } 139 140 132 141 // allocate a job 133 142 psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE"); … … 171 180 } else { 172 181 pswarpTransformTileArgs *args = job->args->data[0]; 173 // fprintf (stderr, "finished job %d,%d, Nargs: %ld\n", args->gridX, args->gridY, job->args->n);174 182 goodPixels += args->goodPixels; 175 183 xMin = PS_MIN(args->xMin, xMin); … … 183 191 jacobian += args->jacobian * args->goodPixels; 184 192 } 193 194 185 195 } 186 196 psFree(job); … … 201 211 202 212 if (goodPixels > 0 && psMetadataLookupBool(&mdok, recipe, "SOURCES")) { 213 if (!psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) { 203 214 if (!pswarpTransformSources(output, input, config)) { 204 psError(psErrorCodeLast(), false, "Unable to interpolate image.");205 return false;215 psError(psErrorCodeLast(), false, "Unable to interpolate image."); 216 return false; 206 217 } 218 } 207 219 } 208 220
Note:
See TracChangeset
for help on using the changeset viewer.
