Changeset 25248
- Timestamp:
- Sep 2, 2009, 10:29:50 AM (17 years ago)
- File:
-
- 1 edited
-
branches/pap_mops/psLib/src/sys/psType.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_mops/psLib/src/sys/psType.h
r21183 r25248 141 141 } psDataType; 142 142 143 // macros to abstract the generic mask type : these values must be consistent 143 // macros to abstract the generic mask type : these values must be consistent 144 144 #define PS_TYPE_MASK PS_TYPE_U8 /**< the psElemType to use for mask image */ 145 145 #define PS_TYPE_MASK_DATA U8 /**< the data member to use for mask image */ … … 152 152 // alternate versions if needed 153 153 // #define PS_NOT_MASK(A)(UINT16_MAX-(A)) 154 // #define PS_NOT_MASK(A)(UINT32_MAX-(A)) 154 // #define PS_NOT_MASK(A)(UINT32_MAX-(A)) 155 155 // #define PS_NOT_MASK(A)(UINT64_MAX-(A)) 156 156 157 // macros to abstract the vector mask type : these values must be consistent 157 // macros to abstract the vector mask type : these values must be consistent 158 158 #define PS_TYPE_VECTOR_MASK PS_TYPE_U8 /**< the psElemType to use for mask image */ 159 159 #define PS_TYPE_VECTOR_MASK_DATA U8 /**< the data member to use for mask image */ … … 161 161 #define PS_MIN_VECTOR_MASK_TYPE 0 /**< minimum valid Vector Mask value */ 162 162 #define PS_MAX_VECTOR_MASK_TYPE UINT8_MAX /**< maximum valid Vector Mask value */ 163 typedef psU8 psVectorMaskType; ///< the C datatype for a mask image163 typedef psU8 psVectorMaskType; ///< the C datatype for a mask image 164 164 #define PS_NOT_VECTOR_MASK(A)(UINT8_MAX-(A)) 165 165 166 // macros to abstract the image mask type : these values must be consistent 167 #define PS_TYPE_IMAGE_MASK PS_TYPE_U16 /**< the psElemType to use for mask image */168 #define PS_TYPE_IMAGE_MASK_DATA U16 /**< the data member to use for mask image */169 #define PS_TYPE_IMAGE_MASK_NAME "psU16" /**< the data type for mask as a string */166 // macros to abstract the image mask type : these values must be consistent 167 #define PS_TYPE_IMAGE_MASK PS_TYPE_U16 /**< the psElemType to use for mask image */ 168 #define PS_TYPE_IMAGE_MASK_DATA U16 /**< the data member to use for mask image */ 169 #define PS_TYPE_IMAGE_MASK_NAME "psU16" /**< the data type for mask as a string */ 170 170 #define PS_MIN_IMAGE_MASK_TYPE 0 /**< minimum valid Image Mask value */ 171 171 #define PS_MAX_IMAGE_MASK_TYPE UINT16_MAX /**< maximum valid Image Mask value */ … … 246 246 }; 247 247 248 /// Macro to get the bad pixel reason code (stored as part of mask value)249 #define PS_BADPIXEL_BITMASK 0x0f250 #define PS_GET_BADPIXEL(maskValue) (maskValue & PS_BADPIXEL_BITMASK)251 252 #define PS_IS_BADPIXEL(maskValue) (PS_GET_BADPIXEL(maskValue) != 0)253 254 /// Macro to apply a bad pixel reason code to mask image255 #define PS_SET_BADPIXEL(maskValue, reasonCode) \256 { \257 maskValue = (psMaskType)((reasonCode & PS_BADPIXEL_BITMASK) | (maskValue & ~PS_BADPIXEL_BITMASK)); \258 }259 260 248 /// Macro to determine if the psElemType is an integer. 261 249 #define PS_IS_PSELEMTYPE_INT(x) ((x & 0x100) == 0x100)
Note:
See TracChangeset
for help on using the changeset viewer.
