radon: Radon Transformation

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/radon.r

Description

This function will forward project (normal Radon transformation) a quadratic image into a sinogram.

Usage

1
2
3
4
5
radon(oData, mode="NN", XYSamples=nrow(oData), 
      XYmin=-0.5*(nrow(oData)-1), DeltaXY=1, ThetaSamples=181, 
      RhoSamples=2*round(sqrt(sum((dim(oData))^2))/2)+1, ThetaMin=0,
      RhoMin=-0.5*((2*round(sqrt(sum((dim(oData))^2))/2)+1)-1),
      DeltaTheta=pi/ThetaSamples, DeltaRho=(2*abs(RhoMin)+1)/RhoSamples)

Arguments

oData

(matrix) A matrix that contains the image (for the Radon transformation).

mode

(character) The interpolation procedure. Currently supported functions are mode="NN" (Nearest Neighbour Interpolation), "LI" (Linear Interpolation) and "SINC" (Sinc Interpolation). Defaults to mode="NN".

XYSamples

(integer) Specifies the number of samples on the x-axis (rows) and y-axis (columns) in oData. Defaults to XYSamples=nrow(oData).

XYmin

(double) Specifies the minimum sample position in the image on the first and second axis. If not given, the image is centered around the middle. Defaults to XYmin=-0.5*(nrow(oData)-1).

DeltaXY

(double) Specifies the sampling distance of both axes in the image. Defaults to DeltaXY=1.

ThetaSamples

(integer) Specifies the number of samples in the angular parameter theta in the sinogram. The sinogram is sampled linearly from 0 to (approximately) pi radians. Defaults to ThetaSamples=181.

RhoSamples

(integer) Specifies the number of samples in the distance parameter rho in the sinogram. Should be an odd number.
Defaults to RhoSamples = 2*round(sqrt(sum((dim(oData))^2))/2)+1.

ThetaMin

(double) Specifies the minimum sample position in the sinogram on the first axis. Defaults to ThetaMin=0.

RhoMin

(double) Specifies the minimum sample position in the sinogram on the second axis. Defaults to RhoMin=-0.5*((2*round(sqrt(sum((dim(oData))^2))/2)+1)-1).

DeltaTheta

(double) Angular sampling distance. Defaults to DeltaTheta=pi/ThetaSamples.

DeltaRho

(double) Specifies the sampling distance in rho. The program will center the sampling points around 0. Defaults to DeltaRho=(2*abs(RhoMin)+1)/RhoSamples.

Details

The function implements a forward projection of a quadratic image. The used projection is the Radon transformation, named after Johann Radon (1917). The normal form of a line is given by

rho=x*cos(theta)+y*sin(theta).

There are different ways to define a Radon transformation of a two dimensional continuous function f. One possibility is to integrate values of f along lines, whereas the location of the line is determined by the parameter rho, the shortest distance from the origin of the coordinate system to the line, and theta an angle corresponding to the angular orientation of the line. If negative values of rho are introduced the parameter domain is bounded by 0 <= theta < pi and RhoMin <= rho <= RhoMax, whereas RhoMin=-RhoMax. Numerical computations use the discrete Radon transformation. Therefore all parameters are sampled linearly

x=x_m=XMin+m*DeltaX, m=0,…,XSamples-1,
y=y_n=YMin+n*DeltaY, n=0,…,YSamples-1,
ρ=ρ_r=RhoMin+r*DeltaRho, r=0,…,RhoSamples-1 and
θ=θ_t=ThetaMin+t*DeltaTheta, t=0,…,ThetaSamples-1.

Given the digitally sampled image a fundamental problem arises. The discrete Radon transformation requires samples that are not found in the digital image, because linear sampling of all variables implies that sampling parameter in the Radon transformation in general never coincides with the sampling parameter of the digital image. That should be clear and it is necessary to approximate the x and y by using "NN" (nearest neighbour approximation), "LI" (linear interpolation) or "SINC" (sinc interpolation).
Several things must be fulfilled to ensure a reasonable performance. Firstly sampling must be adequate in all parameters (see to references to get detail information). This will imply bounds on the sampling intervals. Secondly it is assumed that the fundamental function f(x,y) to be reconstructed have compact support, or more precisely is zero if sqrt(x^2+y^2) > |rho_{max}|. This demand will ensure that Rf(rho,theta)=0, if |rho|>|rho_{max}|. If this cannot be fulfilled, numerical problems must be expected.
Assuming that f(x,y) has compact support, then (x,y)=(0,0) should be placed to minimize |rho_{max}|. This will reduce the size of the data array used for the discrete Radon transform.

The forward projection methods that are implemented in this function are developed by P. Toft (1996) and implemented in R by J. Schulz (2006). For example see to references to get more detailed theoretical information about the Radon transformation.

Value

rData

A matrix, that contains the Radon transformed data.

Header

A list of following values:

SignalDim

The dimension of the rData.

XYmin

The minimum x- and y-position in rData.

DeltaXY

Sampling distance on the x- and y-axis in rData.

call

Arguments of the call to radon.

Author(s)

Joern Schulz jschulz78@web.de, Peter Toft.

References

Toft, Peter, Ph.D. Thesis, The Radon Transform - Theory and Implementation, Department of Mathematical Modelling Section for Digital Signal Processing, Technical University of Denmark, 1996.
http://eivind.imm.dtu.dk/staff/ptoft/ptoft_papers.html

Schulz, Joern, Diploma Thesis: Analyse von PET Daten unter Einsatz adaptiver Glaettungsverfahren, Humboldt-Universitaet zu Berlin, Institut fuer Mathematik, 2006.

Radon, Johann, Ueber die Bestimmung von Funktionen durch ihre Integralwerte laengs gewisser Mannigfaltigkeiten, Berichte ueber die Verhandlungen der koeniglich saechsischen Gesellschaft der Wissenschaften zu Leipzig, Mathematisch-Physische Klasse, Band 69, 1917.

See Also

markPoisson, iradon, iradonIT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
P <- phantom()
R1 <- radon(P)
R2 <- radon(P, DeltaRho=0.5)
R3 <- radon(P, RhoSamples=501)
R4 <- radon(P, RhoSamples=251, RhoMin=-125, DeltaRho=1)
R5 <- radon(P, RhoSamples=451, RhoMin=-225, DeltaRho=1)
viewData(list(P, R1$rData, R2$rData, R3$rData, R4$rData, R5$rData), 
         list("Phantom P with 256x256 voxels", "Default sinogram of P", 
              "DeltaRho=0.5", "RhoSamples=501", 
              "RhoSamples=251, RhoMin=-125, DeltaRho=1",
              "RhoSamples=451, RhoMin=-225, DeltaRho=1"))
rm(P,R1,R2,R3,R4,R5)

Example output

Loading required package: adimpro
Loading required package: awsMethods

Use the function setCores() to change the number of CPU cores.

sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Reading RAW images requires to install dcraw, see 

    http://cybercom.net/~dcoffin/dcraw/ for LINUX and http://www.insflug.org/raw/ 
    for MAC OS and Windows 


Attaching package: 'PET'

The following object is masked from 'package:base':

    norm

Warning message:
In fun(libname, pkgname) : could not determine path to Imagemagick 

    please set the correct path manually using 

    'Sys.setenv(ImageMagick='path2imagemagick')'
Creation of the source-data --> complete. 

PET documentation built on May 2, 2019, 2:43 a.m.