display.kplane {espadon} | R Documentation |
Display of a plane of a volume
Description
The display.kplane
function displays the requested plane
of a "volume" class object. This function is low-level, used for example
in the function display.plane with more intuitive arguments.
Usage
display.kplane(
vol,
k = vol$k.idx[ceiling(length(vol$k.idx)/2)],
pt00 = c(0, 0),
dxy = c(1, 1),
col = grey.colors(255, start = 0, end = 1),
breaks = NULL,
sat.transp = FALSE,
add = FALSE,
main = NULL,
abs.lab = "i",
ord.lab = "j",
flip = FALSE,
flop = FALSE,
bg = "#000000",
abs.rng = NULL,
ord.rng = NULL,
interpolate = FALSE,
...
)
Arguments
vol |
"volume" class object to display. See espadon.class for class definitions. |
k |
Number of the plane to display. By default |
pt00 |
Origin point of the displayed plane. By default |
dxy |
width and height of a pixel in the plane. If |
col |
Vector, representing the color palette of the image. |
breaks |
One of :
|
sat.transp |
Boolean. If |
add |
Boolean indicating whether to display the background image. |
main |
Title of the background image. If |
abs.lab |
Label of the image abcissa. By default |
ord.lab |
Label of the image ordinate. By default |
flip |
Boolean defaults to |
flop |
Boolean defaults to |
bg |
Background color of the image. By default, this color is black. |
abs.rng |
Vector of 2 elements indicating the minimum and maximum background image abscissa to display. |
ord.rng |
Vector of 2 elements indicating the minimum and maximum background image ordinate to display. |
interpolate |
Boolean, indicating whether to apply linear interpolation to the image. |
... |
others argument of plot function like xaxt, yaxt... |
Value
Returns a display of the \(k^{th}\) image plane of vol
.
See Also
Examples
# loading of toy-patient objects (decrease dxyz and increase beam.nb for
# better result)
step <- 5
patient <- toy.load.patient (modality = c("ct","mr", "rtdose"),
dxyz = rep (step, 3), beam.nb = 3)
MR <- patient$mr[[1]]
CT <- patient$ct[[1]]
D <- patient$rtdose[[1]]
# display
display.kplane (CT)
display.kplane (MR, k = floor (length(MR$k.idx)*5/8),
col = grey.colors (256, start = 0, end = 1),
breaks = seq (0, 500, length.out = 257), bg = "darkblue")
display.kplane (D, k = floor (length(D$k.idx)*3/8),
col = rainbow (256, s = seq (1, 0, length.out = 256),
start = 0, end = 4/6,
alpha = seq (0.8, 0, length.out=256),
rev = TRUE),
bg = "darkblue", ord.flip = TRUE, sat.transp = FALSE,
interpolate = FALSE)
display.kplane (CT, k = floor (length(CT$k.idx)/3), col = pal.RVV (1000),
bg = "darkblue", ord.flip = TRUE, interpolate = FALSE)