Changeset 23936 for trunk/magic/remove/src/streaksio.c
- Timestamp:
- Apr 20, 2009, 2:38:45 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksio.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksio.c
r23911 r23936 968 968 969 969 void 970 setMaskedToNAN(streakFiles *sfiles, psU 8maskMask, bool printCounts)970 setMaskedToNAN(streakFiles *sfiles, psU32 maskMask, bool printCounts) 971 971 { 972 972 int maskedPixels = 0; … … 991 991 // but I want to get the counts 992 992 double imageVal = psImageGet(image, x, y); 993 psU 8maskVal;993 psU32 maskVal; 994 994 if (sfiles->stage == IPP_STAGE_RAW) { 995 995 int xChip, yChip; … … 1044 1044 } 1045 1045 } 1046 1047 void 1048 strkGetMaskValues(streakFiles *sfiles, psU32 *maskStreak, psU32 *maskMask) 1049 { 1050 if (sfiles->inMask->header) { 1051 if (!pmConfigMaskReadHeader(sfiles->config, sfiles->inMask->header)) { 1052 streaksExit("failed to read mask values from file", PS_EXIT_CONFIG_ERROR); 1053 } 1054 } 1055 1056 bool status; 1057 psMetadata *masks = psMetadataLookupMetadata(&status, sfiles->config->recipes, "MASKS"); 1058 if (!status) { 1059 psError(PM_ERR_CONFIG, false, "failed to lookup MASKS in recipes\n"); 1060 streaksExit("", PS_EXIT_CONFIG_ERROR); 1061 } 1062 *maskStreak = psMetadataLookupU32(&status, masks, "STREAK"); 1063 if (!status) { 1064 psError(PM_ERR_CONFIG, false, "failed to lookup mask value for STREAK in recipes\n"); 1065 streaksExit("", PS_EXIT_CONFIG_ERROR); 1066 } 1067 1068 // optionally setting pixels with any mask bits execpt CONV.POOR to NAN 1069 // check old name first 1070 psU32 convPoor = (double) psMetadataLookupU32(&status, masks, "POOR.WARP"); 1071 if (!status) { 1072 convPoor = (double) psMetadataLookupU32(&status, masks, "CONV.POOR"); 1073 if (!status) { 1074 psError(PM_ERR_CONFIG, false, "failed to lookup mask value for CONV.POOR in recipes\n"); 1075 streaksExit("", PS_EXIT_CONFIG_ERROR); 1076 } 1077 } 1078 *maskMask = ~convPoor; 1079 }
Note:
See TracChangeset
for help on using the changeset viewer.
