get.volume.from.bin: Volume selected by binary volume

View source: R/get_volume_from_bin.R

get.volume.from.binR Documentation

Volume selected by binary volume

Description

The get.volume.from.bin function calculates the volume in cm³ of the selection specified by a "volume" class object of "binary" modality.

Usage

get.volume.from.bin(bin)

Arguments

bin

"volume" class object, of "binary" modality.

Value

Returns the volume of the binary selection, in cm³.

See Also

get.volume.from.roi

Examples

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

# creation of  weight and binary objects
bin.brain.w <- bin.from.roi(vol = CT, struct = S, roi.sname = "bra", 
                            modality = "weight", verbose = FALSE)
bin.brain.b <- bin.from.roi(vol = CT, struct = S, roi.sname = "bra", 
                            verbose = FALSE)
# Volume calculation
get.volume.from.roi(struct = S, roi.sname = "bra")
get.volume.from.bin(bin.brain.w)
get.volume.from.bin(bin.brain.b)


espadon documentation built on May 8, 2026, 9:07 a.m.