Coregistration between MEG and defaced MRI

102 views
Skip to first unread message

Marc Lalancette

unread,
Mar 8, 2021, 5:59:48 PM3/8/21
to bids-discussion
Hello,

I have another question regarding MEG, this time related to coregistration. I want to include the best possible coregistration (using head points) with our dataset because it can be more difficult to do with a defaced MRI. I thus wanted to ask for opinions on how best to do this in a BIDS dataset.

First, we digitize head points, head coils and anatomical landmarks for each participants. So in the _t1w.json, I would save the coordinates of the anatomical landmarks, which would be the same across MEG sessions.  In the _coordsystem.json, I would normally save the digitized head coil and anatomical landmark coordinates, and the _headshape.pos file.  

If I coregister using the head points instead of the digitized anatomical landmarks, my preferred solution would be to:
1. Adjust the AnatomicalLandmarkCoordinates (in _coordsystem.json) to give the same coregistration as the head-points fit and explain this in FiducialsDescription. 

Other options:
2. Keep both the digitized and fitted landmark coordinates. But then there's no standard naming (yet) for these "digitized" or "fitted" sets of landmarks; it's not software-readable.
3. Edit the .pos file and only keep the adjusted/fitted coordinates, both there and in _coordsystem.json.
4. Consider this head-point coregistration to be a derivative. But I feel that would make it much more difficult to share it in a standard, easily useable (machine-readable) way.

Comments and suggestions welcome!
Marc


Mainak Jas

unread,
Mar 10, 2021, 9:07:50 AM3/10/21
to bids-discussion
Hi Marc,


So I think that would be consistent.

Mainak

--
We are all colleagues working together to shape brain imaging for tomorrow, please be respectful, gracious, and patient with your fellow group members.
---
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/9452c1c6-8412-4658-aeb5-229a4a599be8n%40googlegroups.com.

Marc Lalancette

unread,
Mar 10, 2021, 1:05:05 PM3/10/21
to bids-discussion
Hi Mainak,

Thanks for the info.  Although it's not exactly the same approach, the idea to save the head-points-aligned coregistration in the BIDS metadata is. I looked at the link you provided, and the MNE coregsitration tutorial. If you don't mind, can you confirm if I understood correctly?

During coregistration in MNE, you can manually mark anatomical landmarks on the head surface, but if you later use the head points to improve the coregistration, these marked points are no longer used at all.  Instead, it's the digitized landmarks that define the "head" coordinate frame.  (Note that in Brainstorm it's the opposite: the digitized landmarks are ignored after aligning with the head points and the ones picked on the MRI define the subject coordinate space.)

Thus to save the coregistration info in BIDS, you bring the digitized landmarks into MRI voxel coordinates and save those in the t1w.json file. This means that for multiple MEG sessions, you could in theory have multiple sets of landmarks saved in this t1w.json file, correct?  (This is the part I don't like as much.)

In comparison, my suggestion 1 keeps one set of manually marked MRI landmarks in the t1w.json file, and following the Brainstorm convention, bring these into the head space to be saved along each MEG session in a _coordsystem.json file.  The disadvantage here is that these coordinates no longer match the digitized landmarks.

I think both approaches are "BIDS valid" and make sense following the MNE or Brainstorm conventions.  However, both have inconveniences in terms of software: 
- "MNE": non-standard naming of landmarks from multiple MEG sessions in t1w.json.
- "Brainstorm": prefer the _coordsystem.json landmarks over the digitized ones.
And in both cases, it may not be clear whether the BIDS landmarks already include the head points fit.

Any further comments?

Cheers,
Marc

Mainak Jas

unread,
Mar 10, 2021, 3:33:00 PM3/10/21
to bids-discussion
Hi Marc,

Your understanding is exactly right. I guess either approach is valid. If the trans file changes from session to session, I would expect either the estimated digitized coordinates or anatomical coordinates to change. Now, in the MNE approach imperfections in digitizing fiducials/head points are "fixed" through the anatomical coordinate location. This doesn't modify the digitized data, so in some sense it's closer to "raw data".

But at the end of the day, I don't know if it matters. In MNE-BIDS, we take the pragmatic viewpoint that the data when shared must be easy to use. So, users are allowed to write events.tsv files that they have "fixed" for example to take into account stimulus delays etc rather than staying true to the trigger channel.

Mainak

Alexandre Gramfort

unread,
Mar 10, 2021, 3:34:56 PM3/10/21
to bids-di...@googlegroups.com
let me just share an issue we have had with the MNE approach. I have one dataset with 2 sessions
hence to slightly different trans yet I only have one MRI. So I am a bit stuck on this one for now

my 2c

Mainak Jas

unread,
Mar 10, 2021, 4:03:06 PM3/10/21
to bids-discussion
I think we face the problem because we use t1w.json instead of _coordsystem.json. That file can be different across sessions ...

Mainak

--
We are all colleagues working together to shape brain imaging for tomorrow, please be respectful, gracious, and patient with your fellow group members.
---
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.

Marc Lalancette

unread,
Mar 10, 2021, 6:28:47 PM3/10/21
to bids-di...@googlegroups.com
It's not really using t1w.json *instead* of coordsystem.json, but that you "place" the adjustment from fitting head points in the t1w landmarks instead of the ones in coordsystem.json. For the coregistration to be fully specified in the BIDS metadata, both files, each with a set of AnatomicalLandmarkCoordinates, should be present.

The specification (near the bottom of this section) says that if you have different MRI voxel coordinates for landmarks between sessions: "The solution would be to use only one T1w file and populate the AnatomicalLandmarkCoordinates field with session-specific labels for example, "NAS-session1" "  But I'm not a big fan of that solution, hence my alternate approach.

Marc



You received this message because you are subscribed to a topic in the Google Groups "bids-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bids-discussion/BeyUeuNGl7I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bids-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/CANzrpG2qMxmbxfejjA63T8TZsJBSheSbLP_VyWdPX0DyeT6cNQ%40mail.gmail.com.

Alexandre Gramfort

unread,
Mar 15, 2021, 5:50:52 AM3/15/21
to bids-di...@googlegroups.com
> I think we face the problem because we use t1w.json instead of _coordsystem.json. That file can be different across sessions ...

doc suggests that it would work nicely with
AnatomicalLandmarkCoordinates in _coordsystem.json files.

now this contradicts the suggestions to use "NAS-session1" ... can we
conclude on what's the "good" approach?

I prefer clearly the _coordsystem.json. What I would do in mne-bids is
to look for AnatomicalLandmarkCoordinates in T1w json
and if not present look for them in _coordsystem.json

my 2c

Robert Oostenveld

unread,
Mar 15, 2021, 9:39:16 AM3/15/21
to bids-di...@googlegroups.com
I also prefer in the normal case the _coordsystem.json solution, as that is session specific. However, if I were to implement an analysis pipeline (e.g. in FieldTrip), I would first check whether it is specified in _coordsystem.json and if not, check whether it is in _t1.json. If it were specified in both, I would say the _coordsystem.json should take precedence. It is a little bit as with the general inheritance principle, where the json/tsv metadata that is “closest by” takes precedence over metadata that is “further away” in the directory hierarchy.

However, I can also see situations where my preferred solution would not work. Imagine there is a T1 and a T2, and the T2 is recorded with a different FoV, or with a different resolution. These are both in the samew “anat” directory. And imagine that you have one MEG session. In that case you have a 1x2 mapping, i.e. the MEG recording needs to be mapped on the T1 and T2. That now requires to use the t1.json and t2.json. since the _coordsystem.json cannot link simultaneously to two IntendedFor anatomical MRIs. And now Imagine that you have two MEG sessions: that gives rise to a 2x2 mapping, i.e. each of the two MEG recordings would have to be mapped to both the T1 and T2. In that case I would actually not know how to specify the mapping given the current specification.

best
Robert
> --
> We are all colleagues working together to shape brain imaging for tomorrow, please be respectful, gracious, and patient with your fellow group members.
> ---
> You received this message because you are subscribed to the Google Groups "bids-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/CADeotZperMc%3Dn3KkRE8F5BV3A72jtn2i59QNz2zAUZjEeDWO3Q%40mail.gmail.com.

Marc Lalancette

unread,
Mar 15, 2021, 11:37:34 AM3/15/21
to bids-discussion
I was confused by the latest comments.  
@Alex, @Robert, I think what you both may be thinking/suggesting is to put the landmark MRI voxel coordinates in the MEG _coordsystem.json.  Although it is not explicitly stated that this is not valid, I think it goes against the original intent. Think about fully specifying the coregistration in the BIDS metadata: if you put MRI coordinates in AnatomicalLandmarkCoordinates in  _coordsystem.json then there is no longer any place to store the landmark coordinates in "MEG space".  And we need both.  The specification instead explains that MRI landmark coordinates should be in the _t1w.json.  (And this also works with multiple anatomy files.)

I therefore think the two approaches I called "MNE" and "Brainstorm" in my second post above are the way to go within the current specification.  (If it wasn't clear before, please keep in mind that both approaches use both sets of AnatomicalLandmarkCoordinates in the two files.)  Though again, they each have software downsides when incorporating a "head-points alignment":
  > - "MNE": non-standard naming of landmarks from multiple MEG sessions in t1w.json.
  > - "Brainstorm": prefer the _coordsystem.json landmarks over the digitized ones.
  > And in both cases, it may not be clear whether the BIDS landmarks already include the head points fit.

I don't really see a good solution for these downsides as we are somewhat stretching the specification when wanting to incorporate the head-points fit (a "derivative") into the coregistration metadata.  So I would simply suggest that software generally give precedence to BIDS specified coregistration (AnatomicalLandmarkCoordinates in both files) to their usual way to extract or compute them from the raw data, perhaps with a warning if the two don't match.

Cheers
Marc

Robert Oostenveld

unread,
Mar 16, 2021, 9:56:13 AM3/16/21
to bids-di...@googlegroups.com
Hi Marc

Yes, I believe you are right. I confused the AnatomicalLandmarkCoordinates with the HeadCoilCoordinates. The anatomical landmarks are part of the the head of the participant, who takes them home after participating in the experiment ;-). These landmarks are visible on the imaging data T1, T2, CT, etc. 

SInce the MEG system cannot directly “see” the anatomical landmarks, the head localizer coils are placed as “fiducials" on the head. The MEG system can record the signal from the coils and reconstruct their position. Prior to the MEG experiment it is common to record the position of the coils in relation to the anatomical landmarks and sometimes also to the whole head shape, e.g. using a Polhemus digitizer. The place of the coils can be slightly different between MEG sessions and placement procedures vary from lab to lab. The participants headshape and/or landmarks are not different between sessions (except for measurement noise). 

In some MEG labs - like the Donders - the head localizer coils are directly placed on the anatomical landmarks. That means we do _not_ record the position of the coils relative to the landmarks, as those positions coincide. We often do record (with the Polhemus) the position of the coils relative to the head surface, but not always. So in some cases we just pop on the coils (using ear molds, which ensures that the coils are along the extension of the ear canal), proceed without Polhemus and place the subject in the MEG. 

best
Robert





Reply all
Reply to author
Forward
0 new messages