-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display leadfield as heatmap within Brainstorm #585
Comments
This doesn't seem like a complicated task.
If you provide me with code to compute the heatmap, I can do the rest of the implementation next week. |
Hi @ftadel, Sorry for the late reply. Indeed this process can be included within the view_leadfields.m function, but it may require more edits and changes. As discussed, here is an example with the data (subject exported from Brainstorm) and a script that use this data. Thanks for your great help. Best, |
Last option: we could make this a process that computes the sensitivity map and save it in the database as a volume, that can later be exported as a .nii file or displayed with the existing interface (3D or MRI viewer). We could compute all the electrodes at once, and would maybe have only to ask the reference as an input parameter. |
Thank You, Francois, the sensitivity display on the MRI is very important indeed, or I would say most important than on the mesh at this level, the display on the mesh can be optional. We can discuss this with @jcmosher.
We may need to have the display at the mesh level when the resolution of the computation goes less than 1mm, for example when we will integrate the body on the electrode and the contacts on the mesh (width less than 1mm), in that case, the mesh will be refined around the electrode, and the sensitivity will be affected by all the material around it.
This is great, we can have the evolution of the sensitivity across the pairs of channels (with regard to a fixed reference).
Yes, for EEG/MEG this resolution can be sufficient, but for sEEG we will need a lower resolution.
This would be great indeed and can be used to have "a full head sensitivity" when summing all (or a group) of the electrodes when computed relative to one distant reference. I think it's a great idea!! We can also combine the MRI sensitivity view with the brain surfaces and deep structures, and then overlay it with the VTA that can be computed from the sensitivity (this may be a second step later) Thanks |
I added menus to display the leadfield sensitivity: It works for a surface source space (display on the cortex surface) or a volume source model (display as "MRI 3D" or "MRI Viewer"). Function There is one thing that needs to be fixed probably: the units. I added the option to interpolate with a 1-voxel resolution instead of using only the 3-voxel value by default. |
This looks awesome already. Thanks @ftadel Regarding the display of the units, I prefer the normalized values,
do you still think about the idea to save the results into a volume (3D) in the database ? I think it may be interesting when analyzing the sensitivity of all electrodes (sEEG) (sum all the sensitivity when computed to a distant reference), we can use it to detect some blind spots for example. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Done in: d64af79
I haven't thought about it yet, but it's my todo list.
Can you give me more precise directions, if I need to implement something specific? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I started to implement the sum of all the channels when selecting iChannel=0 (press left arrow after display). It works well with an average reference, but I'm not sure what to with the results with different references. |
That's awesome @ftadel The average reference can be useful, but I believe in such comparaison a distant reference should be better. From the simulation view, we can add a virtual ref channel on the furthest mesh node from the channels, this option can be a good solution. We can discuss it with the team. I will review the code as well :) |
First experiments for displaying as isosurface here: I used Iso2mesh's I posted an issue on the iso2mesh repo to get some help with it: |
I closed the iso2mesh issue: fangq/iso2mesh#70 I committed my last experiments for the computation of the VTA: 84ddaa1 If you want to test it, it requires a full version of iso2mesh to be installed on your computer. It is also very slow to split and then fix and then measure the surfaces with iso2mesh. If it is slow like this, we can't leave it computed at each change of the target or reference. |
Hi Francois, Thanks for the updates. I have some issues with my computer. I will test it in the following days. Thanks |
Hello all,
help wanted @ftadel
I'm trying to add a feature to brainstorm that allows the visualization of the leadfield as a heatmap on the cortical surface and on the volume (mesh and ideally on the MRIs).
This function will follow a similar implementation as for the view_leadfield with similar options, but instead of plotting the arrows, we will use the magnitude of the LF vectors, then plot the results as a heatmap either on the surface or volume of the brain.
The purpose is to be able to display the sensitivity maps of the electrodes, as in this example (coarse example not smoothed)
==>
These maps can be useful for estimating the sensitivity of an sEEG grid for example, and also for the brain stimulation purposes.
Currently, some users get similar maps with Ansys software (not dedicated to neuroscience), here is an example:
I have basic scripts, but not yet been adapted for Brainstorm.
The text was updated successfully, but these errors were encountered: