Changeset 42293 for trunk/pswarp/src/pswarpSetMaskBits.c
- Timestamp:
- Sep 27, 2022, 5:08:10 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpSetMaskBits.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpSetMaskBits.c
r27096 r42293 20 20 * updated in the config metadata. 21 21 */ 22 22 23 bool pswarpSetMaskBits (pmConfig *config) 23 24 { … … 26 27 psImageMaskType maskOut = 0x00; // mask for the output image 27 28 29 // Look up recipe values 30 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PSWARP_RECIPE); // Recipe for ppSim 31 psAssert(recipe, "We checked this earlier, so it should be here."); 32 bool doDetectCTE = psMetadataLookupBool(NULL, recipe, "DETECT.CTE"); // Do detections on pixels underneath CTE masks 33 28 34 // this function sets the required single-image mask bits 29 if (!pmConfigMaskSetBits (&maskIn, &markIn, config)) { 30 psError (psErrorCodeLast(), false, "Unable to define the mask bit values"); 31 return false; 35 if(!doDetectCTE) { 36 if (!pmConfigMaskSetBits (&maskIn, &markIn, config)) { 37 psError (psErrorCodeLast(), false, "Unable to define the mask bit values"); 38 return false; 39 } 40 } else { 41 psMetadata *maskrecipe = psMetadataLookupMetadata(NULL, config->recipes, "MASKS"); // The recipe 42 if (!maskrecipe) { 43 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find MASKS recipe."); 44 return false; 45 } 46 if (!pswarpMaskSetInMetadata(&maskIn, &markIn, maskrecipe)) { 47 psError (psErrorCodeLast(), false, "Unable to determine the mask value"); 48 return false; 49 } 32 50 } 33 51 34 52 // mask for non-linear flat regions (default to DETECTOR if not defined) 35 53 psImageMaskType badMask = pmConfigMaskGet("CONV.BAD", config);
Note:
See TracChangeset
for help on using the changeset viewer.
