snic | R Documentation |
The SNIC function performs a spatially constrained clustering on a NeuroVec
instance
using the Simple Non-Iterative Clustering (SNIC) algorithm.
snic(vec, mask, compactness = 5, K = 500)
vec |
A |
mask |
A |
compactness |
A numeric value controlling the compactness of the clusters, with larger values resulting in more compact clusters. Default is 5. |
K |
The number of clusters to find. Default is 500. |
A list
of class snic_cluster_result
with the following elements:
An instance of type ClusteredNeuroVol.
A NeuroVol
instance representing the spatial gradient of the reference volume.
A vector of cluster indices equal to the number of voxels in the mask.
A matrix of cluster centers with each column representing the feature vector for a cluster.
A matrix of spatial coordinates with each row corresponding to a cluster.
supervoxels
mask <- NeuroVol(array(1, c(20,20,20)), NeuroSpace(c(20,20,20)))
vec <- replicate(10, NeuroVol(array(runif(202020), c(20,20,20)),
NeuroSpace(c(20,20,20))), simplify=FALSE)
vec <- do.call(concat, vec)
snic_res <- snic(vec, mask, compactness=5, K=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.