bin.inversion {espadon}R Documentation

Inversion of a binary

Description

The bin.inversion function creates a "volume" class object, of "binary" modality, representing the inverse (logical NOT) of another binary object.

Usage

bin.inversion(vol, alias = "", description = NULL)

Arguments

vol

"volume" class object, of "binary" modality

alias

Character string, $alias of the created object.

description

Character string, describing the created object. If description = NULL (default value), it will be set to paste ("!", vol$object.alias, sep = "").

Value

Returns a "volume" class object of "binary" modality (see espadon.class for class definitions), with the same grid as vol, inverse of vol.

Examples

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

bin.patient <- bin.from.roi (CT, struct = S, roi.name = c ("patient"),
                             alias = "patient")
inverse.patient <- bin.inversion (bin.patient, alias = "inv (patient)")

display.plane(CT, top = inverse.patient, interpolate = FALSE)

[Package espadon version 1.7.0 Index]