Changeset 1452
- Timestamp:
- Aug 10, 2004, 8:54:38 AM (22 years ago)
- Location:
- trunk/psLib
- Files:
-
- 7 edited
-
psLib.kdevses (modified) (1 diff)
-
src/dataManip/psFFT.c (modified) (3 diffs)
-
src/dataManip/psFFT.h (modified) (2 diffs)
-
src/dataManip/psVectorFFT.c (modified) (3 diffs)
-
src/dataManip/psVectorFFT.h (modified) (2 diffs)
-
src/fft/psVectorFFT.c (modified) (3 diffs)
-
src/fft/psVectorFFT.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/psLib.kdevses
r1404 r1452 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments="0" /> 4 <DocsAndViews NumberOfDocuments="1" > 5 <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psFFT.h" > 6 <View0 line="54" Type="???" > 7 <AdditionalSettings Top="1" Width="1107" Attach="1" Height="529" Left="1" MinMaxMode="0" /> 8 </View0> 9 </Doc0> 10 </DocsAndViews> 5 11 <pluginList> 6 12 <kdevbookmarks> -
trunk/psLib/src/dataManip/psFFT.c
r1440 r1452 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-08- 09 23:34:57$8 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-08-10 18:54:38 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 211 211 } 212 212 213 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag)213 psImage* psImageComplex(psImage* out, const psImage* real, const psImage* imag) 214 214 { 215 215 psElemType type; … … 586 586 } 587 587 588 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag)588 psVector* psVectorComplex(psVector* out, const psVector* real, const psVector* imag) 589 589 { 590 590 psElemType type; -
trunk/psLib/src/dataManip/psFFT.h
r1441 r1452 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08- 09 23:40:55$10 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-10 18:54:38 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 /// @{ 24 24 25 /** Details on FFT implementation (private). */ 26 25 /** Specify direction of FFT */ 27 26 typedef enum { 28 // / psImageFFT/psVectorFFT should perform a forward FFT.27 /// psImageFFT/psVectorFFT should perform a forward FFT. 29 28 PS_FFT_FORWARD = (-1), 30 29 31 /// <psImageFFT/psVectorFFT should perform a reverse FFT.30 /// psImageFFT/psVectorFFT should perform a reverse FFT. 32 31 PS_FFT_REVERSE = (+1) 33 32 } psFftDirection; 34 33 35 psImage* psImageFFT(psImage* out, const psImage* in, psFftDirection direction); 36 psImage* psImageReal(psImage* out, const psImage* in); 37 psImage* psImageImaginary(psImage* out, const psImage* in); 38 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag); 39 psImage* psImageConjugate(psImage* out, const psImage* in); 40 psImage* psImagePowerSpectrum(psImage* out, const psImage* in); 34 /** Forward and reverse FFT calculations. 35 * 36 * This takes as input the image of interest (in) and the direction 37 * (direction), which is specified by an enumerated type psFftDirection. 38 * The input image may be of type psF32 or psC32, the result is always 39 * psC32. If the input vector is psF32, the direction must be forward. 40 * 41 * @return psImage* the FFT transformation result 42 */ 43 psImage* psImageFFT( 44 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 45 const psImage* in, ///< the psImage to apply transform to 46 psFftDirection direction ///< the direction of the transform 47 ); 41 48 42 psVector* psVectorFFT(psVector* out, const psVector* in, psFftDirection direction); 43 psVector* psVectorReal(psVector* out, const psVector* in); 44 psVector* psVectorImaginary(psVector* out, const psVector* in); 45 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag); 46 psVector* psVectorConjugate(psVector* out, const psVector* in); 47 psVector* psVectorPowerSpectrum(psVector* out, const psVector* in); 49 /** extract the real portion of a complex image 50 * 51 * @return psImage* real portion of the input image. 52 */ 53 psImage* psImageReal( 54 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 55 const psImage* in ///< the psImage to extract real portion from 56 ); 57 58 /** extract the imaginary portion of a complex image 59 * 60 * @return psImage* imaginary portion of the input image. 61 */ 62 psImage* psImageImaginary( 63 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 64 const psImage* in ///< the psImage to extract imaginary portion from 65 ); 66 67 /** creates a complex image from separate real and imaginary plane images 68 * 69 * @return psImage* resulting complex image 70 */ 71 psImage* psImageComplex( 72 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 73 const psImage* real, ///< the real plane image 74 const psImage* imag ///< the imaginary plane image 75 ); 76 77 /** computes the complex conjugate of an image 78 * 79 * @return psImage* the complex conjugate of the 'in' image 80 */ 81 psImage* psImageConjugate( 82 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 83 const psImage* in ///< the psImage to compute conjugate of 84 ); 85 86 /** computes the power spectrum of an image 87 * 88 * @return psImage* the power spectrum of the 'in' image 89 */ 90 psImage* psImagePowerSpectrum( 91 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 92 const psImage* in ///< the psImage to power spectrum of 93 ); 94 95 /** Forward and reverse FFT calculations. 96 * 97 * This takes as input the vector of interest (in) and the direction 98 * (direction), which is specified by an enumerated type psFftDirection. 99 * The input vector may be of type psF32 or psC32, the result is always 100 * psC32. If the input vector is psF32, the direction must be forward. 101 * 102 * @return psVector* the FFT transformation result 103 */ 104 psVector* psVectorFFT( 105 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 106 const psVector* in, ///< the vector to apply transform to 107 psFftDirection direction ///< the direction of the transform 108 ); 109 110 /** extract the real portion of a complex vector 111 * 112 * @return psVector* real portion of the input vector. 113 */ 114 psVector* psVectorReal( 115 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 116 const psVector* in ///< the psVector to extract real portion from 117 ); 118 119 /** extract the imaginary portion of a complex vector 120 * 121 * @return psVector* imaginary portion of the input vector. 122 */ 123 psVector* psVectorImaginary( 124 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 125 const psVector* in ///< the psVector to extract imaginary portion from 126 ); 127 128 /** creates a complex vector from separate real and imaginary vectors 129 * 130 * @return psVector* resulting complex vector 131 */ 132 psVector* psVectorComplex( 133 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 134 const psVector* real, ///< the real vector 135 const psVector* imag ///< the imaginary vector 136 ); 137 138 /** computes the complex conjugate of a vector 139 * 140 * @return psVector* the complex conjugate of the 'in' vector 141 */ 142 psVector* psVectorConjugate( 143 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 144 const psVector* in ///< the psVector to compute conjugate of 145 ); 146 147 /** computes the power spectrum of a vector 148 * 149 * @return psVector* the power spectrum of the 'in' vector 150 */ 151 psVector* psVectorPowerSpectrum( 152 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 153 const psVector* in ///< the psVector to power spectrum of 154 ); 48 155 49 156 /// @} -
trunk/psLib/src/dataManip/psVectorFFT.c
r1440 r1452 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-08- 09 23:34:57$8 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-08-10 18:54:38 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 211 211 } 212 212 213 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag)213 psImage* psImageComplex(psImage* out, const psImage* real, const psImage* imag) 214 214 { 215 215 psElemType type; … … 586 586 } 587 587 588 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag)588 psVector* psVectorComplex(psVector* out, const psVector* real, const psVector* imag) 589 589 { 590 590 psElemType type; -
trunk/psLib/src/dataManip/psVectorFFT.h
r1441 r1452 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08- 09 23:40:55$10 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-10 18:54:38 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 /// @{ 24 24 25 /** Details on FFT implementation (private). */ 26 25 /** Specify direction of FFT */ 27 26 typedef enum { 28 // / psImageFFT/psVectorFFT should perform a forward FFT.27 /// psImageFFT/psVectorFFT should perform a forward FFT. 29 28 PS_FFT_FORWARD = (-1), 30 29 31 /// <psImageFFT/psVectorFFT should perform a reverse FFT.30 /// psImageFFT/psVectorFFT should perform a reverse FFT. 32 31 PS_FFT_REVERSE = (+1) 33 32 } psFftDirection; 34 33 35 psImage* psImageFFT(psImage* out, const psImage* in, psFftDirection direction); 36 psImage* psImageReal(psImage* out, const psImage* in); 37 psImage* psImageImaginary(psImage* out, const psImage* in); 38 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag); 39 psImage* psImageConjugate(psImage* out, const psImage* in); 40 psImage* psImagePowerSpectrum(psImage* out, const psImage* in); 34 /** Forward and reverse FFT calculations. 35 * 36 * This takes as input the image of interest (in) and the direction 37 * (direction), which is specified by an enumerated type psFftDirection. 38 * The input image may be of type psF32 or psC32, the result is always 39 * psC32. If the input vector is psF32, the direction must be forward. 40 * 41 * @return psImage* the FFT transformation result 42 */ 43 psImage* psImageFFT( 44 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 45 const psImage* in, ///< the psImage to apply transform to 46 psFftDirection direction ///< the direction of the transform 47 ); 41 48 42 psVector* psVectorFFT(psVector* out, const psVector* in, psFftDirection direction); 43 psVector* psVectorReal(psVector* out, const psVector* in); 44 psVector* psVectorImaginary(psVector* out, const psVector* in); 45 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag); 46 psVector* psVectorConjugate(psVector* out, const psVector* in); 47 psVector* psVectorPowerSpectrum(psVector* out, const psVector* in); 49 /** extract the real portion of a complex image 50 * 51 * @return psImage* real portion of the input image. 52 */ 53 psImage* psImageReal( 54 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 55 const psImage* in ///< the psImage to extract real portion from 56 ); 57 58 /** extract the imaginary portion of a complex image 59 * 60 * @return psImage* imaginary portion of the input image. 61 */ 62 psImage* psImageImaginary( 63 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 64 const psImage* in ///< the psImage to extract imaginary portion from 65 ); 66 67 /** creates a complex image from separate real and imaginary plane images 68 * 69 * @return psImage* resulting complex image 70 */ 71 psImage* psImageComplex( 72 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 73 const psImage* real, ///< the real plane image 74 const psImage* imag ///< the imaginary plane image 75 ); 76 77 /** computes the complex conjugate of an image 78 * 79 * @return psImage* the complex conjugate of the 'in' image 80 */ 81 psImage* psImageConjugate( 82 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 83 const psImage* in ///< the psImage to compute conjugate of 84 ); 85 86 /** computes the power spectrum of an image 87 * 88 * @return psImage* the power spectrum of the 'in' image 89 */ 90 psImage* psImagePowerSpectrum( 91 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 92 const psImage* in ///< the psImage to power spectrum of 93 ); 94 95 /** Forward and reverse FFT calculations. 96 * 97 * This takes as input the vector of interest (in) and the direction 98 * (direction), which is specified by an enumerated type psFftDirection. 99 * The input vector may be of type psF32 or psC32, the result is always 100 * psC32. If the input vector is psF32, the direction must be forward. 101 * 102 * @return psVector* the FFT transformation result 103 */ 104 psVector* psVectorFFT( 105 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 106 const psVector* in, ///< the vector to apply transform to 107 psFftDirection direction ///< the direction of the transform 108 ); 109 110 /** extract the real portion of a complex vector 111 * 112 * @return psVector* real portion of the input vector. 113 */ 114 psVector* psVectorReal( 115 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 116 const psVector* in ///< the psVector to extract real portion from 117 ); 118 119 /** extract the imaginary portion of a complex vector 120 * 121 * @return psVector* imaginary portion of the input vector. 122 */ 123 psVector* psVectorImaginary( 124 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 125 const psVector* in ///< the psVector to extract imaginary portion from 126 ); 127 128 /** creates a complex vector from separate real and imaginary vectors 129 * 130 * @return psVector* resulting complex vector 131 */ 132 psVector* psVectorComplex( 133 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 134 const psVector* real, ///< the real vector 135 const psVector* imag ///< the imaginary vector 136 ); 137 138 /** computes the complex conjugate of a vector 139 * 140 * @return psVector* the complex conjugate of the 'in' vector 141 */ 142 psVector* psVectorConjugate( 143 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 144 const psVector* in ///< the psVector to compute conjugate of 145 ); 146 147 /** computes the power spectrum of a vector 148 * 149 * @return psVector* the power spectrum of the 'in' vector 150 */ 151 psVector* psVectorPowerSpectrum( 152 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 153 const psVector* in ///< the psVector to power spectrum of 154 ); 48 155 49 156 /// @} -
trunk/psLib/src/fft/psVectorFFT.c
r1440 r1452 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-08- 09 23:34:57$8 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-08-10 18:54:38 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 211 211 } 212 212 213 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag)213 psImage* psImageComplex(psImage* out, const psImage* real, const psImage* imag) 214 214 { 215 215 psElemType type; … … 586 586 } 587 587 588 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag)588 psVector* psVectorComplex(psVector* out, const psVector* real, const psVector* imag) 589 589 { 590 590 psElemType type; -
trunk/psLib/src/fft/psVectorFFT.h
r1441 r1452 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08- 09 23:40:55$10 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-10 18:54:38 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 /// @{ 24 24 25 /** Details on FFT implementation (private). */ 26 25 /** Specify direction of FFT */ 27 26 typedef enum { 28 // / psImageFFT/psVectorFFT should perform a forward FFT.27 /// psImageFFT/psVectorFFT should perform a forward FFT. 29 28 PS_FFT_FORWARD = (-1), 30 29 31 /// <psImageFFT/psVectorFFT should perform a reverse FFT.30 /// psImageFFT/psVectorFFT should perform a reverse FFT. 32 31 PS_FFT_REVERSE = (+1) 33 32 } psFftDirection; 34 33 35 psImage* psImageFFT(psImage* out, const psImage* in, psFftDirection direction); 36 psImage* psImageReal(psImage* out, const psImage* in); 37 psImage* psImageImaginary(psImage* out, const psImage* in); 38 psImage* psImageComplex(psImage* out, psImage* real, const psImage* imag); 39 psImage* psImageConjugate(psImage* out, const psImage* in); 40 psImage* psImagePowerSpectrum(psImage* out, const psImage* in); 34 /** Forward and reverse FFT calculations. 35 * 36 * This takes as input the image of interest (in) and the direction 37 * (direction), which is specified by an enumerated type psFftDirection. 38 * The input image may be of type psF32 or psC32, the result is always 39 * psC32. If the input vector is psF32, the direction must be forward. 40 * 41 * @return psImage* the FFT transformation result 42 */ 43 psImage* psImageFFT( 44 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 45 const psImage* in, ///< the psImage to apply transform to 46 psFftDirection direction ///< the direction of the transform 47 ); 41 48 42 psVector* psVectorFFT(psVector* out, const psVector* in, psFftDirection direction); 43 psVector* psVectorReal(psVector* out, const psVector* in); 44 psVector* psVectorImaginary(psVector* out, const psVector* in); 45 psVector* psVectorComplex(psVector* out, psVector* real, const psVector* imag); 46 psVector* psVectorConjugate(psVector* out, const psVector* in); 47 psVector* psVectorPowerSpectrum(psVector* out, const psVector* in); 49 /** extract the real portion of a complex image 50 * 51 * @return psImage* real portion of the input image. 52 */ 53 psImage* psImageReal( 54 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 55 const psImage* in ///< the psImage to extract real portion from 56 ); 57 58 /** extract the imaginary portion of a complex image 59 * 60 * @return psImage* imaginary portion of the input image. 61 */ 62 psImage* psImageImaginary( 63 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 64 const psImage* in ///< the psImage to extract imaginary portion from 65 ); 66 67 /** creates a complex image from separate real and imaginary plane images 68 * 69 * @return psImage* resulting complex image 70 */ 71 psImage* psImageComplex( 72 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 73 const psImage* real, ///< the real plane image 74 const psImage* imag ///< the imaginary plane image 75 ); 76 77 /** computes the complex conjugate of an image 78 * 79 * @return psImage* the complex conjugate of the 'in' image 80 */ 81 psImage* psImageConjugate( 82 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 83 const psImage* in ///< the psImage to compute conjugate of 84 ); 85 86 /** computes the power spectrum of an image 87 * 88 * @return psImage* the power spectrum of the 'in' image 89 */ 90 psImage* psImagePowerSpectrum( 91 psImage* out, ///< a psImage to recycle. If NULL, a new psImage is made. 92 const psImage* in ///< the psImage to power spectrum of 93 ); 94 95 /** Forward and reverse FFT calculations. 96 * 97 * This takes as input the vector of interest (in) and the direction 98 * (direction), which is specified by an enumerated type psFftDirection. 99 * The input vector may be of type psF32 or psC32, the result is always 100 * psC32. If the input vector is psF32, the direction must be forward. 101 * 102 * @return psVector* the FFT transformation result 103 */ 104 psVector* psVectorFFT( 105 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 106 const psVector* in, ///< the vector to apply transform to 107 psFftDirection direction ///< the direction of the transform 108 ); 109 110 /** extract the real portion of a complex vector 111 * 112 * @return psVector* real portion of the input vector. 113 */ 114 psVector* psVectorReal( 115 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 116 const psVector* in ///< the psVector to extract real portion from 117 ); 118 119 /** extract the imaginary portion of a complex vector 120 * 121 * @return psVector* imaginary portion of the input vector. 122 */ 123 psVector* psVectorImaginary( 124 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 125 const psVector* in ///< the psVector to extract imaginary portion from 126 ); 127 128 /** creates a complex vector from separate real and imaginary vectors 129 * 130 * @return psVector* resulting complex vector 131 */ 132 psVector* psVectorComplex( 133 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 134 const psVector* real, ///< the real vector 135 const psVector* imag ///< the imaginary vector 136 ); 137 138 /** computes the complex conjugate of a vector 139 * 140 * @return psVector* the complex conjugate of the 'in' vector 141 */ 142 psVector* psVectorConjugate( 143 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 144 const psVector* in ///< the psVector to compute conjugate of 145 ); 146 147 /** computes the power spectrum of a vector 148 * 149 * @return psVector* the power spectrum of the 'in' vector 150 */ 151 psVector* psVectorPowerSpectrum( 152 psVector* out, ///< a psVector to recycle. If NULL, a new psVector is made. 153 const psVector* in ///< the psVector to power spectrum of 154 ); 48 155 49 156 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
