Skip to contents

A three-dimensional brain image divided into N disjoint partitions or clusters.

Construct a ClusteredNeuroVol instance

Usage

ClusteredNeuroVol(mask, clusters, label_map = NULL, label = "")

Arguments

mask

an instance of class LogicalNeuroVol

clusters

a vector of clusters ids with length equal to number of nonzero voxels in mask mask

label_map

an optional list that maps from cluster id to a cluster label, e.g. (1 -> "FFA", 2 -> "PPA")

label

an optional character string used to label of the volume

Value

ClusteredNeuroVol instance

Details

The use case of ClusteredNeuroVol is to store volumetric data that has been clustered into discrete sets of voxels, each of which has an associated id. For example, this class can be used to represent parcellated neuroimaging volumes.

Slots

mask

A LogicalNeuroVol object representing the logical mask indicating the spatial domain of the set of clusters.

clusters

An integer vector representing the cluster number for each voxel in the mask.

label_map

A named list where each element represents a cluster and its name.

cluster_map

An environment object that maps from cluster id to the set of 1D spatial indices belonging to that cluster.

Methods

The ClusteredNeuroVol class inherits methods from the SparseNeuroVol class.

Usage

The ClusteredNeuroVol class is useful for representing a brain image with clustered regions, where each region is a disjoint partition.

Examples


bspace <- NeuroSpace(c(16,16,16), spacing=c(1,1,1))
grid <- index_to_grid(bspace, 1:(16*16*16))
kres <- kmeans(grid, centers=10)
mask <- NeuroVol(rep(1, 16^3),bspace)
clusvol <- ClusteredNeuroVol(mask, kres$cluster)