histo.from.bin | R Documentation |
The histo.from.bin
function computes the voxels histogram
of the selection defined by the binary object sel.bin
of a "volume"
class object.
histo.from.bin(vol, sel.bin, breaks = NULL, alias = "", description = NULL)
vol |
"volume" class object |
sel.bin |
"volume" class object, of |
breaks |
Vector giving the breakpoints between histogram cells. If
|
alias |
Character string, |
description |
Character string, describing the the created object. If the
|
Returns a "histo" class object. See histo.vol.
histo.from.roi, histo.vol, display.histo, display.dV_dx
# 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") # ct histogram in patient volume H <- histo.from.bin (patient$ct[[1]], sel.bin = bin.patient, breaks = NULL, alias = "patient_hist") str(H) ## Not run: # 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") 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) ## End(Not run)