{espadon}R Documentation

Conversion of the indices of a point, into xyz coordinate vector in the patient's frame of reference


The function converts the indices of a voxel of vol$ (for example, obtained with the function which) into a vector or matrix of x, y, z coordinates in the patient's frame of reference.

Usage, vol)



Index, or matrix of voxel indices in the array vol$ The first index of the array is 1.


"volume" class object.


Returns a column-matrix of coordinates in the patient's reference frame, corresponding to the indices idx.


# loading of toy-patient objects (decrease dxyz and increase beam.nb for better
# result)
step <- 4
patient <- toy.load.patient (modality = "rtdose", = "", 
                             dxyz = rep (step, 3), beam.nb = 3)
D <- patient$rtdose[[1]]

# voxels location where the dose is greater than 99.9% Dmax
Dmax <- max (D$, na.rm = TRUE) # D$max.pixel (which (D$ >= 0.99 * Dmax), D)
# or (which (D$ >= 0.99 * Dmax, arr.ind = TRUE), D)

[Package espadon version 1.2.0 Index]