I've helped a few people with ASL processing, and there seem to be a variety of approaches. BTW, Francois Lalonde, here at NIH is my principal go-to person for questions about ASL analysis. There are couple parts people are interested in - motion correction and difference datasets. Differences are computed a few different ways, and I've included one way below. Note, I haven't actually tried this particular way for real data, but you may use this as a starting example. Proceed with caution....
# extract evens
3dbucket -prefix evens.nii.gz myASLdset.nii'[0..$(2)]'
# extract odds
3dbucket -prefix odds.nii.gz myASLdset.nii'[1..$(2)]'
# motion correct evens
3dvolreg -prefix odds_mc.nii.gz -1Dmatrix_save odds 'odds.nii.gz'
# motion correct odds by applying evens' transformation to odds
# assumes no motion between even and odds but doesn't add micro-motion differences
# to be introduced.
# This causes an extra interpolation if going to standard space separately
3dAllineate -prefix evens_mc.nii.gz -1Dmatrix_apply odds.aff12.1D -master 'evens.nii.gz'
# calculate differences
# use odds, evens and even+1 (the next even) to average
3dcalc -a odds_mc.nii.gz -b evens_mc.nii.gz -c evens_mc.nii.gz'[1..$]' \
-expr 'a-(b+c)/2' -prefix ASL_diff.nii.gz
# consider putting a TR in seconds into the dataset (~2*TRorig)
3drefit -TR 4s ASL_diff.nii.gz
Edited 1 time(s). Last edit at 03/25/2021 05:37PM by Daniel Glen.