Learn R Programming

ANTsR (version 1.0)

antsMotionCalculation: Correct 4D time-series data for motion.

Description

Correct 4D time-series data for motion.

Usage

antsMotionCalculation(img, mask=NA, fixed=NA, moreaccurate=1, framewise=1)

Arguments

img

antsImage, usually 4D.

mask

mask for image (3D). If not provided, estimated from data.

fixed

Fixed image to register all timepoints to. If not provided, mean image is used.

moreaccurate

Level of accuracy desired for motion correction. Higher is more accurate.

framewise

Calculate framewise displacement?

Value

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.

  • tsDisplacement Time-series displacement image.

  • dvars DVARS, derivative of frame-wise intensity changes.

Examples

Run this code
# NOT RUN {
set.seed(120)
simimg<-makeImage(rep(5,4), rnorm(5^4))
# for real data, use simimg <- antsImageRead(getANTsRData('pcasl'), 4)
antsMotionCalculation(simimg,moreaccurate=0)
# }

Run the code above in your browser using DataLab