View source: R/display-functions.R
display.slice | R Documentation |
Display an arbitrary 2D slice (axial, coronal, sagittal) of the values stored in a values
object.
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)
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) |
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.
used slice (index and coordinates) data.frame. It is used to make further combination with other plots and procedures (e.g. display.slice.all
)
Other display slices: display.slice.all
,
display.slice.ct
,
dumpslices.3d.2.png
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.