Learn R Programming

neuroim (version 0.0.6)

ClusteredBrainVolume-class: ClusteredBrainVolume

Description

Three-dimensional brain image that is divided into N disjoint partitions

Construct a ClusteredBrainVolume instance

Usage

ClusteredBrainVolume(mask, clusters, labelMap = NULL, source = NULL, label = "")

Arguments

mask
an instance of class LogicalBrainVolume
clusters
a vector of clusters ids with length equal to number of nonzero voxels in mask mask
labelMap
an optional list that maps from cluster id to a cluster label, e.g. (1 -> "FFA", 2 -> "PPA")
source
an optional instance of class BrainSource
label
an optional character string used to label of the volume

Value

ClusteredBrainVolume instance

Examples

Run this code

bspace <- BrainSpace(c(16,16,16), spacing=c(1,1,1))
grid <- indexToGrid(bspace, 1:(16*16*16))
kres <- kmeans(grid, centers=10)
mask <- BrainVolume(rep(1, 16^3),bspace)
clusvol <- ClusteredBrainVolume(mask, kres$cluster)

Run the code above in your browser using DataLab