Changeset 809
- Timestamp:
- May 28, 2004, 11:07:17 AM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 5 edited
-
dataManip/psFFT.c (modified) (6 diffs)
-
dataManip/psVectorFFT.c (modified) (6 diffs)
-
fft/psVectorFFT.c (modified) (6 diffs)
-
sys/psType.h (modified) (2 diffs)
-
sysUtils/psType.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFFT.c
r808 r809 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-05-28 21:0 4:34$7 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-05-28 21:07:17 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 160 160 161 161 /* if not a complex number, this is logically just a copy */ 162 if (! IS_PSELEMTYPE_COMPLEX(type)) {162 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 163 163 // Warn user, as this is probably not expected 164 164 psLogMsg(__func__,PS_LOG_WARN,"Real portion of a non-Complex type called called for. " … … 219 219 220 220 /* if not a complex number, this is logically just zeroed image of same size */ 221 if (! IS_PSELEMTYPE_COMPLEX(type)) {221 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 222 222 // Warn user, as this is probably not expected 223 223 psLogMsg(__func__,PS_LOG_WARN,"Imaginary portion of a non-Complex type called for. " … … 285 285 } 286 286 287 if ( IS_PSELEMTYPE_COMPLEX(type)) {287 if (PS_IS_PSELEMTYPE_COMPLEX(type)) { 288 288 psError(__func__,"The inputs to psImageComplex can not be complex."); 289 289 return NULL; … … 352 352 353 353 /* if not a complex number, this is logically just a image copy */ 354 if (! IS_PSELEMTYPE_COMPLEX(type)) {354 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 355 355 // Warn user, as this is probably not expected 356 356 psLogMsg(__func__,PS_LOG_WARN,"Complex Conjugate of a non-Complex type called for. " … … 414 414 415 415 /* if not a complex number, this is not implemented */ 416 if (! IS_PSELEMTYPE_COMPLEX(type)) {416 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 417 417 psError(__func__,"Power Spectrum for non-complex inputs is not implemented."); 418 418 return NULL; -
trunk/psLib/src/dataManip/psVectorFFT.c
r808 r809 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-05-28 21:0 4:34$7 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-05-28 21:07:17 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 160 160 161 161 /* if not a complex number, this is logically just a copy */ 162 if (! IS_PSELEMTYPE_COMPLEX(type)) {162 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 163 163 // Warn user, as this is probably not expected 164 164 psLogMsg(__func__,PS_LOG_WARN,"Real portion of a non-Complex type called called for. " … … 219 219 220 220 /* if not a complex number, this is logically just zeroed image of same size */ 221 if (! IS_PSELEMTYPE_COMPLEX(type)) {221 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 222 222 // Warn user, as this is probably not expected 223 223 psLogMsg(__func__,PS_LOG_WARN,"Imaginary portion of a non-Complex type called for. " … … 285 285 } 286 286 287 if ( IS_PSELEMTYPE_COMPLEX(type)) {287 if (PS_IS_PSELEMTYPE_COMPLEX(type)) { 288 288 psError(__func__,"The inputs to psImageComplex can not be complex."); 289 289 return NULL; … … 352 352 353 353 /* if not a complex number, this is logically just a image copy */ 354 if (! IS_PSELEMTYPE_COMPLEX(type)) {354 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 355 355 // Warn user, as this is probably not expected 356 356 psLogMsg(__func__,PS_LOG_WARN,"Complex Conjugate of a non-Complex type called for. " … … 414 414 415 415 /* if not a complex number, this is not implemented */ 416 if (! IS_PSELEMTYPE_COMPLEX(type)) {416 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 417 417 psError(__func__,"Power Spectrum for non-complex inputs is not implemented."); 418 418 return NULL; -
trunk/psLib/src/fft/psVectorFFT.c
r808 r809 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-05-28 21:0 4:34$7 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-05-28 21:07:17 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 160 160 161 161 /* if not a complex number, this is logically just a copy */ 162 if (! IS_PSELEMTYPE_COMPLEX(type)) {162 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 163 163 // Warn user, as this is probably not expected 164 164 psLogMsg(__func__,PS_LOG_WARN,"Real portion of a non-Complex type called called for. " … … 219 219 220 220 /* if not a complex number, this is logically just zeroed image of same size */ 221 if (! IS_PSELEMTYPE_COMPLEX(type)) {221 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 222 222 // Warn user, as this is probably not expected 223 223 psLogMsg(__func__,PS_LOG_WARN,"Imaginary portion of a non-Complex type called for. " … … 285 285 } 286 286 287 if ( IS_PSELEMTYPE_COMPLEX(type)) {287 if (PS_IS_PSELEMTYPE_COMPLEX(type)) { 288 288 psError(__func__,"The inputs to psImageComplex can not be complex."); 289 289 return NULL; … … 352 352 353 353 /* if not a complex number, this is logically just a image copy */ 354 if (! IS_PSELEMTYPE_COMPLEX(type)) {354 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 355 355 // Warn user, as this is probably not expected 356 356 psLogMsg(__func__,PS_LOG_WARN,"Complex Conjugate of a non-Complex type called for. " … … 414 414 415 415 /* if not a complex number, this is not implemented */ 416 if (! IS_PSELEMTYPE_COMPLEX(type)) {416 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 417 417 psError(__func__,"Power Spectrum for non-complex inputs is not implemented."); 418 418 return NULL; -
trunk/psLib/src/sys/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 -
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.
