# 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))
bin.patient <- bin.from.roi (patient$ct[[1]], struct = patient$rtstruct[[1]],
roi.name = "patient", verbose = FALSE)
# ct histogram in patient volume
H <- histo.from.bin (patient$ct[[1]], sel.bin = bin.patient, breaks = NULL,
alias = "patient_hist")
str(H)
if (FALSE) {
# Skin dose histogram
patient <- toy.load.patient (modality = c("rtdose", "rtstruct"), roi.name = "",
dxyz = c (2, 2, 2), beam.nb = 3)
D <- patient$rtdose[[1]]
S <- patient$rtstruct[[1]]
# Creation of the skin contour of 3 mm
bin.patient <- bin.from.roi (D, struct = S, roi.name = "patient",
alias = "patient", verbose = FALSE)
inverse.patient <- bin.inversion (bin.patient, alias = "inv (patient)")
expansion <- bin.dilation (inverse.patient, radius = 3,
alias = "inv (patient) + 3")
contour.3mm <- bin.intersection (bin.patient, expansion,
alias = "contour 3 mm")
# Dose histogram in this volume
H <- histo.from.bin (D, sel.bin = contour.3mm, breaks = NULL,
alias = "Skin dose")
str(H)
}
Run the code above in your browser using DataLab