R/fslbet_robust.R
fslbet_robust.Rd
Skull Stripping (using FSL's BET) a file using fslr
functions and robustified by registration and neck removal
fslbet_robust( img, outfile = NULL, retimg = TRUE, correct = TRUE, correction = "N4", recog = TRUE, reorient = FALSE, bet.opts = "", nvoxels = 0, swapdim = TRUE, remove.neck = TRUE, remover = c("remove_neck", "double_remove_neck"), robust.mask = FALSE, rbm.voxels = 7, template.file = file.path(fsldir(), "data/standard", "MNI152_T1_1mm_brain.nii.gz"), template.mask = file.path(fsldir(), "data/standard", "MNI152_T1_1mm_brain_mask.nii.gz"), verbose = TRUE, ... )
img | (character) File to be skull stripped or object of class nifti |
---|---|
outfile | (character) output filename |
retimg | (logical) return image of class nifti |
correct | Perform bias field correction |
correction | (character) N3 or N4 correction? |
recog | Rerun bet with a new center of gravity (COG) estimate |
reorient | (logical) If retimg, should file be reoriented when read in?
Passed to |
bet.opts | Options for |
nvoxels | Number of voxels to dilate/erode. See |
swapdim | Use |
remove.neck | Run |
remover | if |
robust.mask | Run |
rbm.voxels | Number of voxels to inflate mask for |
template.file | Template to warp to original image space, passed to
|
template.mask | Mask of template to use as rough brain mask, passed
to |
verbose | (logical) Should diagnostic output be printed? |
... | additional arguments passed to |
Skull-stripped nifti
object
This function first thresholds an image, runs a rigid registration
(default in remove_neck
) to drop any slices below the transformed
skull stripped template to remove neck slices. The neck-removed image is
then skull stripped using defaults in fslbet
. A new
center of gravity is estiamted using cog
, then the image is
skull stripped again using the new cog. After the skull stripped mask is
created, the image is dilated and eroded using fslfill2
to
fill holes using a box kernel with the number of voxels nvoxels
in
all 3 directions.