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 |
design |
(character) |
addIm |
(character) Adds an additional image to the phantom. There are six default-designs for |
DebugLevel |
(character) This parameter controls the level of output. Defaults to |
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.
All elements x of P
have to be between -1 and 1.
Each row from 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)