# how to obtain trans.fif file from coregistration between meg and mri with mrilab

**URL:** <https://mne.discourse.group/t/how-to-obtain-trans-fif-file-from-coregistration-between-meg-and-mri-with-mrilab/4223>\
**Category:** Support & Discussions\
**Tags:** preprocessing\
**Created:** [January 4, 2022, 2:57pm UTC](https://mne.discourse.group/t/how-to-obtain-trans-fif-file-from-coregistration-between-meg-and-mri-with-mrilab/4223 "2022-01-04T14:57:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://mne.discourse.group/u/Alex)\
**Post date:** [January 4, 2022, 2:57pm UTC](https://mne.discourse.group/t/how-to-obtain-trans-fif-file-from-coregistration-between-meg-and-mri-with-mrilab/4223/1 "2022-01-04T14:57:49Z")

</div>

Hi,

In the chapter “Head model and forward computation” it says that one can obtain the “trans file” with mrilab if one uses a Neuromag system. But I don’t understand how to obtain the “trans.fif”-file with mrilab.

I coregister the MRI to the digitized points (Nas,LPA,RPA, Coils) from the MEG measurement and save the fiducial coordinates in a .txt file (which can be either stored in “head”, “MRI” or “voxel” coordinates) and the coregistered mri.fif file. But from these two files I don’t know how to create the trans.fif file and I don’t see any option in mrilab to create a trans.fif file. I know that I could use mne.gui.coregistration or men\_analyze. But as I’ve already done the coregistration in mrilab I wouldn’t want to do everything again.

It would be great if someone could help me! 🙂

- MNE-Python version: 0.24.0
- operating system: MacOS

Thanks,  
Alex

---

<div class="post-metadata">

**Author:** ![jhouck](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jhouck/32/95_2.png) [@jhouck](https://mne.discourse.group/u/jhouck)\
**Post date:** [January 4, 2022, 5:36pm UTC](https://mne.discourse.group/t/how-to-obtain-trans-fif-file-from-coregistration-between-meg-and-mri-with-mrilab/4223/2 "2022-01-04T17:36:18Z")

</div>

> [@Alex](#):
>
> Head model and forward computation

If you have a neuromag system you _can_ use the neuromag mrilab program to obtain the transformation, but it is not required. Unless you have a great deal of experience using mrilab, mne.gui.coregistration is likely to produce a more accurate transformation. For instructions, see “Defining the head↔MRI `trans` using the GUI” at [Source alignment and coordinate frames — MNE 1.6.0 documentation](https://mne.tools/stable/auto_tutorials/forward/20_source_alignment.html) .

Hope this helps,

Jon
