skbold.postproc.cluster_size_threshold module

cluster_size_threshold(data, thresh=None, min_size=20, save=False)[source]

Removes clusters smaller than a prespecified number in a stat-file.

Parameters:
  • data (numpy-array or str) – 3D Numpy-array with statistic-value or a string to a path pointing to a nifti-file with statistic values.
  • thresh (int, float) – Initial threshold to binarize the image and extract clusters.
  • min_size (int) – Minimum size (i.e. amount of voxels) of cluster. Any cluster with fewer voxels than this amount is set to zero (‘removed’).
  • save (bool) – If data is a file-path, this parameter determines whether the cluster- corrected file is saved to disk again.