display.slice: Display a 2D slice

View source: R/display-functions.R

display.sliceR Documentation

Display a 2D slice

Description

Display an arbitrary 2D slice (axial, coronal, sagittal) of the values stored in a values object.

Usage

display.slice(values = NULL, variable = NULL, Nx = NA, Ny = NA,
  Nz = NA, x = NA, y = NA, z = NA, plan = NULL, bw = FALSE,
  cont = FALSE, isoc = FALSE, xlim = NULL, ylim = NULL,
  zlim = NULL, vlim = NULL, colors = NULL, invert.y.axis = FALSE,
  file.name = NULL, width = 7, height = 7, levels = NULL)

Arguments

values

the values object (optional if plan is defined)

variable

the specific variable to be displayed (not needed if values contains only one variable, or if the variable is the first of the list)

Nx, Ny, Nz

slice index to be displayed. Only one of them should be defined, corresponding to an axial, coronal or sagittal slice (optional)

x, y, z

slice coordinate to be displayed. Only one of them should be defined, corresponding to an axial, coronal or sagittal slice (optional)

plan

the plan object (optional if values is defined)

bw

display using gray color levels. It colud be used to display CT values (optional, boolean)

cont

display isolevel contours of the values (optional, boolean)

isoc

display the isocenter on the slice (optional, boolean)

xlim, ylim, zlim

two element vectors containing the coordinate ranges to be displayed (optional)

vlim

two element vector containing the value range to be displayed. Values outside the range are displayed as 'blank', i.e. no color tile (optional)

colors

vector of color values (colormap)

file.name

name of the file on which to save the figure. By default no file is written (optional)

width, height

sizes of the figure to be saved (inches) (optional)

Details

If slice index and slice coordinate are not specified, but the plan is specified, the displayed slice is axial and at the isocenter of the plan. If slice index, slice coordinate and plan are not specified, the displayed slice is axial and at the middle of the z range.

If the plan is specified, it is possible to not specify the values object. In this case the one associated to the plan is used.

Value

used slice (index and coordinates) data.frame. It is used to make further combination with other plots and procedures (e.g. display.slice.all)

See Also

Other display slices: display.slice.all, display.slice.ct, dumpslices.3d.2.png


planit-group/Rplanit documentation built on Dec. 5, 2022, 11:10 p.m.