newimage
 
Loading...
Searching...
No Matches
imfft.h
1/* imfft.h
2
3 Mark Jenkinson, FMRIB Image Analysis Group
4
5 Copyright (C) 2001 University of Oxford */
6
7/* CCOPYRIGHT */
8
9
10// FFT routines for 3D images
11#if !defined(__imfft_h)
12#define __imfft_h
13
14#include <string>
15#include <iostream>
16#include <fstream>
17#include <unistd.h>
18
19#include "armawrap/newmatap.h"
20#include "armawrap/newmatio.h"
21#include "newimage.h"
22#include "complexvolume.h"
23
24#define _GNU_SOURCE 1
25#define POSIX_SOURCE 1
26
27namespace NEWIMAGE {
28
30
31int ifft2(complexvolume& vol);
32int ifft2(const complexvolume& vin, complexvolume& vout);
33
34int fft2(complexvolume& vol);
35int fft2(const complexvolume& vin, complexvolume& vout);
36
37int ifft3(complexvolume& vol);
38int ifft3(const complexvolume& vin, complexvolume& vout);
39
40int fft3(complexvolume& vol);
41int fft3(const complexvolume& vin, complexvolume& vout);
42
43void fftshift(complexvolume& vol);
44
45//------------------------------------------------------------------------//
46
47int ifft2(volume<float>& realvol, volume<float>& imagvol);
48int ifft2(const volume<float>& realvin, const volume<float>& imagvin,
49 volume<float>& realvout, volume<float>& imagvout);
50
51int fft2(volume<float>& realvol, volume<float>& imagvol);
52int fft2(const volume<float>& realvin, const volume<float>& imagvin,
53 volume<float>& realvout, volume<float>& imagvout);
54
55int ifft3(volume<float>& realvol, volume<float>& imagvol);
56int ifft3(const volume<float>& realvin, const volume<float>& imagvin,
57 volume<float>& realvout, volume<float>& imagvout);
58
59int fft3(volume<float>& realvol, volume<float>& imagvol);
60int fft3(const volume<float>& realvin, const volume<float>& imagvin,
61 volume<float>& realvout, volume<float>& imagvout);
62
63void fftshift(volume<float>& vol);
64
65//------------------------------------------------------------------------//
66
67int ifft2(volume<double>& realvol, volume<double>& imagvol);
68int ifft2(const volume<double>& realvin, const volume<double>& imagvin,
69 volume<double>& realvout, volume<double>& imagvout);
70
71int fft2(volume<double>& realvol, volume<double>& imagvol);
72int fft2(const volume<double>& realvin, const volume<double>& imagvin,
73 volume<double>& realvout, volume<double>& imagvout);
74
75int ifft3(volume<double>& realvol, volume<double>& imagvol);
76int ifft3(const volume<double>& realvin, const volume<double>& imagvin,
77 volume<double>& realvout, volume<double>& imagvout);
78
79int fft3(volume<double>& realvol, volume<double>& imagvol);
80int fft3(const volume<double>& realvin, const volume<double>& imagvin,
81 volume<double>& realvout, volume<double>& imagvout);
82
83void fftshift(volume<double>& vol);
84
86
87}
88
89#endif