Gfft¶
template <typename T1> class Gfft
Uniform Cartesian FFT encoding operator.
Implements a fully sampled Cartesian Fourier encoding operator, wrapping FFTW on CPU, cuFFT on GPU (OpenACC path), or Apple vDSP/Accelerate (Metal path). This is the most efficient encoding operator for fully sampled Cartesian k-space trajectories.
Use G * x for the forward FFT and G / d for the adjoint (inverse FFT).
See : Gnufft for non-Cartesian (non-uniform) k-space trajectories.
Gfft<float> F(Nx, Ny, Nz);
Col<cx_float> kdata = F * image; // forward FFT
Col<cx_float> recon = F / kdata; // inverse FFT
T1
: Floating-point precision type (float or double).
Variables¶
| Name | Description |
|---|---|
| stream | Image x-dimension in pixels. |
| plan | cuFFT plan handle. |
Operators¶
| Name | Description |
|---|---|
| operator* | Forward FFT: image -> k-space. d : Input image vector of length NxNyNz. Return : Output k-space vector of length NxNyNz. |
| operator/ | Adjoint FFT (inverse FFT): k-space -> image. d : Input k-space vector of length NxNyNz. Return : Output image vector of length NxNyNz. |
| operator* | Forward FFT (forgeCol overload). |
| operator/ | Adjoint FFT (forgeCol overload). |
Functions¶
| Name | Description |
|---|---|
| Gfft | Default constructor. |
| Gfft | Construct a Gfft operator for an Nx x Ny x Nz image grid. |
Variable Details¶
plan¶
cufftHandle* plan
cuFFT plan handle.
stream¶
void* stream
Image x-dimension in pixels.
Image y-dimension in pixels.
Image z-dimension in pixels.
GPU stream handle (OpenACC/CUDA).
Operator Details¶
operator*¶
Col<CxT1> operator*(const Col<CxT1>& d) const
Forward FFT: image -> k-space.
d
: Input image vector of length NxNyNz.
Return : Output k-space vector of length NxNyNz.
forgeCol<forgeComplex<T1>> operator*(const forgeCol<forgeComplex<T1>>& d) const
Forward FFT (forgeCol overload).
d
: Input image vector of length NxNyNz.
Return : Output k-space vector of length NxNyNz.
operator/¶
Col<CxT1> operator/(const Col<CxT1>& d) const
Adjoint FFT (inverse FFT): k-space -> image.
d
: Input k-space vector of length NxNyNz.
Return : Output image vector of length NxNyNz.
forgeCol<forgeComplex<T1>> operator/(const forgeCol<forgeComplex<T1>>& d) const
Adjoint FFT (forgeCol overload).
d
: Input k-space vector of length NxNyNz.
Return : Output image vector of length NxNyNz.
Function Details¶
Gfft¶
Gfft()
Default constructor. Produces an uninitialized operator.
Gfft(uword ix, uword iy, uword iz)
Construct a Gfft operator for an Nx x Ny x Nz image grid.
ix
: Image x-dimension in pixels (Nx).
iy
: Image y-dimension in pixels (Ny).
iz
: Image z-dimension in pixels (Nz); use 1 for 2-D.