[Simnibs-discuss] TI Simulation Visualization with SimNIBS

Axel Thielscher axelt at drcmr.dk
Tue Apr 6 19:53:58 CEST 2021


Hi Connor,


the TI.m saves the mesh with the TI field as 'ernie_TIenvelope.msh', 
which you can open in gmsh (see 
https://simnibs.github.io/simnibs/build/html/tutorial/visualization.html 
on an introduction on how to use it).


To get some more information on focality and peak field strength in gray 
matter, you can add to the end of TI.m:

*mesh_get_fieldpeaks_and_focality(mout,'field_idx',3);*


To get a visualization of the regions in which the TI amplitude exceeds 
a certain threshold, you can add:


*% show regions exceeding 95 percentile**
**threshold = 0.143; % 95 percentile of the TI field in GM, as printed 
by mesh_get_fieldpeaks_and_focality**
**
**tet_idx = mout.element_data{3}.tetdata>=threshold;**
**m_vis=mesh_extract_regions(mout, 
'elemtype','tet','region_idx',2,'tet_idx', tet_idx);**
**TR = 
triangulation(m_vis.tetrahedra,m_vis.nodes(:,1),m_vis.nodes(:,2),m_vis.nodes(:,3));**
**m_vis.triangles=freeBoundary(TR);**
**m_vis.triangle_regions=ones(size(m_vis.triangles,1),1)*1002;**
**mesh_show_surface(mout,'showSurface',true,'facealpha',0.4); % show the 
whole cortex semi-transparent**
**mesh_show_surface(m_vis,'showSurface',true,'surfaceColor',[1 0 
0],'haxis',gca); % add peak TI region in red *



I hope, these hints help a bit.


Best regards,

Axel


On 3/18/2021 5:49 AM, Moore, Connor Joseph wrote:
> Hello,
>
> I'm Connor Moore, an undergraduate at the Pennsylvania State 
> University, and I'm currently investigating the potential use of 
> temporal interference to treat Parkinson's Disease patients. After 
> looking on the discussion board, I found a helpful email chain 
> <https://mailman.drcmr.dk/pipermail/simnibs-discuss/2020-September/000084.html> that 
> contained a script that calculates the stimulation caused by TI with a 
> given electrode configuration. This script has been excellent for 
> giving me an estimate of the general area of the brain that will be 
> stimulated, but I was wondering if it would be possible to create a 3D 
> visualization of this data similar to the output of the tDCS example 
> scripts.
>
> Thank you for your time, and I hope to hear from you soon.
>
> Regards,
> Connor
>
> _______________________________________________
> Simnibs-discuss mailing list
> Simnibs-discuss at drcmr.dk
> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss

-- 
Dr. Axel Thielscher
Associate Professor
Danish Research Center for Magnetic Resonance
Copenhagen University Hospital Hvidovre
DK-2650 Hvidovre, Denmark
www.drcmr.dk
&
Department of Health Technology
Technical University of Denmark
DK-2800 Kgs. Lyngby
http://www.healthtech.dtu.dk/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20210406/b85a1c12/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpnblbngfbekglia.png
Type: image/png
Size: 835051 bytes
Desc: not available
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20210406/b85a1c12/attachment-0001.png>


More information about the Simnibs-discuss mailing list