Changeset 809 for trunk/psLib/src/sysUtils
- Timestamp:
- May 28, 2004, 11:07:17 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psType.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psType.h
r800 r809 20 20 * @author Ross Harman, MHPCC 21 21 * 22 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $23 * @date $Date: 2004-05-28 03:15:04$22 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2004-05-28 21:07:17 $ 24 24 * 25 25 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 56 56 typedef complex double psC64; ///< complex with 64-bit floating point Real and Imagary numbers 57 57 58 58 59 typedef enum { 59 PS_TYPE_INT8 = 0x0101, ///< Character.60 PS_TYPE_INT16 = 0x0102, ///< Short integer.61 PS_TYPE_INT32 = 0x0104, ///< Integer.62 PS_TYPE_INT64 = 0x0108, ///< Long integer.63 PS_TYPE_UINT8 = 0x0301, ///< Unsigned character.64 PS_TYPE_UINT16 = 0x0302, ///< Unsigned short integer.65 PS_TYPE_UINT32 = 0x0304, ///< Unsigned integer.66 PS_TYPE_UINT64 = 0x0308, ///< Unsigned long integer.67 PS_TYPE_FLOAT = 0x0404, ///< Single-precision Floating point.68 PS_TYPE_DOUBLE = 0x0408, ///< Double-precision floating point.69 PS_TYPE_COMPLEX_FLOAT = 0x0808, ///< Complex numbers consisting of single-precision floating point.70 PS_TYPE_COMPLEX_DOUBLE = 0x0810, ///< Complex numbers consisting of double-precision floating point.71 PS_TYPE_OTHER = 0x0000, ///< Something else that's not supported for arithmetic.60 PS_TYPE_INT8 = 0x0101, ///< Character. 61 PS_TYPE_INT16 = 0x0102, ///< Short integer. 62 PS_TYPE_INT32 = 0x0104, ///< Integer. 63 PS_TYPE_INT64 = 0x0108, ///< Long integer. 64 PS_TYPE_UINT8 = 0x0301, ///< Unsigned character. 65 PS_TYPE_UINT16 = 0x0302, ///< Unsigned short integer. 66 PS_TYPE_UINT32 = 0x0304, ///< Unsigned integer. 67 PS_TYPE_UINT64 = 0x0308, ///< Unsigned long integer. 68 PS_TYPE_FLOAT = 0x0404, ///< Single-precision Floating point. 69 PS_TYPE_DOUBLE = 0x0408, ///< Double-precision floating point. 70 PS_TYPE_COMPLEX_FLOAT = 0x0808, ///< Complex numbers consisting of single-precision floating point. 71 PS_TYPE_COMPLEX_DOUBLE = 0x0810, ///< Complex numbers consisting of double-precision floating point. 72 PS_TYPE_OTHER = 0x0000, ///< Something else that's not supported for arithmetic. 72 73 73 74 // Abbreviated versions of the above types 74 PS_TYPE_S8 = 0x0101, ///< Character.75 PS_TYPE_S16 = 0x0102, ///< Short integer.76 PS_TYPE_S32 = 0x0104, ///< Integer.77 PS_TYPE_S64 = 0x0108, ///< Long integer.78 PS_TYPE_U8 = 0x0301, ///< Unsigned character.79 PS_TYPE_U16 = 0x0302, ///< Unsigned short integer.80 PS_TYPE_U32 = 0x0304, ///< Unsigned integer.81 PS_TYPE_U64 = 0x0308, ///< Unsigned long integer.82 PS_TYPE_F32 = 0x0404, ///< Single-precision Floating point.83 PS_TYPE_F64 = 0x0408, ///< Double-precision floating point.84 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point.85 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point.86 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic.75 PS_TYPE_S8 = 0x0101, ///< Character. 76 PS_TYPE_S16 = 0x0102, ///< Short integer. 77 PS_TYPE_S32 = 0x0104, ///< Integer. 78 PS_TYPE_S64 = 0x0108, ///< Long integer. 79 PS_TYPE_U8 = 0x0301, ///< Unsigned character. 80 PS_TYPE_U16 = 0x0302, ///< Unsigned short integer. 81 PS_TYPE_U32 = 0x0304, ///< Unsigned integer. 82 PS_TYPE_U64 = 0x0308, ///< Unsigned long integer. 83 PS_TYPE_F32 = 0x0404, ///< Single-precision Floating point. 84 PS_TYPE_F64 = 0x0408, ///< Double-precision floating point. 85 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point. 86 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 87 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 87 88 88 89 } psElemType; 89 90 90 #define IS_PSELEMTYPE_INT(x) ((x & 0x100) == 0x100) 91 #define IS_PSELEMTYPE_UNSIGNED(x) ((x & 0x200) == 0x200) 92 #define IS_PSELEMTYPE_REAL(x) ((x & 0x400) == 0x400) 93 #define IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800) 91 #define PS_TYPE_MASK PS_TYPE_U8 ///< the psElemType to use for mask image 92 typedef psU8 psMaskType; ///< the C datatype for a mask image 93 94 /// Macro to get the bad pixel reason code (stored as part of mask value) 95 #define PS_BADPIXEL_BITMASK 0x0f 96 #define PS_GET_BADPIXEL(maskValue) (maskValue & PS_BADPIXEL_BITMASK) 97 98 #define PS_IS_BADPIXEL(maskValue) (PS_GET_BADPIXEL(maskValue) != 0) 99 100 /// Macro to apply a bad pixel reason code to mask image 101 #define PS_SET_BADPIXEL(maskValue, reasonCode) \ 102 { \ 103 maskValue = (psMaskType)((reasonCode & PS_BADPIXEL_BITMASK) | (maskValue & ~PS_BADPIXEL_BITMASK)); \ 104 } 105 106 /// Macro to determine if the psElemType is an integer. 107 #define PS_IS_PSELEMTYPE_INT(x) ((x & 0x100) == 0x100) 108 /// Macro to determine if the psElemType is unsigned. 109 #define PS_IS_PSELEMTYPE_UNSIGNED(x) ((x & 0x200) == 0x200) 110 /// Macro to determine if the psElemType is a real (non-complex) floating-point type. 111 #define PS_IS_PSELEMTYPE_REAL(x) ((x & 0x400) == 0x400) 112 /// Macro to determine if the psElemType is complex number type. 113 #define PS_IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800) 114 /// Macro to determine the storage size, in bytes, of the psElemType. 94 115 #define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(void*) :(x & 0xFF) ) 95 116
Note:
See TracChangeset
for help on using the changeset viewer.
