Performs Volume Registration for Motion Correction on an NIfTI file or nifti using 3dvolreg

afni_3dvolreg(file, interpolation = c("Fourier", "heptic", "quintic",
  "cubic", "linear"), rp_file = NULL, full_motion_file = NULL,
  opts = "", retimg = TRUE, ...)

volreg(...)

Arguments

file

file or nifti object

interpolation

interpolation done after realignment.

rp_file

filename of motion parameter output, which should have columns: roll = rotation about the I-S axis (degrees)

pitch = rotation about the R-L axis, (degrees) CCW

yaw = rotation about the A-P axis (degrees)

dS = displacement in the Superior direction (mm)

dL = displacement in the Left direction (mm)

dP = displacement in the Posterior direction (mm)

full_motion_file

filename of full motion parameter output, including fields as in rp file, but also brik indices and root mean squares

opts

Additional options to pass to 3dvolreg

retimg

Should an image be returned?

...

additional arguments to readnii

Value

If retimg then object of class nifti. Otherwise, the outfile argument is returned (or a temporary filename)