Description Usage Arguments Value Note Examples
View source: R/fslbet_robust.R
Skull Stripping (using FSL's BET) a file using fslr
functions and robustified by registration and neck removal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
stubs = c("T1Strip.nii.gz",
"T2Strip.nii.gz")
img_files = system.file(stubs,
package="WhiteStripe")
if (all(file.exists(img_files)){
fslbet_robust(system.file('T1Strip.nii.gz', package="WhiteStripe"))
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.