get.value.from.xyz {espadon} | R Documentation |
Voxel values on a selection of points
Description
The get.value.from.xyz
function calculates the voxel values at
the x, y, z coordinate points in the chosen frame of reference.
Usage
get.value.from.xyz(
xyz,
vol,
xyz.ref.pseudo = NULL,
T.MAT = NULL,
interpolate = TRUE,
verbose = FALSE
)
Arguments
xyz |
Vector of length 3, corresponding to the x, y, z
coordinates (in mm) of a point in |
vol |
"volume" class object. |
xyz.ref.pseudo |
|
T.MAT |
"t.mat" class object, created by load.patient.from.Rdcm,
load.patient.from.dicom or load.T.MAT. If
|
interpolate |
Boolean, default to |
verbose |
Boolean, default to |
Value
Returns a vector of the voxel values at the requested coordinates.
See Also
Examples
# loading of toy-patient objects (decrease dxyz and increase beam.nb for
# better result)
step <- 4
patient <- toy.load.patient (modality = "rtdose", roi.name = "",
dxyz = rep (step, 3), beam.nb = 3)
D <- patient$rtdose[[1]]
get.value.from.xyz (xyz = matrix (c (0, 0, 0, 10, 10, 10),
ncol = 3, byrow = TRUE), vol = D)
# isodose
Dmax <- max (D$vol3D.data, na.rm = TRUE)
idx <- which (D$vol3D.data >= (Dmax -1) & D$vol3D.data <= (Dmax - 0.3))
pt <- get.xyz.from.index (idx, D)
get.value.from.xyz (pt, vol = D, interpolate = FALSE, verbose = TRUE)