View source: R/motion_correction.R
ants_motion_correction | R Documentation |
Print ants$motion_correction
to see the original document
ants_motion_correction(
x,
fixed = NULL,
type_of_transform = "BOLDRigid",
mask = NULL,
fdOffset = 50,
outprefix = "",
verbose = FALSE,
...
)
x |
input image, usually 'fMRI' series |
fixed |
fixed image to register all timepoints to |
type_of_transform |
see |
mask |
mask for image |
fdOffset |
offset value to use in frame-wise displacement calculation |
outprefix |
save path |
verbose |
whether to verbose the messages |
... |
passed to registration methods |
Motion-corrected image
if(interactive() && ants_available()) {
fi <- as_ANTsImage(ants$get_ants_data('ch2'))
mytx <- ants_motion_correction( fi )
par(mfrow = c(1, 2), mar = c(1,1,1,1))
image(fi[,,91], asp = 1, axes = FALSE)
image(mytx$motion_corrected[,,91], asp = 1, axes = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.