I was looking into the way in which fmriprep deals with afni warp files to convert them into an ants-friendly file, in particular from the fmriprep.workflows.fieldmap.pepolar workflow
It seems to me that you have incorporated this by running
- the function _fix_hdr on the warp output of 3dQwarp
- copying the header of the warped input to 3dQwarp to the output warp using CopyHeader (from niworkflows utils.py)
- running antsApplyTransforms using this modified warp file
Is this correct?
I appreciate that helping me with this is out the scope of fmriprep, but what I am trying to do is just to incorporate distortion correction (using ANTS’s unWarpEPI.py) into my ASL analysis script (which uses ants for all registrations). So I thought that borrowing your expertise on this subject would be faster moving part of my preprocessing to fmriprep…