bin.from.vol {espadon}R Documentation

Creation of a binary volume according to the voxel values of a volume

Description

The bin.from.vol function creates a "volume" class object, of "binary" modality, in which the voxels fulfilling a condition on their value are selected.

Usage

bin.from.vol(
  vol,
  min = -Inf,
  max = Inf,
  in.selection = TRUE,
  alias = "",
  description = NULL
)

Arguments

vol

"volume" class object.

min

Minimum value of the selected voxel. Default to -Inf.

max

Maximum value of the selected voxel. Default to +Inf.

in.selection

Boolean, defaults to TRUE. If in.selection = FALSE, the selected pixels are those whose value is not between min and max.

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 (min, vol$object.alias, max, sep = "<=") or if in.selection = FALSE, paste ("!(", description, ")").

Value

Returns a "volume" class object of "binary" modality, with the same grid as vol, in which the selected voxels (i.e. set to TRUE) are those satisfying the following conditions :

Examples

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

bin.bone <- bin.from.vol (CT, min = 300, max = 3000, alias = "bone")
display.plane (CT, top = bin.bone, interpolate = FALSE)

[Package espadon version 1.6.0 Index]