45 static void window_funct_init(
window_funct_plan* ths,
int m,
int n,
double sigma) {
59 double _Complex *f = (
double _Complex*)
nfft_malloc(that->
M_total*
sizeof(
double _Complex));
60 double _Complex *f_hat = (
double _Complex*)
nfft_malloc(that->
N_total*
sizeof(
double _Complex));
63 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
66 that->plan.
f = that->
f;
70 memset(f,0,that->
M_total*
sizeof(
double _Complex));
73 f_hat[j]=that->
f_hat[j];
76 for(l=-ths->n[0]/2;l<=ths->n[0]/2;l++) {
78 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);
82 if(fabs(that->t[j]-((
double)l)/((
double)ths->n[0]))<that->plan.
m/((
double)ths->n[0]))
84 double phi_val = PHI(ths->n[0],that->t[j]-((
double)l)/((
double)ths->n[0]),0);
85 f[j]+=that->
f[j]*phi_val;
91 that->
f_hat[j]=f_hat[j];
96 that->plan.
f = that->
f;
106 double _Complex *f = (
double _Complex*)
nfft_malloc(that->
M_total*
sizeof(
double _Complex));
107 double _Complex *f_hat = (
double _Complex*)
nfft_malloc(that->
N_total*
sizeof(
double _Complex));
110 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
112 memset(f_hat,0,that->
N_total*
sizeof(
double _Complex));
115 that->plan.
f = that->
f;
125 for(l=-ths->n[0]/2;l<=ths->n[0]/2;l++) {
129 if(fabs(that->t[j]-((
double)l)/((
double)ths->n[0]))<that->plan.
m/((
double)ths->n[0]))
130 that->
f[j]*=PHI(ths->n[0],that->t[j]-((
double)l)/((
double)ths->n[0]),0);
136 f_hat[j]+=that->
f_hat[j]*cexp(2*KPI*_Complex_I*that->w[j]*((
double)l));
143 f_hat[j] /= PHI_HUT(ths->n[0],ths->n[0]*that->w[j],0);
157 int m,
double sigma,
unsigned nfft_flags,
unsigned fftw_flags) {
159 nfft_init_guru(&ths->plan,2,N,M,n,m,nfft_flags,fftw_flags);
164 ths->
f = ths->plan.
f;
171 ths->
mv_adjoint = (void (*) (
void* ))mri_inh_2d1d_adjoint;
179 ths->plan.
f = ths->
f;
192 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
195 that->plan.
f =that->
f ;
200 for(l=-ths->n[0]/2;l<ths->n[0]/2;l++)
203 if(fabs(that->w[j]-((
double)l)/((
double)ths->n[0]))<ths->m/((
double)ths->n[0]))
204 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);
206 that->plan.
f_hat[j*ths->n[0]+(l+ths->n[0]/2)]=0.0;
214 that->
f[j] /= PHI_HUT(ths->n[0],ths->n[0]*that->plan.
x[3*j+2],0);
224 window_funct_init(ths,that->plan.
m,that->N3,that->sigma3);
227 that->plan.
f =that->
f ;
231 that->
f[j] /= PHI_HUT(ths->n[0],ths->n[0]*that->plan.
x[3*j+2],0);
238 for(l=-ths->n[0]/2;l<ths->n[0]/2;l++)
241 if(fabs(that->w[j]-((
double)l)/((
double)ths->n[0]))<ths->m/((
double)ths->n[0]))
242 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);
252 int m,
double sigma,
unsigned nfft_flags,
unsigned fftw_flags) {
255 nfft_init_guru(&ths->plan,3,N,M,n,m,nfft_flags,fftw_flags);
258 ths->
f = ths->plan.
f;
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 mri_inh_3d_trafo(mri_inh_3d_plan *that)
void mri_inh_2d1d_finalize(mri_inh_2d1d_plan *ths)
void(* mv_trafo)(void *)
Transform.
void(* mv_adjoint)(void *)
Adjoint transform.
void nfft_adjoint(nfft_plan *ths)
fftw_complex * f_hat
Fourier coefficients.
NFFT_INT N_total
Total number of Fourier coefficients.
void mri_inh_3d_adjoint(mri_inh_3d_plan *that)
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.
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)
void nfft_trafo(nfft_plan *ths)
void * nfft_malloc(size_t n)
void nfft_finalize(nfft_plan *ths)
void mri_inh_2d1d_trafo(mri_inh_2d1d_plan *that)
void(* mv_trafo)(void *)
Transform.
Header file for the nfft3 library.
double * x
Nodes in time/spatial domain, size is doubles.
NFFT_INT N_total
Total number of Fourier coefficients.
void mri_inh_3d_finalize(mri_inh_3d_plan *ths)
NFFT_INT m
Cut-off parameter for window function.