Importing captrak files

Hi Brainstorm team,

I'm importing CapTrak files into Brainstorm and I have a couple of questions for you all as I do so.

First question: We have bvef and bvct files in our dataset. Which should be used? I have not found any distinguishing variable between the two.

Second: When importing the .set files containing a standard channel file (not subject specific yet since its before CapTrak import), Brainstorm prompts the following question:
Screenshot 2024-02-19 at 7.53.16 PM
Although this channel file from the .set file will be overwritten if a subject has CapTrak data (to be imported at a later step), I'm wondering if the CapTrak coordinates imported need to undergo this step as well using the digitized head points this prompt is talking about. Would this need to be an additional step taken from within the "MRI registration" tab upon right-clicking the channel file? Would this improve EEG source localization? Any clarification would be appreciated.

Third: I have set the fiducial points (NAS/LPA/RPA) for the subject upon defining their anatomy in Brainstorm. We also have fiducial point data from the EEG data collection itself when we collected the CapTrak data. On CapTrak import, i'm prompted the message:
Screenshot 2024-02-19 at 7.59.56 PM
My thinking is to say No because the electrodes from the input file (CapTrak file) would be aligned to the fiducials set in the data collection. Could you please clarify this point as well?

Thanks again for your help. I realize this was a lot, so please let me know if you need clarification on anything.

Best,
Adam

From the few example files that I have, it seem you need both:

  • bvef Importing this fill will get the name of the channels in the proper order for your cap. However only has the spherical coordinates for the electrodes, not the ones acquired with the CapTrak device:

  • bvct This file has the information of the physical position of the electrodes (acquired with the CapTrak device). However in the few examples I have, the channel order does not match the order in the bvfe file.

The electrode position from CapTrak should not require a refinement in the registration. Click No. The anatomy fiducials will be aligned with the fiducial points from CapTrak. Verify the position of the electrodes with respect to the Subject's individual anatomy. Then you can decide to refine the coregistration if you find it necessary. Yes, the more accurate position of the electrodes with respect to the brain (coregistration) the better the source localization.

This is described in the point above.

Remember to verify the position of the sensors on the head (anatomy) before continue the processing.

Hi Raymundo,

Thank you.

How should I implement both of the bvef and bvct files if they're both to be included? There is no multi-select capability when choosing files to import within the "Add EEG positions" option. Should it be sequentially, such as loading the bvef file first, then then bcvt afterwards?

I've also noticed in comparing the three options ((1) bvef only; (2) bvef then bvct; and (3) bvct only), and there doesn't seem to be much of a difference in the coordinate values between these settings. If this is true, would this mean that there isn't much difference between the files that are imported?

Adam

From the example files that I have to test this, yes, they should be sequential.

  1. First, the bvef to get the proper name and order of the channel. With Import channel file
  2. Second, the bvct to get the world positions. With Add EEG locations
  1. Is this using the Subject's anatomy of the Default anatomy?
  2. Is it the same channel order in the three scenarios?
  3. Is the bvct (Brain Vision Cap Trak) file a real digitization of head points with Cap Trak? Or contains the same information as in bvef (BrainVision Electrode File)?

I'm not sure how these bvct and bvef are generated, it may the be case the the software that creates them add the CT info into the bvef so the results in your tests are the same.
Is it possible for you to share an example of these files (with their respective recordings)?

Raymundo,

We have a channel file within a given set file that is imported into Brainstorm, based on the Brainvision vhdr file associated with our cap. This channel file also has EMG channels that we've added. Previously, I've been adding the coordinates of the bvef file to update the set channel file's EEG electrode positions with the CapTrak data from a given data collection using the Add EEG positions function. As I see it now, I think because we include EMG channels in the set channel files, it may not possible to delete the set channel files and use the bvef file instead (as it loses the EMG channels). Please let me know if you think otherwise.

  1. We use CapTrak for those with MRI and without MRI (thus default anatomy). We would like the use of CapTrak data to be generalizable to both cases.
  2. I will dm you some files from the three different scenarios should help you answer questions 2-3.
  3. I was under the impression that these file types had equivalent information and that Brainstorm could read both file types to obtain digitized electrode locations.

Thanks again for the help.
Adam

Not really, the bvef is are the electrode positions in spherical coordinates, they do not take into account the positions that were digitized with the CapTrak device. On the other hand, the bvcp files, has the locations acquired with the CapTrak device. Once imported they do look similar (as they should, the bigger the head the bigger the difference) but they are not the same.

The file that should be used is the bvct if available.

One thing that it is now clear to me yet, is the order of the channels. Once you link your set:
Does the created channel file in the Braisntorm tree have the channel labels?
If so, you could only Add EEG positions from the bvcp` file.

You can change the Type in the Channel Editor for those channels to EMG, so they will not be considered in processing for EEG signals.

Raymundo,

Yes, the channel file imported with the set files does have labels. I shared this file with you.
About the Add EEG locations function, where is this? I only see Add EEG Positions. Is there a difference between these two?

As of right now, I understand that I should use the Add EEG Positions function with the bvct CapTrak file to get the electrode positions obtained with CapTrak into the channel file. Once I visually inspect these electrode locations, I project these electrodes to the surface of the scalp. Please correct me if I misunderstand.

A follow up question: if we do not have CapTrak data for some participants, therefore we want to use the standard BrainProducts ActiCap 97 electrode positions within Brainstorm, what is the best way to do this for both (1) the standard template brain (ICBM 152 2023b); and (2) those with MRIs? Right now, the MRIs are not transformed to MNI space.
Currently, I use the data from the set file channel file (which comes from the BrainProducts vhdr file), and visually inspect the electrode positions to make sure the layout looks appropriate, then I project the electrode positions to the scalp surface. However, I recognize that Brainstorm has the standard BrainProducts ActiCap 97 channel file available within the Add EEG positions function, and I would like to know which method is preferred, if any.

Adam

My bad, Add EEG locations does not exist, I meant Add EEG Positions. This has been edited in the previous post.

Yes, the alignment between the MRI (default or individual's) and the electrode positions from the bvct file is done with the positions for Naison, LPA and RPA. For subjects using their individual anatomy, you may want to use the option in the channel file right-click menu MRI registration > Refine using head points. This will try to find the best fit between the head points (electrode positions) and the subject anatomy.

  • For subject with default anatomy:
    Just Add EEG positions > ICBM152 > BrainProducts > BrainProducts ActiCap 97

  • For subjects with individual'a anatomy
    Perform MNI normalization
    Then you can add the positions from the default anatomy (as above), the locations in the individual's anatomy will be done using the MNI normalization

Both methods should lead to very similar results.
As a test, you could try with a subject with CapTrak sensor digitization. Test the both methods and compare them against the ground-of-truth location (from CapTrak)

Is it best practice to refine the CapTrak positions using head points, and when do I know that I need to do this? I thought we said above that we should not have to refine CapTrak data using head points, as the NAS/LPA/RPA are defined for CapTrak during the data collection.
Also, if the CapTrak positions are accurate relative to the NAS/LPA/RPA from the data collection, how is refining with head points different than projecting to the scalp surface?

Does converting the MRI to MNI space for some of our patients (but not all, such as in the case of those with MRI and CapTrak data) affect computations or their results later? I feel that if we were to convert some of the MRIs to MNI space, but not all, there may introduce some bias.

Thanks for this. I will test.

The refinement using head points is could help in the case that the alignment with fiducials is not enough. This happens for example, if the fiducials in the MRI and the fiducials in the CapTrak system were not placed in exact same place on the head. If they were the same the refinement using head points will not change the position of electrodes at all.

https://neuroimage.usc.edu/brainstorm/CoordinateSystems#Subject_Coordinate_System_.28SCS_.2F_CTF.29

By MNI normalization, I meant to compute the transformation between the individual's anatomy and the ICBM152 anatomy. This will not affect any computation later. And it is necessary if at some point you plan to do group analysis.

Raymundo,

Okay, great. Thanks for clarifying when refining head points is needed. I will use it if I suspect the electrode positions are off.

I wanted to come back to the order of the electrodes in the channel file (from the set file) and the bvct file that you mentioned previously.

I'm comparing the xyz coordinates of the bvct file to the electrode positions in the channel file after adding the bvct file coordinates with the Add EEG Positions function. These coordinates from bvct and the updated channel file don't seem to match up. Is there some sort of conversion that Brainstorm does that I am not aware of that would change these numbers appropriately?

I've shared some files with you so that you may see what I'm referring to.

Thank you,
Adam

Since the electrodes from the set file have already labels that match the labels bvct the order of the channels is not relevant.

Yes, all coordinates in Brainstorm are handled in the Subject Coordinate System which is created from the fiducials from the MRI.
https://neuroimage.usc.edu/brainstorm/CoordinateSystems#Subject_Coordinate_System_.28SCS_.2F_CTF.29

When the EEG locations are added, the fiducials from the bvct file (head points) are found.
Then these head-point fiducials are aligned to match the MRI, and their coordinates are saved as SCS.
The coordinates for the electrode locations are converted to this SCS.

This is the reason why coordinates in Brainstorm and the bvct file do not match.

Raymundo,

Thank you for the answer, and sorry for the delay of my response. Your mention of the SCS coordinate system makes sense.

On one subject using the default anatomy, I have loaded in two versions of channel files to test the similarity between using the channel file from the set file vs using Brainstorm's default ActiCap 97 channel file. There is a screenshot attached. Why might these (at least appear) to be so different, and which one is more correct? All I did with the channel file from the set file was refine with the head points. I projected the electrodes onto the scalp in both versions.
Option 1 = channel file from set file; option 2 is from default Brainstorm ActiCap 97 channel file.

Please let me know your thoughts. Thank you again!
Adam

Refine with head points should is not recommended for Subjects using default anatomy.

Acquiring head points gives as results a cloud of head points that captures the shape of the head, so if you have the Subject's head surface (from their anatomy) it does make sense to try to align the cloud of head points and the head surface, as they are obtained from the same head. However, when using default anatomy, the refinement algorithm is trying to align an individual's cloud of head points with a head that is not the subject, thus the bad result.

In the case of a subject with head points, but without anatomy. There are two options to follow

  1. Use the default anatomy and default cap, the head points are ignored

  2. Create a "Subject's anatomy" by warping the default anatomy to match the cloud of head-points.
    https://neuroimage.usc.edu/brainstorm/Tutorials/TutWarping

Hi Raymundo,

How do subjects get head points without having anatomy? And with participants using default anatomy, only the project electrodes on surface should be used after importing Brainstorm's standard ActiCap 97 channel file?

Additionally, another issue seems to have come up related to electrode positions. I was importing electrode positions (bvct) to another participant who seems to have been wearing some sort of wig cap during the scan; whatever it was, it seems to have caused folds in the scalp. Attached are screenshots of some of the electrodes in question - what should be done about these? Should they be manually moved inside the folds, kept where they are, or something else?

Thanks again,
Adam


These are subjects for whom there is not MRI scan. The head points are the ones obtained with the digitizer. They are electrode positions plus other points.
https://neuroimage.usc.edu/brainstorm/Tutorials/ChannelFile#Automatic_registration

Yes

To start you can check the registration between the head surfaces and the MRI. Right-click on the head surface > ?MRI registration > Check MRI/surface registration...

  • Try to generate another head surface using BEM, it may do a better job. Right-click on the MRI > MRI segmentation > Generate BEM surfaces

  • Otherwise, you could edit the MRI (with a tool such as ITK-SNAP to remove the wig before adding the anatomy files.

This is not an good idea, since the forward model (head model) relies on the electrical properties of the tissue. So, by moving the position of the electrodes inside, it would mean that the electrode was surrounded by a medium with the same electrical properties of bone tissue, which was not the case.

Raymundo,

Thanks. Here's a screenshot of the check mri/surface registration:


I think it looks good?

Additionally, it seems on the re-running of the BEM model like you said, the folds went away. Here's another screenshot:

Thanks for the guidance.

Adam

I meant to plot the registration between the head surface and the MRI, to see why is the issue.
image

The head surface from BEM looks way better

Raymundo,

I have another set of questions. One is about potential issues with head models; the other is about default BrainProducts channel files.

Question 1
We have a participant whose head model looks like this (upon import):

After generating BEM with default 1922v and 4mm skull thickness layers:


removed?

How could I go about getting these artifacts of the head model? Is it the same as the last one? I've tried rerunning the BEM generation multiple times but there do not seem to be many differences.

Question 2
We upgraded our BrainProducts/BrainVision system from the taller electrodes to the slim electrodes approximately a while ago (perhaps late 2021 or 2022?). Last week I found that there are slight differences in the old electrode layout (which Brainstorm seems to have) and the updated slim electrode layout. I've attached screenshots at the bottom to depict these differences.

How might this affect our use of the Brainstorm's version of the standard BrainProducts/BrainVision electrode file if we've been using the slim electrode layout for most of our ongoing study? Only the first few participants had the old electrode layout used, but most of those individuals had CapTrak data.

I tried to update one subject's electrode positions (that we obtained from the new system's vhdr file) with Brainstorm's default BrainProducts/BrainVision standard 97 channel cap and found that Brainstorm's channel file does not have a location for AFz, O9, or O10, evidenced by the channel file saying "EEG_NO_LOC".

Screenshot of channel file layouts:

Adam

Question 1

You can try the second suggestion from above:

Question 2 was moved to:
actiCAP and actiCAP snap (slim electrodes)