cluster: Computes contiguous clusters from a statistical image given a...

View source: R/pbj.R

clusterR Documentation

Computes contiguous clusters from a statistical image given a threshold

Description

Computes contiguous clusters from a statistical image given a threshold

Usage

cluster(
  stat,
  mask,
  cft,
  method = c("extent", "mass"),
  kernel = "box",
  rois = FALSE
)

Arguments

stat

A statistical Nifti image as an RNifti image object.

mask

A statistical Nifti image mask used in the analysis or a character path to one.

cft

A vector of cluster forming thresholds (on the scale of the test statistic image, which is usually chi-squared for pbj) for the test statistic image. Will compute cluster sizes or masses for each threshold.

method

character string 'extent' or 'mass' indicating whether the cluster extent or cluster mass statistic should be used.

kernel

The kernel type to compute connected components.

rois

If TRUE, return image with voxel values having the indices of the clusters returned if rois=FALSE.

Value

Returns list of tables of sizes of the connected components above cft.


simonvandekar/pbj documentation built on Nov. 3, 2023, 9:33 a.m.