[Simnibs-discuss] Questions about changes in SimNIBS 4

Roch M. Comeau roch at rogue-research.com
Fri Jan 13 20:43:29 CET 2023


First of all, thank you for continuing to evolve this wonderful tool for the brain stimulation community! I am in the process of updating our navigator to support the changes in SimNIBS 4 and have a few questions. I hope this forum is the right place as others may have the same questions…

Background: Brainsight implemented some basic support for SimNIBS by adding some UI elements in the Targeting window to allow one to easily perform a simulation within the familiar workflow. The project is created by selecting the mesh file that is the output of the segmentation pipeline (charm as of 4.0) and we automatically load the mesh, separate the surfaces and append them to our reconstructions list, load the T1 MRI and the MNI transform. This allows the users to visualize the 3D surfaces in addition to the surfaces one would normally create in Brainsight. We added some UI elements in the target step including a popup to select the coil (from the SimNIBS list), the stimulation intensity and a simulate button. One creates a trajectory as they normally would (or a grid), enters the input parameters and clicks the simulate button. Brainsight writes a python script, invokes simnibs_python, waits for the results (asynchronous one day…) and adds the NIfTI interpolated volumes to the overlays and uses this to texture map all the surfaces as well as to draw the current direction arrows. In adapting to SimNIBS 4, I am encountering a few issues that someone might be able to help me with:

1: In earlier versions of SimNIBS, there was a registration to MNI space called “MNI2conform_12DOF.txt” in the “ToMNI” folder. This seems to not be there anymore. Was this removed, or do I need to add a flag to the script to generate this? This is not critical, but I wanted to ask.

2: The interpolated volumes (generated by adding “s.map_to_vol=True” to the script seem now to be masked to the grey matter. For us this is problematic for the texture mapping because we catch a lot of the 0 values adjacent to the mesh vertices. Was this s change, or is there a flag I am missing to have the interpolation for the whole brain volume (or  amore permissive mask)? The attached image shows the interpolated results on the 2D views as well as texture mapped on 2 versions of the grey matter. The bottom right is the original surface from the charm pipeline (extracted from the gmsh) and the upper left was generated from the tissue mask with a lot of smoothing which has the effect of eroding the surface a bit so the vertices are more reliably within the masked volume (so the texture map has fewer 0 values).

Thanks for any pointers anyone might be able to share.

Regards,

Roch 
— 
Roch M. Comeau, Ph.D.
President,
Rogue Research Inc.
6666 St-Urbain, Suite 300
Montreal, QC, Canada, H2S 3H1
Phone:(514)284-3888, Fax: (514)284-6750
roch at rogue-research.com <mailto:roch at rogue-research.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20230113/6806d73f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 37E61B6E-256C-4D33-9C8F-0C9CA17F5C5E.png
Type: image/png
Size: 893393 bytes
Desc: not available
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20230113/6806d73f/attachment-0001.png>


More information about the Simnibs-discuss mailing list