Learn R Programming

espadon (version 1.11.3)

display.3D.mesh: 3D display of a mesh

Description

The display.3D.mesh function performs a 3D display of a mesh.

Usage

display.3D.mesh(mesh, display.ref = mesh$ref.pseudo, T.MAT = NULL, ...)

Value

Returns a display of mesh in the current RGL window if it exists, in a new window otherwise.

Arguments

mesh

"mesh" class object, created by the mesh.from.bin function. See espadon.class for class definitions.

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, mesh must be displayed in display.ref = mesh$ref.pseudo.

...

Additional arguments passed to shade3d as color, specular, alpha...

See Also

mesh.from.bin.

Examples

Run this code
# loading of toy-patient objects (decrease dxyz for better result)
step <- 4
patient <- toy.load.patient (modality = c("ct", "rtstruct"), roi.name = "",
                             dxyz = rep (step, 3))
CT <- patient$ct[[1]]
S <- patient$rtstruct[[1]]

# creation of the patient mesh
bin <- bin.from.roi (CT, struct = S, roi.name = "patient", verbose = FALSE)
mesh.patient <- mesh.from.bin (bin, alias = "patient", verbose = FALSE)

# display of the patient mesh, with transparency
rgl::open3d()
display.3D.mesh (mesh.patient, color = "burlywood2", specular = "#404040")

Run the code above in your browser using DataLab