bin.closing {espadon}R Documentation

Binary volume closing

Description

The bin.closing function performs a morphological operation of closing, using a sphere, on a "volume" class object of "binary" modality. Closing is useful for :

Usage

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

Arguments

vol

"volume" class object, of "binary" modality

radius

Positive number, in millimeters. 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, "closing 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 $vol3D.data has been transformed by the closing operation.

Note

Closing can be time consuming, try to reduce the binary volume to the strict minimum, before any operations.

See Also

bin.dilation, bin.erosion, bin.opening, 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.closing <- bin.closing (b, radius = step)
display.plane (bottom = MR, top = b, main = "Before closing", 
               view.coord = -20, interpolate = FALSE)
display.plane (bottom = MR, top = b.closing, main = "After closing", 
               view.coord = -20, interpolate = FALSE)

[Package espadon version 1.7.0 Index]