View source: R/abpBrainExtraction.R
abpBrainExtraction | R Documentation |
Brain extraction based on mapping a template image and its mask to the input image. Should be preceded by abpN4.
abpBrainExtraction(
img,
tem,
temmask,
temregmask = NULL,
regtype = "SyN",
tdir = NA,
num_threads = 1,
pad = 0,
verbose = FALSE
)
img |
whole head image to which we map a brain mask |
tem |
Template image (the whole head) which has an associated label mask. |
temmask |
Template's antsImage brain mask. |
temregmask |
Template's registration mask including skull but not the face |
regtype |
registration type: 'SyN' (fast, default), 'SyNabp' (better, slower) |
tdir |
temporary directory (optional) |
num_threads |
will execute
|
pad |
argument passed to |
verbose |
print diagnostic messages |
outputs a brain image and brain mask.
Tustison N, Avants BB
n <- 64
fn <- getANTsRData("r16")
img <- antsImageRead(fn)
img <- resampleImage(img, c(n, n), 1, 0)
tf <- getANTsRData("r27")
tem <- antsImageRead(tf)
tem <- resampleImage(tem, c(n, n), 1, 0)
temmask <- antsImageClone(tem)
temmask[tem > 20] <- 1
temmask[tem <= 20] <- 0
## Not run:
bm <- abpBrainExtraction(img = img, tem = tem, temmask = temmask)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.