phantom {PET} | R Documentation |
This function creates two dimensional phantom data. There are different options, e.g. to generate a big ellipse that represents the head, and several smaller ellipses, that represent pathological areas to be located in the space of the bigger ellipse.
phantom(n = 257, design = "A", addIm = "none", DebugLevel = "Normal")
n |
(integer) Is the number of columns and rows in the generated phantom. It is assumed that the number of columns is equal to the number of rows. Defaults to n=257 . |
design |
(character) design characterizes the phantom data. It is possible to define different ellipses, with different intensities. There are four default-designs, these are design = "A" , "B" , "C" and "D" . To define an own design of the phantom see below to details. Defaults to design = "A" . |
addIm |
(character) Adds an additional image to the phantom. There are six default-designs for addIm . These are addIm="blurred1" , "blurred2" , "keen1" , "keen2" , "simple1" and "simple2" . The defaults of addIm will be generated with the function partEllipse . If addIm="none" , no image will be added to the phantom. A further possibility is a matrix A (addIm=A ) with the same size as the phantom (i.e. dim(A)==c(n,n) ). Defaults to addIm = "none" . |
DebugLevel |
(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. |
design
:
To define an own design of the phantom (e.g. design=P
) you have to note the following conditions:
P
is a (n,5) or (n,6) matrix, whereas n > 0.
P
have to be between -1 and 1.
P
define a ellipse on [-1,1]^2, where
[,1] | A | Is the additive intensity of the corresponding ellipse. |
[,2] | x_0 | Is the x-coordinate of the center of the ellipse. |
[,3] | y_0 | Is the y-coordinate of the center of the ellipse. |
[,4] | a | Is the half length of the horizontal axis. |
[,5] | b | Is the half length of the vertical axis. |
[,6] | α | Is the angle in degree between the x-axis of the ellipse |
and the x-axis of the grid. This parameter is optional, | ||
but the number of columns have to be the same in all rows. |
Returns a phantom image.
Joern Schulz jschulz78@web.de.
P1 <- phantom() P2 <- phantom(addIm="blurred1") PhPa1 <- c(0.5, 0, 0, 0.4, 0.6) PhPa2 <- matrix( c(0.6, -0.35, 0, 0.4, 0.6, 0.3, 0.5, 0, 0.2, 0.35), nrow=2, byrow=TRUE ) P3 <- phantom(design=PhPa1) P4 <- phantom(design=PhPa2) viewData(list(P1, P2, P3, P4), list("Default Phantom", "addIm='blurred1'", "First new design", "Second new design")) rm(P1,P2,P3,P4,PhPa1,PhPa2)