cluster_threshold {ARIbrain}R Documentation

cluster_threshold

Description

Get spatially-connected clusters starting from a 3D map of logical values

Usage

cluster_threshold(map, max_dist = sqrt(3))

Arguments

map

3D map of logical values. TRUE if the voxel it to be clustered (e.g. it is supra-threshold).

max_dist

maximum distance allowed to in the same cluster. By default: max_dist=sqrt(3) i.e. comprises all the voxels up to the corners souranding the target voxel. A value such as max_dist=sqrt(2) excludes the corners.

Value

a 3D map (same size of map) with integer values identifying the cluster and 0 elsewhere.

Examples

## Not run: 
Tmap = RNifti::readNifti(system.file("extdata", "zstat.nii.gz", package="ARIbrain"))
clstr=cluster_threshold(Tmap>3.2)
table(clstr)

## End(Not run)

[Package ARIbrain version 0.2 Index]