display.plane {espadon}R Documentation

Display the transverse frontal or sagittal view in the patient reference system


The display.plane function displays an overlay of images and RoI closed planar contours on a plane defined by the equations x = constant (sagittal view), or y = constant (frontal view) or z = constant (transverse view) in a frame of reference chosen by the user.


  bottom = NULL,
  top = NULL,
  struct = NULL,
  roi.name = NULL,
  roi.sname = NULL,
  roi.idx = NULL,
  struct.dxyz = c(1, 1, 1),
  display.ref = NULL,
  interpolate = TRUE,
  view.type = c("trans", "front", "sagi"),
  view.coord = 0,
  bg = "#000000",
  abs.rng = NULL,
  ord.rng = NULL,
  bottom.col = grey.colors(255, start = 0, end = 1),
  top.col = rainbow(255, s = seq(1, 0, length.out = 255), start = 0, end = 4/6, alpha =
    seq(0.8, 0, length.out = 255), rev = TRUE),
  bottom.breaks = NULL,
  top.breaks = NULL,
  sat.transp = FALSE,
  struct.lwd = 2,
  main = NULL,
  legend.plot = TRUE,
  legend.shift = 0



"volume" class object, displayed using bottom.col palette. If bottom = NULL, no bottom image is displayed.


"volume" class object, displayed as an overlay, using top.col palette. If top = NULL, no overlay image is displayed.


"struct" class object. If NULL, no RoI is displayed. Only RoI of closed planar or point type are displayed.


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


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


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


Vector of 3 numbers. Used in case of bottom and top are set to NULL. It represents the virtual steps of a temporary volume created in the display.ref frame of reference, initialized at 1 mm in the 3 directions x, y and z.


Character string. Pseudonym of the frame of reference used for display. If NULL (default), the bottom image FoR, or top image FoR (when no bottom image), or struct FoR (when no volume displayed).


"t.mat" class object, created by load.patient.from.Rdcm or load.T.MAT. If T.MAT is NULL, bottom, top and struct must have the same frame of reference.


Boolean, indicating whether to apply trilinear interpolation to the bottom and top volumes. If interpolate = FALSE, the values of the nearest voxels are used. When TRUE (by delfault), trilinear interpolation is used.


Character string, defining the view to display. It must be set to

  • "trans" for a transverse view,

  • "front" for a frontal view or,

  • "sagi" for a sagittal view.


Numeric vector of the coordinates along the normal vector of the selected view.


Background color of the image. By default, this color is black.


Vector of 2 elements indicating the minimum and maximum abscissa to display on the background image.


Vector of 2 elements indicating the minimum and maximum ordinate to display on the background image.

bottom.col, top.col

Vectors, representing the palette color of bottom and top.

bottom.breaks, top.breaks

One of :

  • NULL : the minimum and the maximum value of bottom or top define the range.

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

When breaks are specified, the number of breaks must be one unit more then the number of colors.


Boolean. If TRUE, outside values are transparent, else set to bottom.breaks or top.breaks limits.


Line thickness of the RoI contours.


Character string. When main different from NULL, it replaces the title, and removes the subtitle and the maximum dose indication if top is of modality rtdose.


Boolean, that indicates whether the RoI legend should be displayed on the image. It is displayed by default.


Numeric. It shifts (in mm) the display of the RoI legend on x-axis.


If roi.name, roi.sname, and roi.idx are all set to NULL, all closed planar or point RoI are selected. If a RoI is not present in the requested plane, the RoI legend won't mention it.


Returns a display of the transverse, sagittal or frontal plane. This plane has the coordinate z = view.coord (transverse), y = view.coord (sagittal) pr x = view.coord (frontal). The display is an overlay of:


1- The main title is given by bottom, the subtitle by top.

2- When top is in the "rtdose" modality, the maximum dose is written on the image.

See Also



# loading of toy-patient objects (decrease dxyz and increase beam.nb for 
# better result)
step <- 4
patient <- toy.load.patient (modality = c("ct", "mr", "rtstruct", "rtdose"), 
                             roi.name  = "",
                             dxyz = rep (step, 3), beam.nb = 3)
CT <- patient$ct[[1]]
MR <- patient$mr[[1]]
D <- patient$rtdose[[1]]
S <- patient$rtstruct[[1]]

display.plane (bottom = CT, top = D, struct = S, view.coord = -30, 
               interpolate = FALSE, legend.shift = -80)
# Display of CT in reference frame "ref1" and  MR in "ref2"               
display.plane (bottom = CT, top = MR, interpolate = FALSE)

# Display of CT and MR in reference frame "ref2"
display.plane (bottom = CT, top = MR, interpolate = FALSE, display.ref ="ref2",
               T.MAT = patient$T.MAT)

[Package espadon version 1.2.0 Index]