bin.clustering {espadon}R Documentation

Binary volume clustering

Description

The bin.clustering function groups and labels TRUE voxels that have a 6-connectivity (i.e. sharing a common side).

Usage

bin.clustering(vol, alias = "", description = NULL)

Arguments

vol

"volume" class object, of "binary" modality

alias

Character string, $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,"clustering")

Value

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 \(cm^{3}\) of the different clusters. Note that the label "0" is used for the background.

Examples

# 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, n, 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)

[Package espadon version 1.2.0 Index]