Changeset 21368 for trunk/pswarp/src/pswarpSetMaskBits.c
- Timestamp:
- Feb 5, 2009, 5:10:36 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpSetMaskBits.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpSetMaskBits.c
r21323 r21368 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-0 5 20:44:04$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-06 03:10:36 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 20 20 * updated in the config metadata. 21 21 */ 22 bool pswarpSetMaskBits (pmConfig *config) {23 24 psImageMaskType maskIn = 0x00; ///<mask for the input image25 psImageMaskType markIn = 0x00; ///<mark for the input image26 psImageMaskType maskOut = 0x00; ///<mask for the output image22 bool pswarpSetMaskBits (pmConfig *config) 23 { 24 psImageMaskType maskIn = 0x00; // mask for the input image 25 psImageMaskType markIn = 0x00; // mark for the input image 26 psImageMaskType maskOut = 0x00; // mask for the output image 27 27 28 28 // this function sets the required single-image mask bits 29 29 if (!pmConfigMaskSetBits (&maskIn, &markIn, config)) { 30 psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values");31 return false;30 psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values"); 31 return false; 32 32 } 33 33 34 34 // mask for non-linear flat regions (default to DETECTOR if not defined) 35 psImageMaskType badMask = pmConfigMaskGet("BAD.WARP", config); 35 psImageMaskType badMask = pmConfigMaskGet("BAD.WARP", config); 36 36 if (!badMask) { 37 badMask = 0x01;38 pmConfigMaskSet (config, "BAD.WARP", badMask);37 badMask = 0x01; 38 pmConfigMaskSet (config, "BAD.WARP", badMask); 39 39 } 40 40 maskOut |= badMask; 41 41 42 42 // mask for non-linear flat regions (default to DETECTOR if not defined) 43 psImageMaskType poorMask = pmConfigMaskGet("POOR.WARP", config); 43 psImageMaskType poorMask = pmConfigMaskGet("POOR.WARP", config); 44 44 if (!poorMask) { 45 poorMask = 0x02;46 pmConfigMaskSet (config, "POOR.WARP", poorMask);45 poorMask = 0x02; 46 pmConfigMaskSet (config, "POOR.WARP", poorMask); 47 47 } 48 48 maskOut |= poorMask;
Note:
See TracChangeset
for help on using the changeset viewer.
