Last chance! 50% off unlimited learning
Sale ends in
The function implements different direct reconstruction methods for a radon transformed two-dimensional image.
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)
(matrix) A matrix that contains the sinogram image (for the reconstruction functions).
(integer) Number of samples on the x-axis (rows) in the reconstructed image.
(integer) Number of samples on the y-axis (columns) in the reconstructed image.
(character) The reconstruction method. Default is mode="FB"
for Filtered Backprojection. Also implemented are "BF"
for Filtering After Backprojection, "CNF"
for Central Slice (FFT based with Nearest Neighbour approximation), "CBF"
for Central Slice (FFT based with Bilinear Interpolation), "CC"
for using a variation of the Central Slice (by the use of nonlinear sampling of the Radon domain with the use of the Chirp-z algorithm, the interpolation can be reduced to a simple one dimensional linear interpolation compared to normal CS), "CNC"
for Central Slice (Chirp-z based with Nearest Neighbour approximation), "CBC"
for Central Slice (Chirp-z based with Bilinear Interpolation) and "Test"
to run all available reconstruction routines on the same image and to compare with a L1-Norm and L2-Norm. In case of "Test"
the surrender value is NULL
.
(double) The minimum x-position of the reconstructed image. Defaults to Xmin=-sqrt(0.5)*(ncol(rData)/XSamples)*0.5*(XSamples-1)
.
(double) The minimum y-position of the reconstructed image. Defaults to Ymin=-sqrt(0.5)*(ncol(rData)/YSamples)*0.5*(YSamples-1)
.
(double) Sampling distance on the x-axis.
Defaults set to DeltaX = sqrt(0.5)*(ncol(rData)/XSamples)
.
(double) Sampling distance on the y-axis.
Defaults set to DeltaY = sqrt(0.5)*(ncol(rData)/YSamples)
.
(integer) Interpolation level. Used by Filtered Backprojection. Defaults InterPol=1
.
(character) Filter type is only used by Filtered Backprojection ("FB"
). Defaults to FilterTyp="Hamming1"
for generalized Hamming Filter with "Hamming2"
for generalized Hamming Filter with "Ramp"
to get very good results of data without noise.
(matrix) If mode="Test"
, measures of misfit can be made between rData
and oData
. oData
is the original image of the radon transformed data. Defaults to oData=NULL
.
(character) This parameter controls the level of output. Defaults to DebugLevel="Normal"
for a standard level output. Alternative implementations are "Detail"
if it is desirable to show almost all output on screen or "HardCore"
for no information at all.
(character) If iniFile!=NULL
, iniFile
has to be the name of an ini-file including a pathname to the file. In the case of a specified iniFile
all parameters are read from the file. Note that in this case contingently setting parameters (except for DebugLevel
) in R are ignored when calling iradon
. The parameters which are not specified in iniFile
are set to defaults. Defaults to iniFile=NULL
.
A matrix, that contains the reconstructed image (matrix) of rData
.
A list of following values:
The dimension of the irData
.
The minimum x- and y-position in irData
.
Sampling distance on the x- and y-axis in irData
.
Arguments of the call to iradon
.
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
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.
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.
# NOT RUN {
#
# 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)
# }
# 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)
# }
# NOT RUN {
#
# mode="Test"
#
P <- phantom()
R <- radon(P)
iradon(R$rData, XSamples=257, YSamples=257, mode="Test", oData=P)
rm(P,R)
# }
Run the code above in your browser using DataLab