<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p><br>
</p>
<p>I have just added this to the standard output for the next
SimNIBS version. If you want to calculate this now, you will have
to:</p>
<p>1. Determine the coil position, for example in the GUI or looking
at the last row of the <i>matsimnibs</i> matrix, in the SimNIBS
output</p>
<p>2. Load the mesh in python or matlab</p>
<p>3. Calculate the distances between the gray matter surface
triangles (tag 1002) and the coil in python or matlab.</p>
<p>For steps 2-3, these functions might help:</p>
<p>MATLAB: <i>mesh_load_gmsh4 </i>to load the mesh, <i><span
class="pl-en">mesh_extract_regions</span></i> <span
class="pl-en">to get the gray matter surface, and </span><i><span
class="pl-en">mesh_get_triangle_centers </span></i><span
class="pl-en">to calculate the positions of the tiangles</span><br>
<i></i></p>
<p>PYTHON: <i>mesh = simnibs.read_msh</i> to load the mesh, <i>mesh.crop_mesh
</i>to get the gray matter surface, and <i>mesh.elements_baricenters</i>()[:]
to calculate the positions of the triangles.</p>
<p><br>
</p>
<p>Best Regards,</p>
<p>Guilherme</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 11/06/2020 19.39, Giacomo Bertazzoli
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAABHSLhw9E=V0TXjKmnsGdvj8WEp6FvHHpOJ75N_w2Y--CUeqQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Dear all,
<div><br>
</div>
<div>I am trying to extract the information about the scalp to
cortex distance under the TMS coil. </div>
<div>After I have defined the position of the coil on the scalp
(by either coordinate or electrode position), is there a way
to calculate the distance between that position on the scalp
and its projection on the cortical surface?</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>Giacomo<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Giacomo Bertazzoli, PhD Candidate</div>
<div>Cognition Neurostimulation & Connectivity Lab
- CIMeC</div>
<div>University of Trento, Corso Bettini 31, 38068
Rovereto (TN) Italy</div>
<div>Email: <a
href="mailto:giacomo.bertazzoli@unitn.it"
target="_blank" moz-do-not-send="true">giacomo.bertazzoli@unitn.it</a></div>
<div><a
href="https://webapps.unitn.it/du/en/Persona/PER0194098"
target="_blank" moz-do-not-send="true">https://webapps.unitn.it/du/en/Persona/PER0194098</a></div>
</div>
</div>
</div>
</div>
</div>
</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>
</body>
</html>