<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Hi Connor,</p>
<p><br>
</p>
<p>the TI.m saves the mesh with the TI field as
'ernie_TIenvelope.msh', which you can open in gmsh (see
<a class="moz-txt-link-freetext" href="https://simnibs.github.io/simnibs/build/html/tutorial/visualization.html">https://simnibs.github.io/simnibs/build/html/tutorial/visualization.html</a>
on an introduction on how to use it).</p>
<p><br>
</p>
<p>To get some more information on focality and peak field strength
in gray matter, you can add to the end of TI.m:<br>
</p>
<p><b>mesh_get_fieldpeaks_and_focality(mout,'field_idx',3);</b><br>
</p>
<p><br>
</p>
<p>To get a visualization of the regions in which the TI amplitude
exceeds a certain threshold, you can add:<br>
</p>
<p><br>
</p>
<p><b>% show regions exceeding 95 percentile</b><b><br>
</b><b>threshold = 0.143; % 95 percentile of the TI field in GM,
as printed by mesh_get_fieldpeaks_and_focality</b><b><br>
</b><b><br>
</b><b>tet_idx = mout.element_data{3}.tetdata>=threshold;</b><b><br>
</b><b>m_vis=mesh_extract_regions(mout,
'elemtype','tet','region_idx',2,'tet_idx', tet_idx);</b><b><br>
</b><b>TR =
triangulation(m_vis.tetrahedra,m_vis.nodes(:,1),m_vis.nodes(:,2),m_vis.nodes(:,3));</b><b><br>
</b><b>m_vis.triangles=freeBoundary(TR);</b><b><br>
</b><b>m_vis.triangle_regions=ones(size(m_vis.triangles,1),1)*1002;</b><b><br>
</b><b>mesh_show_surface(mout,'showSurface',true,'facealpha',0.4);
% show the whole cortex semi-transparent</b><b><br>
</b><b>mesh_show_surface(m_vis,'showSurface',true,'surfaceColor',[1
0 0],'haxis',gca); % add peak TI region in red </b><br>
</p>
<p><br>
</p>
<p><img src="cid:part1.502724A2.ACB11E13@drcmr.dk" alt=""
width="613" height="382"></p>
<p><br>
</p>
<p>I hope, these hints help a bit.</p>
<p><br>
</p>
<p>Best regards,</p>
<p>Axel</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 3/18/2021 5:49 AM, Moore, Connor
Joseph wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BL0PR02MB44016235D33680D0EAD515BAB3699@BL0PR02MB4401.namprd02.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
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
<a
href="https://mailman.drcmr.dk/pipermail/simnibs-discuss/2020-September/000084.html"
title="https://mailman.drcmr.dk/pipermail/simnibs-discuss/2020-September/000084.html"
moz-do-not-send="true">
email chain</a> 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.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Thank you for your time, and I hope to hear from you soon.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Connor</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Simnibs-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Simnibs-discuss@drcmr.dk">Simnibs-discuss@drcmr.dk</a>
<a class="moz-txt-link-freetext" href="https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss">https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Dr. Axel Thielscher
Associate Professor
Danish Research Center for Magnetic Resonance
Copenhagen University Hospital Hvidovre
DK-2650 Hvidovre, Denmark
<a class="moz-txt-link-abbreviated" href="http://www.drcmr.dk">www.drcmr.dk</a>
&
Department of Health Technology
Technical University of Denmark
DK-2800 Kgs. Lyngby
<a class="moz-txt-link-freetext" href="http://www.healthtech.dtu.dk/">http://www.healthtech.dtu.dk/</a></pre>
</body>
</html>