NFFT Logo 3.0 API Reference
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

radon.c File Reference

NFFT-based discrete Radon transform. More...

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
#include "nfft3.h"

Go to the source code of this file.

Defines

#define KERNEL(r)   (1.0-fabs((double)(r))/((double)R/2))
 define weights of kernel function for discrete Radon transform

Functions

int polar_grid (int T, int R, double *x, double *w)
 generates the points x with weights w for the polar grid with T angles and R offsets
int linogram_grid (int T, int R, double *x, double *w)
 generates the points x with weights w for the linogram grid with T slopes and R offsets
int Radon_trafo (int(*gridfcn)(), int T, int R, double *f, int NN, double *Rf)
 computes the NFFT-based discrete Radon transform of f on the grid given by gridfcn() with T angles and R offsets
int main (int argc, char **argv)
 simple test program for the discrete Radon transform


Detailed Description

NFFT-based discrete Radon transform.

Computes the discrete Radon transform

\[ R_{\theta_t} f\left(\frac{s}{R}\right) = \sum_{r \in I_R} w_r \; \sum_{k \in I_N^2} f_{k} \mathrm{e}^{-2\pi\mathrm{I} k \; (\frac{r}{R}\theta_t)} \, \mathrm{e}^{2\pi\mathrm{i} r s / R} \qquad(t \in I_T, s \in I_R). \]

by taking the 2D-NFFT of $f_k$ ($k \in I_N^2$ ) at the points $\frac{r}{R}\theta_t$ of the polar or linogram grid followed by 1D-iFFTs for every direction $t \in T$ , where $w_r$ are the weights of the Dirichlet- or Fejer-kernel.

Author:
Markus Fenn
Date:
2005

Definition in file radon.c.


Function Documentation

int Radon_trafo int(*)()  gridfcn,
int  T,
int  R,
double *  f,
int  NN,
double *  Rf
 

computes the NFFT-based discrete Radon transform of f on the grid given by gridfcn() with T angles and R offsets

< index for nodes and freqencies

< plan for the nfft-2D

< variable for the fftw-1Ds

< plan for the fftw-1Ds

< index for directions and offsets

< knots and associated weights

init two dimensional NFFT plan

init nodes from grid

precompute psi, the entries of the matrix B

init Fourier coefficients from given image

NFFT-2D

FFTW-1Ds

finalise the plans and free the variables

Definition at line 91 of file radon.c.

References nfft_plan::f, nfft_plan::f_hat, fft(), FFT_OUT_OF_PLACE, FFTW_INIT, KERNEL, nfft_plan::M_total, MALLOC_F, MALLOC_F_HAT, MALLOC_X, nfft_plan::N_total, nfft_fftshift_complex(), nfft_finalize(), nfft_plan::nfft_flags, nfft_init_guru(), nfft_precompute_full_psi(), nfft_precompute_lin_psi(), nfft_precompute_psi(), nfft_trafo(), PRE_FULL_PSI, PRE_LIN_PSI, PRE_PHI_HUT, PRE_PSI, and nfft_plan::x.

Referenced by main().

int main int  argc,
char **  argv
 

simple test program for the discrete Radon transform

< grid generating function

< number of directions/offsets

< image size

load data

Radon transform

write result

free the variables

Definition at line 182 of file radon.c.

References linogram_grid(), polar_grid(), and Radon_trafo().


Generated on 1 Nov 2006 by Doxygen 1.4.4