powered by
The display.legend function displays in an image the list of requested RoI and their associated color.
display.legend
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" )
Returns display of the RoI names and their associated color in the active graphics window.
"struct" class object.
Vector of exact names of the RoI in the struct object. By default roi.name = NULL. See Details.
struct
roi.name = NULL
Vector of names or parts of names of the RoI in the struct object. By default roi.sname = NULL. See Details.
roi.sname = NULL
Vector of indices of the RoI that belong to the struct object. By default roi.idx = NULL. See Details.
roi.idx = NULL
Line thickness, defaults to 1
Font size, default to 1.
Vector. If different from NULL, it represents the replacement names of selected RoI if needed.
NULL
color of the background.
color of the legend text.
roi.name, roi.sname, and roi.idx indicates the RoI to display. If all three are set to NULL, all RoI are selected.
roi.name
roi.sname
roi.idx
# 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