antsrMotionCalculation.Rd
Correct time-series data for motion.
antsrMotionCalculation(
img,
fixed,
mask,
typeofTransform = c("Rigid", "QuickRigid", "BOLDRigid", "Affine", "AffineFast",
"BOLDAffine", "SyN", "SyNOnly"),
getMotionDescriptors = TRUE,
verbose = FALSE,
num_threads = 1,
seed = NULL,
...
)
antsImage, usually ND where D=4.
Fixed image to register all timepoints to. If not provided, mean image is used.
mask for image (ND-1). If not provided, estimated from data.
One of "Affine"
, "Rigid"
,
'"BOLDAffine"
, "BOLDRigid"
, "QuickRigid"
.
computes dvars and framewise displacement. May take additional memory.
enables verbose output.
will execute
Sys.setenv(ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS = num_threads)
before
running to attempt a more reproducible result. See
https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues
for discussion. If NULL
, will not set anything.
will execute
Sys.setenv(ANTS_RANDOM_SEED = seed)
before
running to attempt a more reproducible result. See
https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues
for discussion. If NULL
, will not set anything.
extra parameters passed to antsRegistration
List containing:
moco_img Motion corrected time-series image.
moco_params Data frame of translation parameters.
moco_avg_img Average motion-corrected image.
moco_mask Mask used to calculate framewise displacement.
fd Time-series mean and max displacements.
dvars DVARS, derivative of frame-wise intensity changes.
For reproducible results, you should run
Sys.setenv(ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS = 1)
,
which is what the num_threads = 1
flag will do.
See https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues
and https://github.com/ANTsX/ANTsR/issues/210#issuecomment-377511054
for discussion