bin.dilation: Binary volume dilation

bin.dilationR Documentation

Binary volume dilation

Description

The bin.dilation function enlarges a "volume" class object, of "binary" modality, by means of convolution with a sphere. Dilation is useful for :

  • filling holes that are smaller than the radius,

  • enlarging capes,

  • filling narrow channels,

  • merging two shapes close to each other.

Usage

bin.dilation(vol, radius = 10, alias = "", description = NULL)

Arguments

vol

"volume" class object, of "binary" modality

radius

Positive number, or xyz-vector of 3 positive numbers.By default, radius = 10.

alias

Character string, $object.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, "dilataion r =", radius).

Value

Returns a "volume" class object of "binary" modality (see espadon.class for class definitions), with the same grid as vol, in which the selected volume has been enlarged by the radius.

See Also

bin.erosion, bin.opening, bin.closing, add.margin, nesting.cube.

Examples

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

# generation of a binary volume
b <- bin.from.vol(MR, min = 15,max = 30)

b.dilation <- bin.dilation (b, radius = step)
display.plane (bottom = MR, top = b, main = "Before dilation", 
               view.coord = -20, interpolate = FALSE)
display.plane (bottom = MR, top = b.dilation, main = "After dilation", 
               view.coord = -20,interpolate = FALSE)

espadon documentation built on April 11, 2025, 5:57 p.m.