# How to convert .xfm file to regular .tfm file to import in Slicer

**URL:** <https://discourse.slicer.org/t/how-to-convert-xfm-file-to-regular-tfm-file-to-import-in-slicer/7784>\
**Category:** Support\
**Tags:** registration, transforms, markups-fiducials\
**Created:** [July 28, 2019, 2:57am UTC](https://discourse.slicer.org/t/how-to-convert-xfm-file-to-regular-tfm-file-to-import-in-slicer/7784 "2019-07-28T02:57:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ljc19800331](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ljc19800331/32/2392_2.png) [@ljc19800331](https://discourse.slicer.org/u/ljc19800331)\
**Post date:** [July 28, 2019, 2:57am UTC](https://discourse.slicer.org/t/how-to-convert-xfm-file-to-regular-tfm-file-to-import-in-slicer/7784/1 "2019-07-28T02:57:06Z")

</div>

Operating system: Windows 10  
Slicer version: 4.10.1  
Expected behavior:  
Actual behavior:

Hello, I have download the data and the transformation file is .xfm. Is there a good way in python or 3D slicer that I could directly read the transformation and convert my MRI data to the standard coordinate system? Thanks.

example:  
MNI Transform File

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 29, 2019, 4:11am UTC](https://discourse.slicer.org/t/how-to-convert-xfm-file-to-regular-tfm-file-to-import-in-slicer/7784/2 "2019-07-29T04:11:58Z")

</div>

What is an xfm file? Can you save the transform as a standard ITK transform file instead? Slicer can already read those, either text or binary, even if they are composite transforms.

The example MNI transform file did not come through. If you want to share a file, the best way is typically to upload it to a cloud storage service (onedrive, gdrive, dropbox, etc) and post the link here.

If ITK library already supports reading of these transform files then we should be make it available in Slicer.

---

<div class="post-metadata">

**Author:** ![ljc19800331](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ljc19800331/32/2392_2.png) [@ljc19800331](https://discourse.slicer.org/u/ljc19800331)\
**Post date:** [July 29, 2019, 4:32am UTC](https://discourse.slicer.org/t/how-to-convert-xfm-file-to-regular-tfm-file-to-import-in-slicer/7784/3 "2019-07-29T04:32:26Z")

</div>

Thanks. The file is shown in this link:

> **[14\_transform\_mr\_back\_in\_native.xfm](https://drive.google.com/file/d/1gbKUqoABoL4BKwZMrqwyzsR-izgevrqV/view?usp=sharing)**
>
> Google Drive file.

This file is downloaded from open source dataset: [http://nist.mni.mcgill.ca/?page\_id=672](http://nist.mni.mcgill.ca/?page_id=672)

Thanks.
