I am trying to apply a linear transformation using the --premat option of applywarp. The reason I am trying to do this is so that I can apply a linear and a non-linear transformation simultaneously, thereby interpolating once rather than twice. Unexpectedly, the output of applywarp and ApplyXFM are substantially different. The output of ApplyXFM is what I expect to see. The output of applywarp has some kind of artifact along the superior margin of the brain. Does anyone know what this artifact is or what I am doing wrong? Is this a bug in FSL?
Screenshots are attached to this e-mail. If you wish, you can download the NIFTI files needed to reproduce this issue from my personal website.
reference volume: http://benkay.net/fsl/anat-brain.nii.gz
input volume: http://benkay.net/fsl/mean-func.nii.gz
transformation matrix: http://benkay.net/fsl/mean-to-anat.mat
output of applywarp: http://benkay.net/fsl/applywarp.nii.gz
output of ApplyXFM: http://benkay.net/fsl/ApplyXFM.nii.gz
The transformation matrix was generated via:
fsl4.1-flirt -ref anat-brain.nii.gz -in mean-func.nii.gz -out ApplyXFM.nii.gz -omat mean-to-anat.mat -dof 7 -interp sinc
applywarp was invoked thusly:
fsl4.1-applywarp --ref=anat-brain.nii.gz --in=mean-func.nii.gz --out=applywarp.nii.gz --premat=mean-to-anat.mat --interp=sinc
ApplyXFM is, of course, a GUI. Run it with sinc interpolation or just use the output of flirt (above), which ought to be pretty much the same thing.
All fun was had using fsl-4.1.8 on Debian unstable, Linux 3.0.0-1-amd64.