# Warping FOD and tck files to MNI template

**URL:** <https://community.mrtrix.org/t/warping-fod-and-tck-files-to-mni-template/2049>\
**Category:** Uncategorized\
**Created:** [November 15, 2018, 4:47pm UTC](https://community.mrtrix.org/t/warping-fod-and-tck-files-to-mni-template/2049 "2018-11-15T16:47:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Post date:** [November 16, 2018, 9:06am UTC](https://community.mrtrix.org/t/warping-fod-and-tck-files-to-mni-template/2049/2 "2018-11-16T09:06:58Z")

</div>

There are a few issues to get right here before this can work:

- the displacement field provided in the HCP is not quite in the right format for our tools. We expect a _deformation_ field, which stores the x,y,z positions in the target space, rather than the _displacement_ field containing the x,y,z, translations of each voxel. So the first step is to convert the displacement field to a deformation field. This was what the first step in the post you linked to was about:

- the process to warp the streamlines relies on the _forward_ transform from subject to template space (i.e. an image in subject space giving corresponding locations in template space), and this _should_ just work:

- The FODs can also be warped, but they rely on the _inverse_ transform from template to subject (i.e. an image in template space giving corresponding locations in subject space). Thankfully, the HCP provides the inverse displacement field, so you can convert it to the required deformation field as above:

Note that there is plenty of scope for confusion as to which displacement/deformation is forward or inverse. Since image regridding invariably relies on the inverse mapping (i.e. an image in the target space from which locations in the source space can be derived), it’s quite possible for that warp to be labelled as ‘source2target’ – indeed, that is what you would use to warp an image from source to target space. I note my terminology here differs from that used in the HPC, but hopefully that won’t introduce too much confusion…

If this doesn’t work, you could try swapping the warps around, there’s a chance that might work, depending on whether I’ve got my forwards and inverses mixed up…

---

_[View the full topic](https://community.mrtrix.org/t/warping-fod-and-tck-files-to-mni-template/2049)._
