get.volume.from.roi {espadon}R Documentation

Volume of a region of interest (RoI)

Description

The get.volume.from.roi function extracts the volume in\(cm^3\) of one or more RoI, from the $roi.info of the "struct" class object.

Usage

get.volume.from.roi(struct, roi.name = NULL, roi.sname = NULL, roi.idx = NULL)

Arguments

struct

"struct" class object.

roi.name

Vector of exact names of the RoI in the struct object. By default roi.name = NULL. See Details.

roi.sname

Vector of names or parts of names of the RoI in the struct object. By default roi.sname = NULL. See Details.

roi.idx

Vector of indices of the RoI that belong to the struct object. By default roi.idx = NULL. See Details.

Details

If roi.name, roi.sname, and roi.idx are all set to NULL, all RoI are selected.

Value

Returns a vector of the volumes in \(cm^3\) of the requested RoI.

See Also

get.volume.from.bin, select.names

Examples

# loading of toy-patient objects
step <- 4
patient <- toy.load.patient (modality = c ("rtstruct"), 
                             dxyz = rep (step, 3))
S <- patient$rtstruct[[1]] 

# Volume extraction
vol <- get.volume.from.roi (S, roi.sname = "bra", roi.idx = c (1, 3))
names (vol)
vol

[Package espadon version 1.7.0 Index]