Changeset 30384
- Timestamp:
- Jan 26, 2011, 5:22:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ppSub/src/ppSubMatchPSFs.c
r30302 r30384 164 164 165 165 // is auto-scaling needed? 166 if (!psMetadataLookupBool(NULL, recipe, "SCALE")) { 167 // No scaling requested 168 return true; 169 } 170 166 bool scale = psMetadataLookupBool(NULL, recipe, "SCALE"); 171 167 float scaleRef = psMetadataLookupF32(NULL, recipe, "SCALE.REF"); // Reference for scaling 172 168 float scaleMin = psMetadataLookupF32(NULL, recipe, "SCALE.MIN"); // Minimum for scaling 173 169 float scaleMax = psMetadataLookupF32(NULL, recipe, "SCALE.MAX"); // Maximum for scaling 174 if (!isfinite(scaleRef) || !isfinite(scaleMin) || !isfinite(scaleMax)) { 170 171 if (scale && (!isfinite(scaleRef) || !isfinite(scaleMin) || !isfinite(scaleMax))) { 175 172 psError(PPSUB_ERR_ARGUMENTS, false, 176 " Scale parameters (SCALE.REF=%f, SCALE.MIN=%f, SCALE.MAX=%f) not set in recipe.",173 "auto-scale selected but scale parameters (SCALE.REF=%f, SCALE.MIN=%f, SCALE.MAX=%f) not set in recipe.", 177 174 scaleRef, scaleMin, scaleMax); 178 175 return false; 179 176 } 180 177 181 if (!pmSubtractionParamsScale(kernelSize, stampSize, kernelWidths, scaleRef, scaleMin, scaleMax)) { 182 psError(PPSUB_ERR_DATA, false, "Unable to scale parameters."); 183 return false; 184 } 178 pmSubtractionParamScaleOptions(scale, scaleRef, scaleMin, scaleMax); 179 180 // if (!pmSubtractionParamsScale(kernelSize, stampSize, kernelWidths)) { 181 // psError(PPSUB_ERR_DATA, false, "Unable to scale parameters."); 182 // return false; 183 // } 185 184 186 185 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
