Description Usage Arguments Details Value Author(s) References See Also Examples
The function implements different direct reconstruction methods for a radon transformed two-dimensional image.
1 2 3 4 5 6 7 | iradon(rData, XSamples, YSamples, mode = "FB",
Xmin = -sqrt(0.5)*(ncol(rData)/XSamples)*0.5*(XSamples-1),
Ymin = -sqrt(0.5)*(ncol(rData)/YSamples)*0.5*(YSamples-1),
DeltaX = sqrt(0.5)*(ncol(rData)/XSamples),
DeltaY = sqrt(0.5)*(ncol(rData)/YSamples),
InterPol=1, FilterTyp="Hamming1", oData=NULL,
DebugLevel="Normal", iniFile=NULL)
|
rData |
(matrix) A matrix that contains the sinogram image (for the reconstruction functions). |
XSamples |
(integer) Number of samples on the x-axis (rows) in the reconstructed image. |
YSamples |
(integer) Number of samples on the y-axis (columns) in the reconstructed image. |
mode |
(character) The reconstruction method. Default is |
Xmin |
(double) The minimum x-position of the reconstructed image. Defaults to |
Ymin |
(double) The minimum y-position of the reconstructed image. Defaults to |
DeltaX |
(double) Sampling distance on the x-axis. |
DeltaY |
(double) Sampling distance on the y-axis. |
InterPol |
(integer) Interpolation level. Used by Filtered Backprojection. Defaults |
FilterTyp |
(character) Filter type is only used by Filtered Backprojection ( |
oData |
(matrix) If |
DebugLevel |
(character) This parameter controls the level of output. Defaults to |
iniFile |
(character) If |
The function implements different direct reconstruction methods for a radon transformed two-dimensional image. The different methods will be specified with parameter mode
. The reconstruction methods are developed by P. Toft (1996) and implemented in R by J. Schulz (2006). For detail theoretical information about the radon-transformation see references.
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.
Another variation to determine the parameter is the offer with iniFile
. iniFile
has to be a name of a file (e.g. iniFile="/home/work/sino.ini"
) with the following structure. Each line begins with the name of parameter, then an equal sign follows and the value of the parameter. The first line must contain the parameter mode
. Characters are not written in ""
, e.g. RadonKernel=NN
and not RadonKernel="NN"
. Furthermore note that in an ini-file rData
and oData
both have to be of type character, videlicet the name of the corresponding file. Supported file formats are ".txt", ".dat", ".fif", ".pet", ".tif", ".tiff", ".pgm", ".ppm", ".png", ".pnm", ".gif, ".jpg, ".jpeg. See ?readData
to get detailed information about supported formats.
If a file of the type ".fif", ".pet" or ".dat" is specified for oData
(see ?readData
or ?writeData
in R to get more information about these formats), the parameters XSamples
, YSamples
, XMin
, YMin
, DeltaX
and DeltaY
will be read from the file-header, but only in the case of unspecified corresponding parameters.
Note that in the case of an ini-file contingently setting parameters (except for DebugLevel
) in R are ignored with the calling of iradon
. Parameters that are not specified in the iniFile
are set to default.
irData |
A matrix, that contains the reconstructed image (matrix) of |
Header |
A list of following values:
|
call |
Arguments of the call to |
Joern Schulz jschulz78@web.de, Peter Toft.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #
# Compare the results of different direct reconstruction methods
#
## Not run:
P <- phantom(design="B")
rP <- markPoisson(P, nSample=3000000 )
irP1 <- iradon(rP$rData , nrow(P), ncol(P))
irP2 <- iradon(rP$rData , nrow(P), ncol(P),
mode="BF", DebugLevel="HardCore")
irP3 <- iradon(rP$rData , nrow(P), ncol(P),
mode="CBF", DebugLevel="HardCore")
viewData(list(rP$rData, irP1$irData, irP2$irData, irP3$irData),
list("Generated PET Data", "Reconstruction: mode='FB'",
"Reconstruction: mode='BF'", "Reconstruction: mode='CBF'"))
rm(irP1,irP2,irP3,P,rP)
## End(Not run)
#
# Compare the results of different values for RhoSamples in 'markPoisson'
#
## Not run:
P <- phantom()
rP1 <- markPoisson(P, nSample=1000000, RhoSamples=101, image=FALSE)
rP2 <- markPoisson(P, nSample=1000000, RhoSamples=256, image=FALSE)
rP3 <- markPoisson(P, nSample=1000000, RhoSamples=501, image=FALSE)
rP4 <- markPoisson(P, nSample=1000000, RhoSamples=801, image=FALSE)
irP1 <- iradon(rP1$rData, 257, 257)
irP2 <- iradon(rP2$rData, 257, 257, DebugLevel="HardCore")
irP3 <- iradon(rP3$rData, 257, 257, DebugLevel="HardCore")
irP4 <- iradon(rP4$rData, 257, 257, DebugLevel="HardCore")
viewData(list(irP1$irData, irP2$irData, irP3$irData, irP4$irData,),
list("RhoSamples=101", "RhoSamples=256", "RhoSamples=501",
"RhoSamples=801"))
rm(P,rP1,rP2,rP3,rP4,irP1,irP2,irP3,irP4)
## End(Not run)
#
# mode="Test"
#
P <- phantom()
R <- radon(P)
iradon(R$rData, XSamples=257, YSamples=257, mode="Test", oData=P)
rm(P,R)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.