FMRIPREP: inverse t1_to_mni warp

Hi all,

Question
From the composite warp provided in the output, is it trivial to compute the inverse? How would I do that?

use case
I’m using regions of interest defined in MNI space to project onto the subject images for correlation analyses.

Thank you!
I’m still reading up on the documentation, but from what I’ve looked up, people assume you already have the inverse warp to apply to your image from the first registration.

antsApplyTransforms:

     -t, --transform transformFileName
                     [transformFileName,useInverse]
          Several transform options are supported including all those defined in the ITK 
          library in addition to a deformation field transform. The ordering of the 
          transformations follows the ordering specified on the command line. An identity 
          transform is pushed onto the transformation stack. Each new transform 
          encountered on the command line is also pushed onto the transformation stack. 
          Then, to warp the input object, each point comprising the input object is warped 
          first according to the last transform pushed onto the stack followed by the 
          second to last transform, etc. until the last transform encountered which is the 
          identity transform. Also, it should be noted that the inverse transform can be 
          accommodated with the usual caveat that such an inverse must be defined by the 
          specified transform class 

thanks @effigies!, I tried what I believe would do that for me and this is what I got:

antsApplyTransforms -i sub-experimentalSE110_T1w_space-MNI152NLin2009cAsym_preproc.nii.gz -r ../../../../sub-experimentalSE110/ses-pre/anat/sub-experimentalSE110_ses-pre_acq-highres_T1w.nii.gz -t [sub-experimentalSE110_T1w_space-MNI152NLin2009cAsym_warp.h5,1] -n NearestNeighbor -o test2.nii.gz -v 1
Using double precision for computations.
Input scalar image: sub-experimentalSE110_T1w_space-MNI152NLin2009cAsym_preproc.nii.gz
Reference image: ../../../../sub-experimentalSE110/ses-pre/anat/sub-experimentalSE110_ses-pre_acq-highres_T1w.nii.gz
Inverse does not exist for sub-experimentalSE110_T1w_space-MNI152NLin2009cAsym_warp.h5

perhaps related to this: https://github.com/ANTsX/ANTs/issues/326

Ah, good catch. I think we should start outputting the inverse in the next release. In the meantime, you can find the warp field you want in anat_preproc_wf/t1_2_mni/ants_t1_to_mniInverseComposite.h5.

FMRIPREP>=1.0.0-rc6 nowhas this output. In this case, the filename would be sub-experimentalSE110_T1w_space-MNI152NLin2009cAsym_target-T1w_warp.h5.

Also note that the forward transform was misnamed before. Instead of space-MNI..., it should have been target-MNI.... This has been corrected in FMRIPREP>=1.0.0-rc6.

1 Like