Get fiducials coordinates

Hi François,

I used brainstorm for EEG analysis. I used the ICBM152 template as I did not have the individual MRI. Now, I need to export my epoched data to SPM to do DCM and I managed to do it with"export to file". However, the "fiducials" are empty (but I have the channels and their coordinates).
I aksed the question in the SPM list and Vladimir answer me that : "you might be able to export your sensor locations and fiducials from Brainstorm. .sfp file is a file with 4 columns, the first being the labels and the next 3 - X Y and Z coordinates and you can make this file e.g. in Excel and save it as text. ". however, when I tried to export the channels in .sfp, I still just have the channels and not the fiducials. I am sure there is a way to get the fiducials as well but cannot find it...
(I also look on interent but did not find anything).
Do you think you can help me?



Indeed, the functions that export the electrode positions do not include the fiducials.
You can either write a script that adds these files to the output file, or edit the text file and add manually the three lines for the fiducials.

If you used default electrode positions from one of the Brainstorm templates, then there are no fiducials (NAS/LPA/RPA landmarks) available in the same space as the electrodes.

I guess what you want is the anatomical landmarks from the MRI, converted in SCS coordinates (see: so that they are in the same space as the electrodes?

You can get the fiducials in MRI coordinates from the reference T1 MRI, and then convert them to SCS:

% sMri variable = obtained with a right-click on the MRI > File > Export to Matlab, or loaded with in_mri_bst.

NAS_scs = cs_convert(sMri, 'mri', 'scs', sMri.SCS.NAS / 1000) 

% Results in meters, in the same coordinate system as the EEG electrodes in the channel file

Does this help?

1 Like

Hi François,

Once again, thank you very much. It helped a lot even if I still have some doubts.

Actually, I needed the coordinates because I would like to do DCM in SPM. To do so, I need to import my epoched data in SPM from brainstorm, and SPM requires the fiducials (for coregistration with their coordinates system). Indeed, I used a default electrode position in brainstorm (when I imported my data in brainstorm, i did not do anything except MRI registration with the default anatomy ICBM152).
So could you confirm that with the process you just described, I will have the fiducials that SPM need? (I ask because one of my colleague told me that I should not use the fiducials of the MRI as it is not those of the EEG).

To coregister the EEG and the MRI based on these fiducials, you need two sets of 3 points:

After the coregistration is done, the two spaces are supposedly aligned, and nothing prevents you from expressing the anatomical landmarks from the MRI in the same coordinate system as the EEG.
The default electrode positions you used do not have NAS/LPA/RPA attached to the EEG cap. If you want coordinates for these points, you have no other choice than using the ones from the MRI.

It can make sense only if you consider that the EEG cap is correctly coregistered with the MRI - which should be the case if you did not modify the Brainstorm templates.
Exporting the EEG electrode locations (in SCS coordinates) together with the NAS/LPA/RPA from the MRI (correctly converted to SCS coordinates) makes sense if the idea is to reproduce in SPM the same coregistration between the MNI template and the EEG.

To check that the coordinates of the points NAS/LPA/RPA are correct: create a text file with all the electrodes coordinates and these 3 points renamed into some random things (eg. FN, FL, FR), so that Brainstorm reads them as electrodes instead of fiducials, import the channel file in an empty folder in Brainstorm, and make sure these fiducials fall where you are expecting to with respect to the electrodes.

From you original channel file, right-click > MRI registration > Check, in order to see electrodes + fiducials in the same figure.

Hi François,

Thank you again for this detailed explanation and for the checking suggestion.

I think it could be relevant for me to have the coordinates in the MNI system directly (as I need to export the channel file in .sfp and to give it to SPM and I think I am not sure to have an option in SCS, even if I export it in text file).
Here are my coordinates exported from brainstorm (in MRI)


ans = 

  struct with fields:

       NAS: [99.9437 212.2549 30.5767]
       LPA: [15.7188 111.3454 26.5208]
       RPA: [181.7035 109.3049 27.4737]

Here are the results with the function

>> NAS_mni = cs_convert(sMRI, 'mri', 'mni', sMRI.SCS.NAS/1000)

NAS_mni =

    0.0009    0.0773   -0.0424

As you told that the results are in meters, I assume I have to multiply the results by 1000 to have the coordinates in what I have in SPM (in mm).
Then in SPM, I tried to do the coregistration with the coordinates given by the function (and *1000), which looks pretty good (contrary to everything I tried before).

So my question is: does it make sense to do what I did, i.e., having the fiducials in MNI directly?



1 Like