IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2010, 1:26:42 PM (16 years ago)
Author:
bills
Message:

get the mask bits to censor from new function in psModules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksio.c

    r28310 r29392  
    12661266        return;
    12671267    }
    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    }
    13041271}
    13051272
Note: See TracChangeset for help on using the changeset viewer.