History of AFNI updates  

|
August 26, 2014 06:44PM
Dear Afni experts,

I'm trying to combine motion correction from 3dvolreg and deformation correction from 3dQwarp (with the -plusminus option for the use of a reference with a reversed phase encoding direction (blip up and blip down)) in one interpolation step with 3dNwarpApply.
I would have expect that applying the correction sequentialy of simultaneously would yield very similar images, with the former only very slightly blurred, but I see what seems to be a rotation between the two. Here is a sample of the code used:

# Compute motion correction
3dvolreg -prefix trun01_mc.nii.gz -base mcTarget.nii.gz -1Dmatrix_save mcMatrix_run01 trun01.nii.gz
3dTstat -mean -prefix trun01_mc_mean.nii.gz trun01_mc.nii.gz
# Compute deformation correction
3dQwarp -prefix trun01_mc_mean.nii.gz -base deformationRef.nii.gz -weight brainmask.nii.gz -source trun01_mc_mean.nii.gz -noZdis -noXdis -plusminus -superhard -minpatch 9 -nmi
# Apply motion and deformation correction
3dNwarpApply -prefix trun01_mdc.nii.gz -source trun01.nii.gz -nwarp 'IS:trun01_mc_mean_PLUS_WARP.nii.gz' -affter mcMatrix_run01.aff12.1D -interp cubic
3dTstat -mean -prefix trun01_mdc_mean.nii.gz trun01_mdc.nii.gz
# Visual inspection
fslview trun01_mc_mean_PLUS.nii.gz trun01_mdc_mean.nii.gz

The rotation I see between trun01_mc_mean_PLUS.nii.gz and trun01_mdc_mean.nii.gz is about the x axis (RL). I was initialy not using the 'IS:' option, but it was the same.

I must be doing something wrong, but I cannot figure what.

Thank you very much in advance for helping me to sort that out!

Sebastien
Subject Author Posted

Deformation and motion correction of EPI in "one step"

Sébastien Proulx August 26, 2014 06:44PM

Re: Deformation and motion correction of EPI in "one step"

Sébastien Proulx August 27, 2014 04:03PM

Re: Deformation and motion correction of EPI in "one step"

rick reynolds August 29, 2014 09:59AM