spm_bwlabel.RdGet Cluster of certain size from spm_bwlabel
spm_bwlabel(
infile,
outfile = NULL,
retimg = TRUE,
k = NULL,
topN = NULL,
margin = NULL,
binary = TRUE,
spmdir = spm_dir(verbose = verbose, install_dir = install_dir),
reorient = FALSE,
verbose = TRUE,
install_dir = NULL
)input filename
output filename
Return the image instead of matlab output
Minimum cluster size needed
Top number of clusters kept (used if k is NULL)
Margin to loop over if wanted in 2D
(logical) Should the result be binary or numbered with cluster.
SPM directory (for MATLAB)
If retimg, then this argument is passed to
readNIfTI
Print Diagnostics
directory to download SPM12
Output from run_matlab_script or nifti object,
depending on retimg
Result from run_matlab_script
Taken from http://en.wikibooks.org/wiki/SPM/How-to#How_to_remove_clusters_under_a_certain_size_in_a_binary_mask.3F