# loading of toy-patient objects (decrease dxyz for better result)
step <- 6
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)
m.skin <- mesh.from.bin (bin)
m.proj <- mesh.spheric.proj (m.skin, verbose = FALSE)
if (interactive()) {
col <- hcl.colors (12, "Blue-Red 3")
rgl::open3d()
rgl::shade3d (m.proj$mesh, meshColors = "vertices",
color = col[round ((m.proj$mesh$Lat/2 + 0.5) * 11) + 1],
specular = "#404040")
rgl::open3d()
rgl::shade3d (m.proj$mesh, meshColors = "vertices",
color = col[round ((m.proj$mesh$Lon/2 + 0.5) * 11) + 1],
specular = "#404040")
}
Run the code above in your browser using DataLab