Learn R Programming

espadon (version 1.11.3)

display.legend: Display of the RoI legend

Description

The display.legend function displays in an image the list of requested RoI and their associated color.

Usage

display.legend(
  struct = NULL,
  roi.name = NULL,
  roi.sname = NULL,
  roi.idx = NULL,
  lwd = 1,
  cex = 1,
  displayed.roi.name = NULL,
  bg = "black",
  text.col = "white"
)

Value

Returns display of the RoI names and their associated color in the active graphics window.

Arguments

struct

"struct" class object.

roi.name

Vector of exact names of the RoI in the struct object. By default roi.name = NULL. See Details.

roi.sname

Vector of names or parts of names of the RoI in the struct object. By default roi.sname = NULL. See Details.

roi.idx

Vector of indices of the RoI that belong to the struct object. By default roi.idx = NULL. See Details.

lwd

Line thickness, defaults to 1

cex

Font size, default to 1.

displayed.roi.name

Vector. If different from NULL, it represents the replacement names of selected RoI if needed.

bg

color of the background.

text.col

color of the legend text.

Details

roi.name, roi.sname, and roi.idx indicates the RoI to display. If all three are set to NULL, all RoI are selected.

Examples

Run this code
# loading of toy-patient objects
patient <- toy.load.patient (modality = c("rtstruct"), dxyz = c (5, 5, 5))
S <- patient$rtstruct[[1]]

display.legend (struct = S, roi.idx = 2:10, lwd = 2)

Run the code above in your browser using DataLab