How to incorporate frame wise displacement (FD)

Hi,

A newbie here.

I'm motion-correcting the scans using 3dvolreg, and using the motion parameters it gives me to calculate frame wise displacement. I would like to use this to threshold and exclude volumes with too much head movement. Would there be an AFNI command that will let me mask out the volumes? Any advice is appreciated.

AFNI version info (afni -ver):
afni_24.0_Ubuntu

code text  # or delete if not needed

Howdy-

Well, FD is the sum of the absolute values of the 6 motion parameters (3 changes in position and 3 changes in rotation). In AFNI, we tend to use a different combination of the same 6 parameters, called "Enorm" (the Euclidean norm): the square root of the sum of squares of them. Mathematically, FD is an L-1 norm and Enorm is an L-2 norm. So, variations on a theme. But we tend to prefer Enorm because it is more sensitive to any one given motion parameter, and displacements are L-2 norms, in general math/physics.

This is discussed in this AFNI Academy playlist on alignment, and particularly this one one EPI-EPI alignment (AKA motion correction).

We also discuss this in this description/guide paper on using afni_proc.py and general FMRI processing considerations:

  • Reynolds RC, Glen DR, Chen G, Saad ZS, Cox RW, Taylor PA (2024). Processing, evaluating and understanding FMRI data with afni_proc.py. Imaging Neuroscience 2:1-52.

There are examples of incorporating what you are asking about (excluding, or "censoring", volumes that have motion above a given threshold amount) in that paper, as well as in many of our afni_proc.py help examples, such as this one.

Specifically, that kind of setting is made like with this option in afni_proc.py:

-regress_censor_motion 0.2

... such that any volumes where Enorm-estimated motion was >=0.2 mm would be censored.

(And we usually add another criterion for censoring, based on how many time series outliers appear at a given volume, via -regress_censor_outliers 0.05---here, if 5% of a brain mask have outliers in it, then that volume would be censored.)

How does that sound?

--pt

Dear Paul,

Thank you so much for the thorough explanation. This new command is definitely something I'll explore in my next pipeline. Thank you for suggesting.

So back to my question, would these formula look correct to you?

FD=|roll|+|pitch|+|yaw|+|dS|+|dL|+|dP| ?
What would the unit be for each of the values given in the "x.1D" text document given by the 3dvolreg ? Would they all be millimeters or degrees?

For E-norm, would it be:

E-norm=sqrt(roll^2+pitch^2+yaw^2+dS^2+dL^2+dP^2)?

Thank you,
Gawon

Hi Gawon,

Paul might not respond right away, so I'll chime in.

Those look correct, except that the values are the first differences in the motion parameters, not the parameters themselves. For that step, consider example 7a from 1d_tool.py -help:

 1d_tool.py -infile dfile_rall.1D -set_nruns 9 \
           -derivative -write motion.deriv.1D

And yes, the units are mm and deg. And note that for a human, a 1 deg rotation is about 1 mm on the outer cortex.

-rick

Hi Rick,

Thank you so much for letting me know.

I computed the first differences of the raw motion parameters using:

1d_tool.py -infile ./rest_mc.1D -derivative -write ./motion_derive.1D

I just wanted to confirm that my understanding is correct:

  • "FD" for one fMRI volume (i.e., one row of motion_derive.1D) is the sum of the absolute values across the six columns.
  • "Enorm" is the square root of the sum of squares of those six values.

Does that look right?

Thank you,

Yes, that seems right.
Note that the distance from location (0,0,0) to (1,1,1) is not 3 but sqrt(3). That is why we use the Euclidean L2 norm.
-rick

1 Like