Learn R Programming

spm12r (version 2.0)

spm_bwlabel: SPM BWLabel Clusters of Certain Size

Description

Get Cluster of certain size from spm_bwlabel

Usage

spm_bwlabel(infile, outfile = NULL, retimg = TRUE, k = NULL, topN = NULL, margin = NULL, binary = TRUE, spmdir = spm_dir(), reorient = FALSE, verbose = TRUE)

Arguments

infile
input filename
outfile
output filename
retimg
Return the image instead of matlab output
k
Minimum cluster size needed
topN
Top number of clusters kept (used if k is NULL)
margin
Margin to loop over if wanted in 2D
binary
(logical) Should the result be binary or numbered with cluster.
spmdir
SPM directory (for MATLAB)
reorient
If retimg, then this argument is passed to readNIfTI
verbose
Print Diagnostics

Value

Output from run_matlab_script or nifti object, depending on retimgResult from run_matlab_script