Wrapper for AFNI 3dAutomask function

afni_3dAutomask(file, mfrac = 0.5, gradual_clipping = TRUE,
  n_peels = 1, n_neighbors = 17, outfile = NULL, retimg = TRUE,
  opts = "", ...)

Automask(...)

automask(...)

Arguments

file

nifti object or NIfTI filename. If more than one is given, they are given names of the letters up to z.

mfrac

The 'clip level fraction', which must be a number between 0.1 and 0.9, which is passed to afni_3dClipLevel

gradual_clipping

The program uses a 'gradual' clip level by default, To use a fixed clip level, set gradual_clipping = FALSE.

n_peels

Peel the mask n_peels times, then unpeel. Designed to clip off protuberances less than 2*n_peels voxels thick.

n_neighbors

Define the number of neighbors needed for a voxel NOT to be peeled. The 18 nearest neighbors in the 3D lattice are used, so n_neighbors should be between 9 and 18.

outfile

Output filename, should have a .nii.gz extension

retimg

Should an image be returned (TRUE) or a filename?

opts

Additional options passed to 3dAutomask

...

additional arguments to afni_3dAFNItoNIFTI

Value

Output filename of the brik