bin.clustering | R Documentation |
The bin.clustering
function groups and labels TRUE voxels
that have a 6-connectivity (i.e. sharing a common side).
bin.clustering(vol, alias = "", description = NULL)
vol |
"volume" class object, of |
alias |
Character string, |
description |
Character string, describing the created object. If
|
Returns a "volume" class object (see espadon.class
for class definitions), of "cluster"
modality. This object contains the
$cluster.info
field, detailing the label and volumes in \mjeqncm^3ascii
of the different clusters. Note that the label "0" is used for the background.
# loading of toy-patient objects (decrease dxyz for better result)
step <- 4
patient <- toy.load.patient (modality = "ct",
dxyz = rep (step, 3))
CT <- patient$ct[[1]]
# generation of a binary volume
b <- bin.from.vol(CT, min = -80, max = 20)
# Display of the n = 3 largest volumes
n <- 3
cluster.b <- bin.clustering (b)
col <- c ("#00000000", rainbow (n))
breaks <- seq (-0.5, n + 0.5, length.out = n+2)
display.plane (CT, top = b, main = "Before clustering",
view.coord = 50, top.col = col, top.breaks = breaks,
interpolate = FALSE)
display.plane (CT, top = cluster.b, main = "After clustering",
view.coord = 50, top.col = col, top.breaks = breaks,
interpolate = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.