Coordinate

I have results of networks connectivity using cortex from brainvisa and other results also of networks connectivity develloped in Brainstorm
In order to compare the networks i found out that the coordinate of brainvisa are different of the one from Brainstorm
I am asking if there is a way to converet coordinate from brainvisa to brainstorm or the inverse
thnx a lot

Hello,

I’m not sure what kind of results you are referring to. If you have spatial information that is available in the same coordinate system as the BrainVISA surfaces extracted from the T1 MRI, it should be possible to convert it to Brainstorm coordinates.

  1. BrainVISA surfaces => Brainstorm MRI: see brainstorm3/toolbox/io/in_tess.m, line 133
  2. Brainstorm MRI => Brainstorm SCS: use function cs_convert.m (see in_tess.m, line 201)

The coordinate systems used in Brainstorm are described here:
http://neuroimage.usc.edu/brainstorm/CoordinateSystems

Francois

Infact i have sensors coordinnate from brainvisa and other from brainstorm in order to compare the adequate position i need a way to convert
one of them

Sensors and surfaces should be in the same coordinate systems (what I referred to as “BrainVISA surfaces” and “Brainstorm SCS”).
The directions I gave you previously will help you to convert from BrainVISA to Brainstorm.

Hello Francois
Sorry i tried to apply the function that you did suggest but it didn t work
infact the in_tess.m function does provide only TessMat: Brainstorm tesselation structure with fields:
% |- Vertices : {[3 x nbVertices] double}, in millimeters
% |- Faces : {[nbFaces x 3] double}
% |- Comment : {information string}
What i need to convert is the coordinate of IEEG sensors that are defined from brainvisa
By the way i tried to import the IEEG signal to brainstorm but still the sensors are not converted to the CTF format

Hello,

I’m sorry this is very specific to your own implementation, you may not find readily available tools to do this, you may have to figure out yourself what is the transformation to apply. Converting between coordinates systems can be tricky, if you are not familiar with basic 3D geometry transformations, maybe you should try to find someone around you to help you with this.

You should first check if the coordinates for your iEEG contacts are in the same coordinate system as the surfaces in Brainstorm.
If they are, you should apply manually to the iEEG 3D positions the same transformations that are applied when loading the BrainVISA surfaces (I pointed at the corresponding code in in_tess.m).

Alternatively, there is one solution that could be easier for you, if you can manipulate your position files in BrainVISA.
If you find a way to add the three landmarks NAS/LPA/RPA in the position file with your iEEG electrodes, the positions of all the electrodes would be converted automatically to the Brainstorm SCS coordinates system when you import them in the Brainstorm database (menus “Import channel file” or “Add EEG positions”).
You just need to add three lines to your position file, with the (X,Y,Z) of the three fiducials in the same coordinates system as the iEEG electrodes (you can probably get these positions with BrainVISA/Anatomist). These points must be EXACTLY the same points that you pick in the MRI viewer when you imported the anatomy in the Brainstorm database (try to pick visually exactly the same MRI slices).
This solution would save you the trouble of understanding and applying the succession of 3D transformation that are applied when importing the surfaces.

Does this help?
Francois

ell Fançois
I did proceed as u suggest
so i have files in .txt containing coordinate withn this format (one line = one sensor = Name,X,Y,Z)
and i added the landmrks coordinate
when i do import in the Brainstorm database (menus “Import channel file” or “Add EEG positions”).
i obtain this message
"Warning: No channel information was read from the file."
I think i still need help
:slight_smile:

Maybe you’re not using the correct file format for the import.
If the files are as you describe (with no header, first line = first sensor), you should be able to import it with the format “EEG: ASCII: Name,XYZ”

If you’re still getting this message, please post your file here as an attachment.

this is my file

NAS,0.127,0.213,0.139
LPA,0.052,0.113,0.096
RPA,0.202,0.113,0.091
C3,0.0493,0.18025,0.132613
To13,0.0254,0.196,0.130
l8,0.05312,0.206,0.109
L10,0.046,0.206,0.109
L12,0.041,0.205,0.1086
Cu3,0.066,0.2234,0.10329
Cu5,0.058,0.2224,0.102
Cu7,0.052,0.221,0.101
Cu8,0.049,0.222,0.103

Hi Nawel,

The function for reading the positions was not interpreting the comas as separation characters. Most of the formats use space or tabulations to separate the values.
I fixed this, so you can update Brainstorm and try again: save your file (see attached example) and load it with the file format “ASCII: Name,XYZ”.

Note that your positions NAS/LPA/RPA are probably incorrect as they indicate that your contacts are far of the head (see attached picture).

Cheers,
Francois

Hey François
uploading is done succesfully
but still i receive the same message
No channel information was read from the file."
by the way i tried a new methods two i did save the coordinate of all the electrodes in eeglab with the landmark two after that i did import the signal
the importation is done succefully ( no error message no worning nothing) but the icon of channel coordinte disappear
it is realy bizaroiide
i couldn t see the probleme

I may have forgotten to push the updates on the server before telling you to update…
Please try updating again Brainstorm again then follow this procedure:

  1. Create new subject in your database with the options “Default anatomy:YES, Default channel file:NO”
  2. Create a new folder in this subject
  3. Save the file “test.txt” I posted previously on this thread
  4. Right-click on this folder > Import channel file > File format: “EEG:ASCII:Name,XYZ”, file:test.txt
  5. Right-click on the imported channel file > Edit channel file.

Post screen captures to detail your issues if you’re still not understanding what is happening.

Cheers,
Francois

Sorry :frowning:
I did folow all these steps but still the same message “Warning: No channel information was read from the file.”

Make sure your version of Brainstorm is from 15-Feb-2015.
It should look like the attached picture.
If it’s not, please post a screen capture showing your brainstorm window, error message and channel editor contents.

Hello François
Well it finally works the conversation
Thank you very much
your suggestions were very adequate
thanks again for your help and patient
cheers