Changeset 344 for trunk/archive/pslib/include/psFFT.h
- Timestamp:
- Mar 31, 2004, 5:01:04 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psFFT.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psFFT.h
r317 r344 16 16 /** Details on FFT implementation (private). Example shown is for FFTW */ 17 17 typedef struct { 18 fftw_plan plan; // !< FFTW plan on how to do the FFT19 char *filename; // !< File name for FFTW plan18 fftw_plan plan; ///< FFTW plan on how to do the FFT 19 char *filename; ///< File name for FFTW plan 20 20 } p_psFFTDetails; 21 21 22 22 /** Fast Fourier Transform */ 23 23 typedef struct { 24 p_psFFTDetails *details; // !< Details on FFT implementation (private)25 int nx, ny; // !< Size in x and y26 float *real; // !< Data in real space: a 2D array using the [nx*y + x] stuff27 void *fourier; // !< Data in fourier space; implementation dependent24 p_psFFTDetails *details; ///< Details on FFT implementation (private) 25 int nx, ny; ///< Size in x and y 26 float *real; ///< Data in real space: a 2D array using the [nx*y + x] stuff 27 void *fourier; ///< Data in fourier space; implementation dependent 28 28 } psFFT; 29 29 30 30 /** Constructor */ 31 31 psFFT * 32 psFFTAlloc(psImage *image // !< Image to transform32 psFFTAlloc(psImage *image ///< Image to transform 33 33 ); 34 34 35 35 /** Constructor for 1D case */ 36 36 psFFT * 37 psFFTAlloc1D(const psFloatArray *arr // !< Array to transform37 psFFTAlloc1D(const psFloatArray *arr ///< Array to transform 38 38 ); 39 39 40 40 /** Destructor. Returns the data in the real space as an image. */ 41 41 psImage * 42 psFFTFree(psImage *out, // !< Image to write the data to, or NULL43 psFFT *restrict fft // !< FFT to destroy42 psFFTFree(psImage *out, ///< Image to write the data to, or NULL 43 psFFT *restrict fft ///< FFT to destroy 44 44 ); 45 45 46 46 /** Forward FFT: from real to fourier space */ 47 47 psFFT * 48 psFFTForward(psFFT *fft // !< FFT to apply (input and output)48 psFFTForward(psFFT *fft ///< FFT to apply (input and output) 49 49 ); 50 50 51 51 /** Reverse FFT: from fourier to real space */ 52 52 psFFT * 53 psFFTReverse(psFFT *fft // !< FFT to apply (input and output)53 psFFTReverse(psFFT *fft ///< FFT to apply (input and output) 54 54 ); 55 55 56 56 /** Apply filter function in fourier space */ 57 57 psFFT * 58 psFFTFilter(psFFT *fft, // !< FFT to use (input and output)59 float (*filterFunc)(int kx, int ky) // !< External filter function58 psFFTFilter(psFFT *fft, ///< FFT to use (input and output) 59 float (*filterFunc)(int kx, int ky) ///< External filter function 60 60 ); 61 61 62 62 /** Apply complex filter function */ 63 63 psFFT * 64 psFFTFilterComplex(psFFT *fft, // !< FFT to use (input and output)65 float (*realFilterFunc)(int kx, int ky), // !< External filter function, real part66 float (*imagFilterFunc)(int kx, int ky) // !< External filter function, imaginary part64 psFFTFilterComplex(psFFT *fft, ///< FFT to use (input and output) 65 float (*realFilterFunc)(int kx, int ky), ///< External filter function, real part 66 float (*imagFilterFunc)(int kx, int ky) ///< External filter function, imaginary part 67 67 ); 68 68 … … 71 71 */ 72 72 psFFT * 73 psFFTCrossCorrelate(psFFT *out // !< Output FFT (or NULL)74 const psFFT *fft1, const psFFT *fft2 // !< FFTs to use in cross-correlation73 psFFTCrossCorrelate(psFFT *out ///< Output FFT (or NULL) 74 const psFFT *fft1, const psFFT *fft2 ///< FFTs to use in cross-correlation 75 75 ); 76 76 77 77 /** Calculate FFT of the convolution. Straight multiplication of the FFTs */ 78 78 psFFT * 79 psFFTConvolve(psFFT *out, // !< Output FFT (or NULL)80 const psFFT *fft1, const psFFT *fft2 // !< FFTs to multiply79 psFFTConvolve(psFFT *out, ///< Output FFT (or NULL) 80 const psFFT *fft1, const psFFT *fft2 ///< FFTs to multiply 81 81 ); 82 82 83 83 /** Calculate power spectrum */ 84 84 psFloatArray * 85 psFFTPowerSpec(psFFT *fft // !< FFT to use (input and output)85 psFFTPowerSpec(psFFT *fft ///< FFT to use (input and output) 86 86 ); 87 87 88 88 /* Convert the real data in the FFT struct to an image again */ 89 89 psImage * 90 psFFTGetImage(psImage *out, // !< Image to write to (or NULL)91 const psFFT *fft // !< FFT to get image from90 psFFTGetImage(psImage *out, ///< Image to write to (or NULL) 91 const psFFT *fft ///< FFT to get image from 92 92 ); 93 93 94 94 /** Convert the Fourier transform data in the FFT struct to an image of complex numbers */ 95 95 psImage * 96 psFFTGetFT(psImage *out, // !< Image to write to (or NULL)97 const psFFT *fft // !< FFT to get Fourier transform from96 psFFTGetFT(psImage *out, ///< Image to write to (or NULL) 97 const psFFT *fft ///< FFT to get Fourier transform from 98 98 ); 99 99
Note:
See TracChangeset
for help on using the changeset viewer.
