display.plane {espadon}R Documentation

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

Description

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.

Usage

display.plane(
  bottom = NULL,
  top = NULL,
  struct = NULL,
  roi.name = NULL,
  roi.sname = NULL,
  roi.idx = NULL,
  struct.dxyz = c(0.5, 0.5, struct$thickness),
  display.ref = NULL,
  T.MAT = 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 = pal.rainbow(255),
  bottom.breaks = NULL,
  top.breaks = NULL,
  sat.transp = FALSE,
  struct.lwd = 2,
  main = NULL,
  legend.plot = TRUE,
  legend.shift = 0,
  legend.roi.pseudo = TRUE,
  ...
)

Arguments

bottom

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

top

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

struct

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

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.

struct.dxyz

3D vector. Used in case of bottom and top are set to NULL. It represents the voxel size in the display.ref frame of reference, used to calculate contours in frontal or sagittal view.

display.ref

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

"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.

interpolate

Boolean, indicating whether to apply linear interpolation, when calculating the bottom and top cuts,and then when displaying them. If interpolate = FALSE, the values of the nearest voxels are used. When TRUE (by delfault), trilinear interpolation is used.

view.type

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.

view.coord

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

bg

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

abs.rng

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

ord.rng

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.

sat.transp

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

struct.lwd

Line thickness of the RoI contours.

main

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.

legend.plot

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

legend.shift

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

legend.roi.pseudo

Boolean. If TRUE, the name used for a RoI in the legend comes from the struct$roi.info$roi.pseudo column, otherwise the struct$roi.info$name column.

...

others parameters of plot function

Details

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.

Value

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:

Note

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

display.kplane, plot.volume, plot.struct, plot.mesh.

Examples

# 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.7.2 Index]