Warp default anatomy to 3D scanner digitized EEG channel locations

Dear BST masters,

I am trying to co-register the digitized locations of the EEG channels with the default brain anatomy (no individual MRI available). I digitized the EEG channel locations with a 3D scanner and I imported them from Fieldtrip following the same procedure described in this thread:

Note that since channel locations are in SCS coordinates, I imported them without importing the fiducials because they are intrinsic in the subject's coordinate system.

However, for some subjects there is some mismatch between the channel locations and the head surface (see attached figure).
image

One solution I tried is to warp the head surface to the channel locations, but it looks to me that fiducials are not taken into account anymore.

  1. So my first question is: how to constrain warping with the fiducials?

  2. Ideally, a better solution would be to fully exploit the 3D image and also import additional head points. Assuming that I find a way to do this with Fieldtrip, how could I import them into BST to refine co-registration?

  3. Do you foresee the possibility of importing 3D scanner images directly into BST? That would really be great :-).

Thanks,

Marco

Please keep in mind that for registration of sensors on the anatomy there are two sets of fiducials in play:

  1. Fiducials in the MRI (of the Default anatomy), these are the ones the one in the MRI volume. Double-click the MRI, then right-click on the figure, then Figure > Edit fiducials (select Yes, to continue). Now just click on the green button View for the NAS, LPA and RPA fiducials to see their location.

  2. Fiducials in the sensors coordinates. These are the locations that were digitized (Polhemus or 3D scanner).

These two sets must be taken from the same place. If the sensor fiducials were not digitized in the same location as indicated on the anatomy fiducials it is needed to update the anatomy fiducial to match the sensor ones:
https://neuroimage.usc.edu/brainstorm/Tutorials/DefaultAnatomy#Modify_the_default_fiducials

If you sensors are already in SCS, just double-check that the sensor fiducials and the anatomy fiducials were defined in the same place. If they were not check the link above.

When warping, the fiducials are kept in place, then the anatomy is warped to match the best the head points (in this case the electrode positions). As you can see, this relies in a good initial alignment of the two fiducial sets.
https://neuroimage.usc.edu/brainstorm/Tutorials/TutWarping

It should be straight forward to save a subsample of the vertices of the 3D images in a text file either csv or tsv, in a format like this:

x y z
x y z
x y z

Then, to import them in Brainstorm, just right-click on the channel file once the data is linked to review, and Digitized head points > Add points.... Use the format EEG: ASCII: XYZ (*.*) if your file looks like above.

Good timing for this questions. We are currently reviewing the code to do so. It should be in Brainstorm in one or two weeks.

FYI @chinmay.chinara

1 Like

Thank you very much Raymundo for the prompt response.

I confirm that sensor fiducials were defined in the same place of the anatomy fiducials - in my case, since I am using the default anatomy, I locate preauricular points at the junction between the tragus and the helix.

I also followed your indications on how to add additional head points, and it works, thanks!

However, there is one thing that does not work: to double-check that fiducial location was exactly the same, I added the fiducials as additional points (green points in the figure below) in the case of a subject with a substantial mismatch between the channel positions and the default anatomy. I found out that, while the preauricular points coincided, the nasion of the anatomy was much more anterior than the one from the sensor space - which also seems to explain the mismatch. See the figure here:

image

Do you have any idea why? Or should I forward the problem to Fieldtrip?

Thanks

Marco

PS Great that you are coding the 3D scanner image import, looking forward!

1 Like

Hello again.

I reasoned that the likely reason for the mismatch between the digitized nasion and the default anatomy nasion is simply that they come from two different heads with a different proportion between the distance between the preauricular points and the distance between the nasion and the coordinates origin. Does this make sense?

If that is the case, the solution to this could be warping, but it is fundamental that warping incorporates the digitized fiducials as the true fiducials. I tried warping and the result seems to confirm this:
EEG_3D_coreg_warped@default_subject.tif (224.6 KB)

However, I am not completely sure as fiducials were also among the additional head points. Can you please confirm that warping considers as fiducials the digitized ones (i.e. the ones from the 3D scanner image) and not the default anatomy ones? Otherwise, how should I constrain it to do so?

In general, is there any drawback in doing warping on EEG data like this? (I read in this previous thread that warping was originally designed for MEG data: Warping vs. MRI Registration Edit - #2 by Francois).

Thanks!

Marco

Hello again (2) and sorry for the multiple questions.

I have a related question concerning the digitized head points used by warping. We use a sponge-based EEG system (RNet, Brain Products). Differently from gel-based systems, here the electrodes are not attached to the scalp, but they are separated by the sponges, which are approximately 9 mm thick when recording a subject. Therefore, I think it is more correct to use as head points for warping not the position of the electrodes but the corresponding position on the scalp, 9 mm inward. However, it seems to me that once I have uploaded the EEG channel file, BST automatically considers the channel points as head points. Also, it automatically loads the head points associated with the default anatomy. Due to this, I need to

  • first upload the channel file with the correct channel positions,
  • then remove all additional head points (Digitized head points > Remove all points),
  • then upload as additional head points the channel points moved 9 mm inward and additional digitized points.

Is this correct? Is there a simpler way to do this? And is this worth for more precise source reconstruction (which is of course the only motivation for all this :slight_smile: )?

Thanks,

Marco

@MarcoBuiatti This feature is now available in Brainstorm.

You need to be using the latest version of Brainstorm

Check this tutorial:
https://neuroimage.usc.edu/brainstorm/Tutorials/TutDigitize3dScanner