49 static void window_funct_init(
window_funct_plan* ths,
int m,
int n,
double sigma) {
63 double _Complex *f = (
double _Complex*)
nfft_malloc(that->
M_total*
sizeof(
double _Complex));
64 double _Complex *f_hat = (
double _Complex*)
nfft_malloc(that->
N_total*
sizeof(
double _Complex));
67 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
70 that->plan.
f = that->
f;
74 memset(f,0,that->
M_total*
sizeof(
double _Complex));
77 f_hat[j]=that->
f_hat[j];
80 for(l=-ths->n[0]/2;l<=ths->n[0]/2;l++) {
82 that->
f_hat[j]*=cexp(-2*KPI*_Complex_I*that->w[j]*((
double)l))/PHI_HUT(ths->n[0], ths->n[0]*that->w[j],0);
83 nfft_trafo(&that->plan);
86 if(fabs(that->t[j]-((
double)l)/((
double)ths->n[0]))<that->plan.
m/((
double)ths->n[0]))
88 double phi_val = PHI(ths->n[0],that->t[j]-((
double)l)/((
double)ths->n[0]),0);
89 f[j]+=that->
f[j]*phi_val;
95 that->
f_hat[j]=f_hat[j];
100 that->plan.
f = that->
f;
110 double _Complex *f = (
double _Complex*)
nfft_malloc(that->
M_total*
sizeof(
double _Complex));
111 double _Complex *f_hat = (
double _Complex*)
nfft_malloc(that->
N_total*
sizeof(
double _Complex));
114 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
116 memset(f_hat,0,that->
N_total*
sizeof(
double _Complex));
119 that->plan.
f = that->
f;
129 for(l=-ths->n[0]/2;l<=ths->n[0]/2;l++) {
133 if(fabs(that->t[j]-((
double)l)/((
double)ths->n[0]))<that->plan.
m/((
double)ths->n[0]))
134 that->
f[j]*=PHI(ths->n[0],that->t[j]-((
double)l)/((
double)ths->n[0]),0);
138 nfft_adjoint(&that->plan);
140 f_hat[j]+=that->
f_hat[j]*cexp(2*KPI*_Complex_I*that->w[j]*((
double)l));
147 f_hat[j] /= PHI_HUT(ths->n[0],ths->n[0]*that->w[j],0);
161 int m,
double sigma,
unsigned nfft_flags,
unsigned fftw_flags) {
163 nfft_init_guru(&ths->plan,2,N,M,n,m,nfft_flags,fftw_flags);
168 ths->
f = ths->plan.
f;
174 ths->
mv_trafo = (void (*) (
void* ))mri_inh_2d1d_trafo;
175 ths->
mv_adjoint = (void (*) (
void* ))mri_inh_2d1d_adjoint;
183 ths->plan.
f = ths->
f;
186 nfft_finalize(&ths->plan);
196 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
199 that->plan.
f =that->
f ;
204 for(l=-ths->n[0]/2;l<ths->n[0]/2;l++)
207 if(fabs(that->w[j]-((
double)l)/((
double)ths->n[0]))<ths->m/((
double)ths->n[0]))
208 that->plan.
f_hat[j*ths->n[0]+(l+ths->n[0]/2)]= that->
f_hat[j]*PHI(ths->n[0],that->w[j]-((
double)l)/((double)ths->n[0]),0);
210 that->plan.
f_hat[j*ths->n[0]+(l+ths->n[0]/2)]=0.0;
214 nfft_trafo(&that->plan);
218 that->
f[j] /= PHI_HUT(ths->n[0],ths->n[0]*that->plan.
x[3*j+2],0);
228 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
231 that->plan.
f =that->
f ;
235 that->
f[j] /= PHI_HUT(ths->n[0],ths->n[0]*that->plan.
x[3*j+2],0);
238 nfft_adjoint(&that->plan);
242 for(l=-ths->n[0]/2;l<ths->n[0]/2;l++)
245 if(fabs(that->w[j]-((
double)l)/((
double)ths->n[0]))<ths->m/((
double)ths->n[0]))
246 that->
f_hat[j]+= that->plan.
f_hat[j*ths->n[0]+(l+ths->n[0]/2)]*PHI(ths->n[0],that->w[j]-((
double)l)/((double)ths->n[0]),0);
256 int m,
double sigma,
unsigned nfft_flags,
unsigned fftw_flags) {
259 nfft_init_guru(&ths->plan,3,N,M,n,m,nfft_flags,fftw_flags);
262 ths->
f = ths->plan.
f;
266 ths->
mv_trafo = (void (*) (
void* ))mri_inh_3d_trafo;
267 ths->
mv_adjoint = (void (*) (
void* ))mri_inh_3d_adjoint;
273 nfft_finalize(&ths->plan);
fftw_complex * f_hat
Fourier coefficients.
fftw_complex * f_hat
Fourier coefficients.
void(* mv_adjoint)(void *)
Adjoint transform.
window_funct_plan is a plan to use the window functions independent of the nfft
void(* mv_trafo)(void *)
Transform.
void(* mv_adjoint)(void *)
Adjoint transform.
fftw_complex * f_hat
Fourier coefficients.
NFFT_INT N_total
Total number of Fourier coefficients.
NFFT_INT N_total
Total number of Fourier coefficients.
NFFT_INT M_total
Total number of samples.
NFFT_INT M_total
Total number of samples.
NFFT_INT M_total
Total number of samples.
double * spline_coeffs
input for de Boor algorithm, if B_SPLINE or SINC_2m is defined
void * nfft_malloc(size_t n)
void(* mv_trafo)(void *)
Transform.
double * x
Nodes in time/spatial domain, size is doubles.
NFFT_INT N_total
Total number of Fourier coefficients.
NFFT_INT m
Cut-off parameter for window function.