Description Usage Arguments Value Note Author(s) Examples
motion corrects 4D time series imaging data
1 2 3 4 5 6 7 8 9 | .motion_correction(
img,
fixed = NULL,
moreaccurate = 1,
txtype = "Affine",
verbose = FALSE,
num_threads = 1,
seed = NULL
)
|
img |
4D antsImage |
fixed |
target fixed image |
moreaccurate |
0, 1 or 2 with higher values being more accurte (use 2 for real applications, 0 for testing) |
txtype |
Transformation type |
verbose |
verbosity boolean |
num_threads |
will execute
|
seed |
will execute
|
list of outputs
This function may give different results on multiple runs.
Avants BB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | set.seed(1000)
testimg<-makeImage( c(10,10,10,5), rnorm( 5000 ) )
testimg<-iMath(testimg,"PadImage",5)
mocorr <-.motion_correction( testimg, num_threads = 1, seed = 10)
aimg_to_array = function(x) {
if (is.antsImage(x)) {
x = as.array(x)
}
x
}
amocorr = lapply(mocorr, aimg_to_array)
mocorr2 <-.motion_correction( testimg, num_threads = 1, seed = 10)
amocorr2 = lapply(mocorr2, aimg_to_array)
testthat::expect_equal(mocorr, mocorr2)
testthat::expect_equal(amocorr, amocorr2)
# This function may give different results on multiple runs
# without setting the seed
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.