display.3D.stack {espadon}R Documentation

Display in 3D the selected planes of an espadon class volume

Description

The display.3D.stack function displays in 3D the requested planes of a "volume" class object.

Usage

display.3D.stack(
  vol,
  k.idx = unique(vol$k.idx[seq(1, vol$n.ijk[3], length.out = 10)]),
  display.ref = vol$ref.pseudo,
  T.MAT = NULL,
  col = grey.colors(10, start = 0, end = 1, alpha = c(rep(0, 1), rep(1, 9))),
  breaks = NULL,
  cube = TRUE,
  border = TRUE,
  ktext = TRUE,
  line.col = "#379DA2",
  line.lwd = 1,
  cex = 1
)

Arguments

vol

"volume" class object to display.

k.idx

vector of plane numbers to be displayed, to be chosen in vol$k.idx. By default k.idx is a vector of 10 uniformly distributed planes in the volume.

display.ref

Character string. Pseudonym of the frame of reference used for display.

T.MAT

"t.mat" class object, created by load.patient.from.Rdcm or load.T.MAT. If T.MAT is NULL, vol must be displayed in display.ref = vol$ref.pseudo.

col

Vector, representing the color palette of the image. Transparent colors are not represented.

breaks

One of :

  • NULL : The minimum and the maximum value of the vol define the range.

  • Vector giving the breakpoints of each color.

cube

Boolean. If TRUE (default), the "volume" edges are displayed.

border

Boolean. If TRUE (default), the borders of the planes defined in k.idx are displayed.

ktext

Boolean. If TRUE (default), the selected plane numbers are displayed.

line.col

Color of cube, planes and texts displayed.

line.lwd

Line width of the border and cube, by default at 1.

cex

Numeric character expansion factor of displayed plan numbers.

Value

Returns a display of the k.idx cutting planes of vol, in the current RGL window if it exists, in a new window otherwise. The colors of the palettes are managed by col and breaks.

Examples

# loading of toy-patient objects (decrease dxyz for better result)
step <- 4
patient <- toy.load.patient (modality = "ct", dxyz = rep (step, 3))

# display o 3 planes
library (rgl)
open3d()
display.3D.stack (patient$ct[[1]],
                  col = pal.RVV (200, alpha = c(rep(0,90), rep (1, 110))))

[Package espadon version 1.6.0 Index]