| histo.from.roi {espadon} | R Documentation |
Histogram according to a RoI
Description
The histo.from.roi function calculates the histogram of
the volume voxels belonging to a RoI.
Usage
histo.from.roi(
vol,
struct,
roi.name = NULL,
roi.sname = NULL,
roi.idx = NULL,
T.MAT = NULL,
breaks = NULL,
MC = NULL,
sd = c(1, 1, 1),
offset = c(0, 0, 0),
over.sampling.factor = 1,
alias = "",
description = NULL
)
Arguments
vol |
"volume" class object |
struct |
"struct" class object. |
roi.name |
Exact name of a RoI in |
roi.sname |
Name or part of name of a RoI in |
roi.idx |
Value of the index of a RoI that belong to the |
T.MAT |
"t.mat" class object, created by load.patient.from.Rdcm,
load.patient.from.dicom or load.T.MAT. If
|
breaks |
Vector giving the breakpoints between histogram cells. If
|
MC |
If different from |
sd |
Vector representing the standard deviation of distances in the 3 directions x, y and z. |
offset |
Vector representing the translation of the RoI in the 3 directions x, y and z. |
over.sampling.factor |
Strictly positive integer, or a vector of 3 strictly
positive integers, default to 1. Defined to oversample grids of |
alias |
Character string, |
description |
Character string, describing the the created object. If
the |
Details
roi.name, roi.sname, and roi.idx must select
only one RoI.
Value
Returns "histo" class object. This is a list including:
-
$alias: alias of the histo object. -
$description: description of the histo object. -
$breaks: vector breakpoints -
$mids: vector of cell centers. -
$mids.unit: Character string, representing the unit of the abcissa of the histogram. For instance, "Gy", whenvolis a rtdose. -
counts: count of voxels whose value is included in the limits defined by$breaks. -
dV_dx: differential histogram, expressed in cm3 by voxel units, at each$mids. -
MC.counts: array ofMCrows. Each rowirepresents the histogram of the voxels contained in the RoI, whose points have been shifted by$MC.dxyz[i,]. -
MC.dV_dx: array ofMCrows. Each rowirepresents the differential histogram of the voxels contained in the RoI, the points of which have been shifted by$MC.dxyz[i,]. -
MC.dxyz: array ofMCrows, representing the offset applied to the RoI.
Note
Using Monte-Carlo can be time consuming for large RoI.
If you only want the result just for a translation, use the arguments
MC = 1, sd = 0 and offset = desired translation vector.
See Also
histo.vol, histo.from.bin, display.histo, display.dV_dx
Examples
# loading of toy-patient objects (decrease dxyz and increase beam.nb for better
# result)
step <- 5
patient <- toy.load.patient (modality = c("rtdose", "rtstruct"),
roi.name = "gizzard", dxyz = rep (step, 3),
beam.nb = 3)
# Calculation of the histogram
H <- histo.from.roi (patient$rtdose[[1]], patient$rtstruct[[1]],
roi.name = "gizzard",
breaks = seq (0, 60, by = 1))
str (H)