Changeset 29392
- Timestamp:
- Oct 13, 2010, 1:26:42 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksio.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksio.c
r28310 r29392 1266 1266 return; 1267 1267 } 1268 if (sfiles->inMask && sfiles->inMask->header) { 1269 if (!pmConfigMaskReadHeader(sfiles->config, sfiles->inMask->header)) { 1270 streaksExit("failed to read mask values from file", PS_EXIT_CONFIG_ERROR); 1271 } 1272 } 1273 1274 bool status; 1275 psMetadata *masks = psMetadataLookupMetadata(&status, sfiles->config->recipes, "MASKS"); 1276 if (!status) { 1277 psError(PM_ERR_CONFIG, false, "failed to lookup MASKS in recipes\n"); 1278 streaksExit("", PS_EXIT_CONFIG_ERROR); 1279 } 1280 sfiles->maskStreak = psMetadataLookupU32(&status, masks, "STREAK"); 1281 if (!status) { 1282 psError(PM_ERR_CONFIG, false, "failed to lookup mask value for STREAK in recipes\n"); 1283 streaksExit("", PS_EXIT_CONFIG_ERROR); 1284 } 1285 1286 // optionally setting pixels with any mask bits execpt CONV.POOR to NAN 1287 // check old name first 1288 psU32 convPoor = (double) psMetadataLookupU32(&status, masks, "POOR.WARP"); 1289 if (!status) { 1290 convPoor = (double) psMetadataLookupU32(&status, masks, "CONV.POOR"); 1291 if (!status) { 1292 psError(PM_ERR_CONFIG, false, "failed to lookup mask value for CONV.POOR in recipes\n"); 1293 streaksExit("", PS_EXIT_CONFIG_ERROR); 1294 } 1295 } 1296 // preserve pixels that are only suspect 1297 psU32 suspect = (double) psMetadataLookupU32(&status, masks, "SUSPECT"); 1298 if (!status) { 1299 psError(PM_ERR_CONFIG, false, "failed to lookup mask value for SUSPECT in recipes\n"); 1300 streaksExit("", PS_EXIT_CONFIG_ERROR); 1301 } 1302 1303 sfiles->maskMask = ~(convPoor | suspect); 1268 if (!pmCensorGetMasks(sfiles->config, &sfiles->maskMask, &sfiles->maskStreak)) { 1269 streaksExit("failed to find mask values", PS_EXIT_CONFIG_ERROR); 1270 } 1304 1271 } 1305 1272
Note:
See TracChangeset
for help on using the changeset viewer.
