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 |
max |
Maximum value of the selected voxel. Default to |
in.selection |
Boolean, defaults to |
alias |
Character string, |
description |
Character string, describing the created object. If
|
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 :
If
in.selection = TRUE
, thenmin <= vol$vol3D.data <= max
.If
in.selection = FALSE
, thenvol$vol3D.data < min
ormax < vol$vol3D.data
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)