# loading of toy-patient objects (decrease dxyz for better result)
step <- 5
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)
# density value on the skin contour, extracted from CT
density <- get.value.from.mesh (mesh.patient, CT ,depth = 0)
if (interactive()){
# Display of mesh, with RVV pal
density[density < -1000] <- -1000
density[density > 1000] <- 1000
col <- pal.RVV(255)[cut (density, seq (-1000, 1000, length.out = 256),
include.lowest=TRUE)]
rgl::open3d ()
display.3D.mesh (mesh.patient, col = col)
}
Run the code above in your browser using DataLab