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",
  abs.flip = FALSE,
  ord.flip = 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 k is located at mid-plane of the volume.

pt00

Origin point of the displayed plane. By default pt00 = c (0, 0), corresponding to the bottom left of the displayed non-flipped image.

dxy

width and height of a pixel in the plane. If dxy = c (1, 1) (default) abcissa and ordinate correspond to pixel number in the plane.

col

Vector, representing the color palette of the image.

breaks

One of :

  • NULL : the minimum and the maximum value of the vol define the range.

  • Vector giving the breakpoints of each color. Outside values are transparent, leaving the background visible, depending on sat.transp.

sat.transp

Boolean. If TRUE, outside values are transparent, else set to breaks limits colors.

add

Boolean indicating whether to display the background image.

main

Title of the background image. If main = NULL, the title just indicates the value of k.

abs.lab

Label of the image abcissa. By default abs.lab = 'i'.

ord.lab

Label of the image ordinate. By default ord.lab = 'j'.

abs.flip

Boolean defaults to FALSE flipping the horizontal axis of the background image.

ord.flip

Boolean defaults to FALSE flipping the vertical axis of the background image.

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.

Value

Returns a display of the \(k^{th}\) image plane of vol.

See Also

display.plane.

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),
                breaks = seq(-1000, 1000, length.out = 1001),
                bg = "darkblue", ord.flip = TRUE, interpolate = FALSE)

[Package espadon version 1.2.0 Index]