bin.opening | R Documentation |
The bin.opening
function performs a morphological operation
of opening, using a sphere, on a "volume" class object of "binary" modality.
Opening is useful for :
removing volumes that are smaller than the radius
,
smoothing shapes.
bin.opening(vol, radius = 10, alias = "", description = NULL)
vol |
"volume" class object, of "binary" modality. |
radius |
Positive number, or xyz-vector of 3 positive numbers. By default, radius = 10. |
alias |
Character string, |
description |
Character string, describing the created object. If
|
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 opening
operation.
Opening can be time consuming, try to reduce the binary
volume to the strict minimum, before any operations.
bin.dilation, bin.erosion, bin.closing, add.margin, nesting.cube.
# 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.opening <- bin.opening (b, radius = step)
display.plane (bottom = MR, top = b, main = "Before opening",
view.coord = -20, interpolate = FALSE)
display.plane (bottom = MR, top = b.opening, main = "After opening",
view.coord = -20, interpolate = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.