#include <complex.h>
#include <fftw3.h>
Go to the source code of this file.
Data Structures | |
struct | nfft_plan_ |
struct | nfct_plan_ |
Structure for a transform plan. More... | |
struct | nfst_plan_ |
Structure for a transform plan. More... | |
struct | nnfft_plan |
Structure for a transform plan. More... | |
struct | nsfft_plan_ |
struct | mri_inh_2d1d_plan |
The structure for the transform plan. More... | |
struct | mri_inh_3d_plan |
The structure for the transform plan. More... | |
struct | texture_plan_ |
Definition of the texture_plan. More... | |
struct | nfsft_plan_ |
Structure for a NFSFT transform plan. More... | |
Defines | |
#define | MACRO_MV_PLAN(float_type) |
Macros for public members inherited by all plan structures. samples. | |
#define | PRE_PHI_HUT (1U<< 0) |
Constant symbols for precomputation and memory usage. | |
#define | FG_PSI (1U<< 1) |
#define | PRE_LIN_PSI (1U<< 2) |
#define | PRE_FG_PSI (1U<< 3) |
#define | PRE_PSI (1U<< 4) |
#define | PRE_FULL_PSI (1U<< 5) |
#define | MALLOC_X (1U<< 6) |
#define | MALLOC_F_HAT (1U<< 7) |
#define | MALLOC_F (1U<< 8) |
#define | FFT_OUT_OF_PLACE (1U<< 9) |
#define | FFTW_INIT (1U<< 10) |
#define | MALLOC_V (1U<< 11) |
#define | SNDFT (1U<< 12) |
#define | PRE_ONE_PSI (PRE_LIN_PSI| PRE_FG_PSI| PRE_PSI| PRE_FULL_PSI) |
#define | TEXTURE_MAX_ANGLE (2*3.1415926535897932384) |
Constant for the period length of sine (default: ![]() | |
#define | TEXTURE_DEF_PRECOMPUTE_FLAGS 0U |
Default value for texture_precompute_flags. | |
#define | TEXTURE_DEF_NFSFT_PRECOMPUTE_FLAGS 0U |
Default value for nfsft_precompute_flags. | |
#define | TEXTURE_DEF_NFSFT_THRESHOLD 1000.0 |
Default value for nfsft_threshold. | |
#define | TEXTURE_DEF_INIT_FLAGS 0U |
Default value for texture_init_flags. | |
#define | TEXTURE_DEF_NFSFT_INIT_FLAGS 0U |
Default value for nfsft_init_flags. | |
#define | TEXTURE_DEF_NFFT_CUTOFF 8 |
Default value for nfft_cutoff. | |
#define | NFSFT_NORMALIZED (1U << 0) |
By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the
| |
#define | NFSFT_USE_NDFT (1U << 1) |
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm. | |
#define | NFSFT_USE_DPT (1U << 2) |
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm. | |
#define | NFSFT_MALLOC_X (1U << 3) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array x for you. | |
#define | NFSFT_MALLOC_F_HAT (1U << 5) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array f_hat for you. | |
#define | NFSFT_MALLOC_F (1U << 6) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array f for you. | |
#define | NFSFT_PRESERVE_F_HAT (1U << 7) |
If this flag is set, it is guaranteed that during an execution of ndsft_trafo or nfsft_trafo the content of f_hat remains unchanged. | |
#define | NFSFT_PRESERVE_X (1U << 8) |
If this flag is set, it is guaranteed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of x remains unchanged. | |
#define | NFSFT_PRESERVE_F (1U << 9) |
If this flag is set, it is guaranteed that during an execution of ndsft_adjoint or nfsft_adjoint the content of f remains unchanged. | |
#define | NFSFT_DESTROY_F_HAT (1U << 10) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo or nfsft_trafo the content of f_hat may be changed. | |
#define | NFSFT_DESTROY_X (1U << 11) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of x may be changed. | |
#define | NFSFT_DESTROY_F (1U << 12) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_adjoint or nfsft_adjoint the content of f may be changed. | |
#define | NFSFT_NO_DIRECT_ALGORITHM (1U << 13) |
If this flag is set, the transforms ndsft_trafo and ndsft_adjoint do not work. | |
#define | NFSFT_NO_FAST_ALGORITHM (1U << 14) |
If this flag is set, the transforms nfsft_trafo and nfsft_adjoint do not work. | |
#define | NFSFT_ZERO_F_HAT (1U << 16) |
If this flag is set, the transforms nfsft_adjoint and ndsft_adjoint set all unused entries in f_hat not corresponding to spherical Fourier coefficients to zero. | |
#define | NFSFT_INDEX(k, n, plan) ((2*(plan)->N+2)*((plan)->N-n+1)+(plan)->N+k+1) |
This helper macro expands to the index ![]() ![]() ![]() ![]()
. | |
#define | NFSFT_F_HAT_SIZE(N) ((2*N+2)*(2*N+2)) |
This helper macro expands to the logical size of a spherical Fourier coefficients array for a bandwidth N. | |
#define | FPT_NO_FAST_ALGORITHM (1U << 2) |
If set, TODO complete comment. | |
#define | FPT_NO_DIRECT_ALGORITHM (1U << 3) |
If set, TODO complete comment. | |
#define | FPT_NO_STABILIZATION (1U << 0) |
If set, no stabilization will be used. | |
#define | FPT_PERSISTENT_DATA (1U << 4) |
If set, TODO complete comment. | |
#define | FPT_FUNCTION_VALUES (1U << 5) |
If set, the output are function values at Chebyshev nodes rather than Chebyshev coefficients. | |
#define | FPT_AL_SYMMETRY (1U << 6) |
TODO Don't use this flag! | |
#define | LANDWEBER (1U<< 0) |
Constant symbols for precomputation and memory usage (inverse problem). | |
#define | STEEPEST_DESCENT (1U<< 1) |
#define | CGNR (1U<< 2) |
#define | CGNE (1U<< 3) |
#define | NORMS_FOR_LANDWEBER (1U<< 4) |
#define | PRECOMPUTE_WEIGHT (1U<< 5) |
#define | PRECOMPUTE_DAMP (1U<< 6) |
#define | F(MV, FLT, name,) void i ## MV ## _ ## name(__VA_ARGS__) |
function mangling macro | |
#define | MACRO_SOLVER_PLAN(MV, FLT) |
Typedefs | |
typedef nfft_plan_ | nfft_plan |
typedef nfct_plan_ | nfct_plan |
Structure for a transform plan. | |
typedef nfst_plan_ | nfst_plan |
Structure for a transform plan. | |
typedef nsfft_plan_ | nsfft_plan |
typedef texture_plan_ | texture_plan |
Stores all data for a direct and adjoint transformation. | |
typedef nfsft_plan_ | nfsft_plan |
Structure for a NFSFT transform plan. | |
typedef fpt_set_s_ * | fpt_set |
A set of precomputed data for a set of DPT transforms of equal maximum length. | |
Functions | |
void | ndft_trafo (nfft_plan *ths) |
Executes a NDFT, see equation (1.1) in [Guide], computes for j=0,. | |
void | ndft_adjoint (nfft_plan *ths) |
Executes a NDFT, see equation (1.2) in [Guide], computes for k in I_N^d f_hat[k] = sum_{j=0}^{M-1} f[j] * exp(+2(pi) k x[j]). | |
void | nfft_trafo (nfft_plan *ths) |
Executes a NFFT, see equation (1.1) in [Guide], computes fast and approximate for j=0,. | |
void | nfft_adjoint (nfft_plan *ths) |
Executes an adjoint NFFT, see equation (1.2) in [Guide], computes fast and approximate for k in I_N^d f_hat[k] = sum_{j=0}^{M-1} f[j] * exp(+2(pi) k x[j]). | |
void | nfft_init_1d (nfft_plan *ths, int N1, int M) |
Initialisation of a transform plan, wrapper d=1. | |
void | nfft_init_2d (nfft_plan *ths, int N1, int N2, int M) |
Initialisation of a transform plan, wrapper d=2. | |
void | nfft_init_3d (nfft_plan *ths, int N1, int N2, int N3, int M) |
Initialisation of a transform plan, wrapper d=3. | |
void | nfft_init (nfft_plan *ths, int d, int *N, int M) |
Initialisation of a transform plan, simple. | |
void | nfft_init_advanced (nfft_plan *ths, int d, int *N, int M, unsigned nfft_flags_on, unsigned nfft_flags_off) |
Initialisation of a transform plan, advanced. | |
void | nfft_init_guru (nfft_plan *ths, int d, int *N, int M, int *n, int m, unsigned nfft_flags, unsigned fftw_flags) |
Initialisation of a transform plan, guru. | |
void | nfft_precompute_full_psi (nfft_plan *ths) |
void | nfft_precompute_one_psi (nfft_plan *ths) |
Precomputation for a transform plan. | |
void | nfft_finalize (nfft_plan *ths) |
Destroys a transform plan. | |
void | nfct_init_1d (nfct_plan *ths_plan, int N0, int M_total) |
Creates a 1-dimensional transform plan. | |
void | nfct_init_2d (nfct_plan *ths_plan, int N0, int N1, int M_total) |
Creates a 3-dimensional transform plan. | |
void | nfct_init_3d (nfct_plan *ths_plan, int N0, int N1, int N2, int M_total) |
Creates a 3-dimensional transform plan. | |
void | nfct_init (nfct_plan *ths_plan, int d, int *N, int M_total) |
Creates a d-dimensional transform plan. | |
void | nfct_init_guru (nfct_plan *ths_plan, int d, int *N, int M_total, int *n, int m, unsigned nfct_flags, unsigned fftw_flags) |
Creates a d-dimensional transform plan. | |
void | nfct_precompute_psi (nfct_plan *ths_plan) |
precomputes the values psi if the PRE_PSI is set the application program has to call this routine after setting the nodes this_plan->x | |
void | nfct_trafo (nfct_plan *ths_plan) |
executes a NFCT (approximate,fast), computes for ![]() ![]() | |
void | ndct_trafo (nfct_plan *ths_plan) |
executes a NDCT (exact,slow), computes for ![]() ![]() | |
void | nfct_adjoint (nfct_plan *ths_plan) |
executes a transposed NFCT (approximate,fast), computes for ![]() ![]() | |
void | ndct_adjoint (nfct_plan *ths_plan) |
executes a direct transposed NDCT (exact,slow), computes for ![]() ![]() | |
void | nfct_finalize (nfct_plan *ths_plan) |
Destroys a plan. | |
double | nfct_phi_hut (nfct_plan *ths_plan, int k, int d) |
do some adjustments (N,n) then compute PHI_HUT | |
double | nfct_phi (nfct_plan *ths_plan, double x, int d) |
do some adjustments (N,n) then compute PHI | |
int | nfct_fftw_2N (int n) |
returns 2(n-1), fftw related issue | |
int | nfct_fftw_2N_rev (int n) |
returns 0.5n+1, fftw related issue | |
void | nfst_init_1d (nfst_plan *ths_plan, int N0, int M_total) |
Creates a 1-dimensional transform plan. | |
void | nfst_init_2d (nfst_plan *ths_plan, int N0, int N1, int M_total) |
Creates a 3-dimensional transform plan. | |
void | nfst_init_3d (nfst_plan *ths_plan, int N0, int N1, int N2, int M_total) |
Creates a 3-dimensional transform plan. | |
void | nfst_init (nfst_plan *ths_plan, int d, int *N, int M_total) |
Creates a d-dimensional transform plan. | |
void | nfst_init_m (nfst_plan *ths_plan, int d, int *N, int M_total, int m) |
Creates a d-dimensional transform plan with pcific m. | |
void | nfst_init_guru (nfst_plan *ths_plan, int d, int *N, int M_total, int *n, int m, unsigned nfst_flags, unsigned fftw_flags) |
Creates a d-dimensional transform plan. | |
void | nfst_precompute_psi (nfst_plan *ths_plan) |
precomputes the values psi if the PRE_PSI is set the application program has to call this routine after setting the nodes this_plan->x | |
void | nfst_trafo (nfst_plan *ths_plan) |
executes a NFST (approximate,fast), computes for ![]() ![]() | |
void | ndst_trafo (nfst_plan *ths_plan) |
executes a NDST (exact,slow), computes for ![]() ![]() | |
void | nfst_adjoint (nfst_plan *ths_plan) |
executes a transposed NFST (approximate,fast), computes for ![]() ![]() | |
void | ndst_adjoint (nfst_plan *ths_plan) |
executes a direct transposed NDST (exact,slow), computes for ![]() ![]() | |
void | nfst_finalize (nfst_plan *ths_plan) |
Destroys a plan. | |
void | nfst_full_psi (nfst_plan *ths_plan, double eps) |
more memory usage, a bit faster | |
double | nfst_phi_hut (nfst_plan *ths_plan, int k, int d) |
do some adjustments (N,n) then compute PHI_HUT | |
double | nfst_phi (nfst_plan *ths_plan, double x, int d) |
do some adjustments (N,n) then compute PHI | |
int | nfst_fftw_2N (int n) |
returns 2(n+1), fftw related issue | |
int | nfst_fftw_2N_rev (int n) |
returns 0.5n-1, fftw related issue | |
void | nnfft_init (nnfft_plan *ths_plan, int d, int N_total, int M_total, int *N) |
Creates a transform plan. | |
void | nnfft_init_guru (nnfft_plan *ths_plan, int d, int N_total, int M_total, int *N, int *N1, int m, unsigned nnfft_flags) |
Creates a transform plan. | |
void | nndft_trafo (nnfft_plan *ths_plan) |
Executes a direct NNDFT, i.e. | |
void | nndft_adjoint (nnfft_plan *ths_plan) |
Executes a direct adjoint NNDFT, i.e. | |
void | nnfft_trafo (nnfft_plan *ths_plan) |
Executes a NNFFT, i.e. | |
void | nnfft_adjoint (nnfft_plan *ths_plan) |
Executes a adjoint NNFFT, i.e. | |
void | nnfft_precompute_lin_psi (nnfft_plan *ths_plan) |
Precomputation for a transform plan. | |
void | nnfft_precompute_psi (nnfft_plan *ths_plan) |
Precomputation for a transform plan. | |
void | nnfft_precompute_full_psi (nnfft_plan *ths_plan) |
Precomputation for a transform plan. | |
void | nnfft_precompute_phi_hut (nnfft_plan *ths_plan) |
Precomputation for a transform plan. | |
void | nnfft_finalize (nnfft_plan *ths_plan) |
Destroys a plan. | |
void | nsdft_trafo (nsfft_plan *ths) |
Executes a NSDFT, computes for j=0,. | |
void | nsdft_adjoint (nsfft_plan *ths) |
Executes an ajoint NSDFT, computes for k in H_N^d f_hat[k] = sum_{j=0,. | |
void | nsfft_trafo (nsfft_plan *ths) |
Executes a NSDFT, computes fast and approximate for j=0,. | |
void | nsfft_adjoint (nsfft_plan *ths) |
Executes a NSDFT, computes fast and approximate for k in H_N^d f_hat[k] = sum_{j=0,. | |
void | nsfft_cp (nsfft_plan *ths, nfft_plan *ths_nfft) |
Copy coefficients from nsfft plan to a nfft plan. | |
void | nsfft_init_random_nodes_coeffs (nsfft_plan *ths) |
Initialisation of pseudo random nodes and coefficients. | |
void | nsfft_init (nsfft_plan *ths, int d, int J, int M, int m, unsigned flags) |
Initialisation of a transform plan. | |
void | nsfft_finalize (nsfft_plan *ths) |
Destroys a transform plan. | |
void | mri_inh_2d1d_trafo (mri_inh_2d1d_plan *ths) |
Executes a mri transformation considering the field inhomogeneity with the 2d1d method, i.e. | |
void | mri_inh_2d1d_adjoint (mri_inh_2d1d_plan *ths) |
Executes an adjoint mri transformation considering the field inhomogeneity with the 2d1d method, i.e. | |
void | mri_inh_2d1d_init_guru (mri_inh_2d1d_plan *ths, int *N, int M, int *n, int m, double sigma, unsigned nfft_flags, unsigned fftw_flags) |
Creates a transform plan. | |
void | mri_inh_2d1d_finalize (mri_inh_2d1d_plan *ths) |
Destroys a plan. | |
void | mri_inh_3d_trafo (mri_inh_3d_plan *ths) |
Executes a mri transformation considering the field inhomogeneity with the 3d method, i.e. | |
void | mri_inh_3d_adjoint (mri_inh_3d_plan *ths) |
Executes an adjoint mri transformation considering the field inhomogeneity with the 3d method, i.e. | |
void | mri_inh_3d_init_guru (mri_inh_3d_plan *ths, int *N, int M, int *n, int m, double sigma, unsigned nfft_flags, unsigned fftw_flags) |
void | mri_inh_3d_finalize (mri_inh_3d_plan *ths) |
Destroys a plan. | |
void | texture_precompute (int N) |
Performes precomputations with default values for all parameters. | |
void | texture_precompute_advanced (int N, unsigned int texture_precompute_flags, unsigned int nfsft_precompute_flags, double nfsft_threshold) |
Performes precomputations. | |
void | texture_init (texture_plan *ths, int N, int N1, int N2, complex *omega, complex *x, const double *h_phi, const double *h_theta, const double *r) |
Initialisation of a plan with default values for all parameters. | |
void | texture_init_advanced (texture_plan *ths, int N, int N1, int N2, complex *omega, complex *x, const double *h_phi, const double *h_theta, const double *r, unsigned int texture_init_flags, unsigned int nfsft_init_flags, int nfft_cutoff) |
Initialisation of a plan. | |
void | texture_trafo (texture_plan *ths) |
Carries out the direct transform. | |
void | texture_adjoint (texture_plan *ths) |
Carries out the adjoint transform. | |
void | texture_finalize (texture_plan *ths) |
Frees all memory allocated by texture_init or texture_init_advanced. | |
void | texture_forget () |
Frees all memory allocated by texture_precompute or texture_precompute_advanced. | |
int | texture_flat_index (int l, int m, int n) |
Convert a non-flat index of the frequencies ![]() | |
int | texture_flat_length (int N) |
Determines the length of an array omega storing frequencies in a given bandwidth. | |
int | texture_get_omega_length (texture_plan *ths) |
Returns the length of the frequency array stored in a plan. | |
int | texture_get_x_length (texture_plan *ths) |
Returns the length of the sample array stored in a plan. | |
int | texture_get_N (texture_plan *ths) |
Returns the bandwidth stored in a plan. | |
int | texture_get_N1 (texture_plan *ths) |
Returns the number of pole figures stored in a plan. | |
int | texture_get_N2 (texture_plan *ths) |
Returns the number of samples per pole figure stored in a plan. | |
const complex * | texture_get_omega (texture_plan *ths) |
Returns a pointer to the frequencies stored in a plan. | |
void | texture_set_omega (texture_plan *ths, complex *omega) |
Sets the frequencies in a plan. | |
const complex * | texture_get_x (texture_plan *ths) |
Returns a pointer to the samples stored in a plan. | |
void | texture_set_x (texture_plan *ths, complex *x) |
Sets the samples in a plan. | |
const double * | texture_get_h_phi (texture_plan *ths) |
Returns a pointer to the latitudes of the pole figures stored in a plan. | |
void | texture_set_h_phi (texture_plan *ths, const double *h_phi) |
Sets the latitudes of the pole figures in a plan. | |
const double * | texture_get_h_theta (texture_plan *ths) |
Returns the longitudes of the pole figures stored in a plan. | |
void | texture_set_h_theta (texture_plan *ths, const double *h_theta) |
Sets the longitudes of the pole figures in a plan. | |
const double * | texture_get_r (texture_plan *ths) |
Returns the nodes of the pole figures stored in a plan. | |
void | texture_set_r (texture_plan *ths, const double *r) |
Sets the nodes of the pole figures in a plan. | |
unsigned int | texture_get_nfsft_init_flags (texture_plan *ths) |
Returnes the flags used for the initialisation of the nfsft stored in a plan. | |
void | texture_set_nfsft_init_flags (texture_plan *ths, unsigned int nfsft_init_flags) |
Sets the flags used for the initialisation of the nfsft in a plan. | |
int | texture_get_nfft_cutoff (texture_plan *ths) |
Returns the nfft_cutoff parameter used for the initialisation of the nfsft stored in a plan. | |
void | texture_set_nfft_cutoff (texture_plan *ths, int nfft_cutoff) |
Sets the nfft_cutoff parameter used for the initialisation of the nfsft in a plan. | |
void | nfsft_init (nfsft_plan *plan, int N, int M) |
Creates a transform plan. | |
void | nfsft_init_advanced (nfsft_plan *plan, int N, int M, unsigned int nfsft_flags) |
Creates a transform plan. | |
void | nfsft_init_guru (nfsft_plan *plan, int N, int M, unsigned int nfsft_flags, int nfft_flags, int nfft_cutoff) |
Creates a transform plan. | |
void | nfsft_precompute (int N, double kappa, unsigned int nfsft_flags, unsigned int fpt_flags) |
Performes precomputation up to the next power of two with respect to a given bandwidth ![]() | |
void | nfsft_forget () |
Forgets all precomputed data. | |
void | ndsft_trafo (nfsft_plan *plan) |
Executes a direct NDSFT, i.e. | |
void | ndsft_adjoint (nfsft_plan *plan) |
Executes a direct adjoint NDSFT, i.e. | |
void | nfsft_trafo (nfsft_plan *plan) |
Executes a NFSFT, i.e. | |
void | nfsft_adjoint (nfsft_plan *plan) |
Executes an adjoint NFSFT, i.e. | |
void | nfsft_finalize (nfsft_plan *plan) |
Destroys a plan. | |
void | nfsft_precompute_x (nfsft_plan *plan) |
fpt_set | fpt_init (const int M, const int t, const unsigned int flags) |
Initializes a set of precomputed data for DPT transforms of equal length. | |
void | fpt_precompute (fpt_set set, const int m, const double *alpha, const double *beta, const double *gamma, int k_start, const double threshold) |
Computes the data required for a single DPT transform. | |
void | dpt_trafo (fpt_set set, const int m, const complex *x, complex *y, const int k_end, const unsigned int flags) |
Computes a single DPT transform. | |
void | fpt_trafo (fpt_set set, const int m, const complex *x, complex *y, const int k_end, const unsigned int flags) |
Computes a single DPT transform. | |
void | dpt_transposed (fpt_set set, const int m, complex *x, const complex *y, const int k_end, const unsigned int flags) |
Computes a single DPT transform. | |
void | fpt_transposed (fpt_set set, const int m, complex *x, const complex *y, const int k_end, const unsigned int flags) |
Computes a single DPT transform. | |
void | fpt_finalize (fpt_set set) |
|
Value: int N_total; \ int M_total; \ float_type *f_hat; \ float_type *f;
|