<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Monaco;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-fareast-language:EN-US;}
p.p1, li.p1, div.p1
{mso-style-name:p1;
margin:0cm;
background:black;
font-size:10.0pt;
font-family:Monaco;
color:#F2F2F2;}
span.s1
{mso-style-name:s1;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:Helvetica;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">Dear Axel,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">Thanks for this.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">I ended up finding a work around using the c3d command from itk-SNAP.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">Leaving it here in case it is useful for someone else.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">All the best,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">Ines<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Axel Thielscher <axelt@drcmr.dk><br>
<b>Date: </b>Monday, 14 December 2020 at 18:17<br>
<b>To: </b>Inês Violante <inesviolante@gmail.com>, simnibs-discuss@drcmr.dk <simnibs-discuss@drcmr.dk><br>
<b>Subject: </b>Re: [Simnibs-discuss] hippocampal segmentation to stl</span><span style="color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<p>Dear Ines,<o:p></o:p></p>
<p>the description in the simnibs documentation is not very clear, I am sorry for this. You can use nii2mesh -h to get a bit more information (not not much though). Please try calling it without the -ev.<o:p></o:p></p>
<p>Best regards,<o:p></o:p></p>
<p>Axel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/14/2020 12:51 PM, Inês Violante wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-family:Helvetica">Hi Axel,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Thanks for the quick reply.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica">I tried that but with no luck. See command line output below.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">nii2msh -ev TIDES_P2T_S1_FreeSf/TIDES_P2T_S1/mri/lHippocampus.nii.gz TIDES_P2T_S1.msh lHipp.msh</span><o:p></o:p></p>
<p class="p1"><span class="s1"> </span><o:p></o:p></p>
<p class="p1"><span class="s1">[ simnibs ]INFO: Creating tensor visualization</span><o:p></o:p></p>
<p class="p1"><span class="s1">Traceback (most recent call last):</span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">File "/Users/ines/Applications/SimNIBS-3.2/simnibs_env/lib/python3.7/site-packages/simnibs/cli/nii2msh.py", line 92, in <module></span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">main()</span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">File "/Users/ines/Applications/SimNIBS-3.2/simnibs_env/lib/python3.7/site-packages/simnibs/cli/nii2msh.py", line 71, in main</span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">aniso_tissues=[1, 2])</span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">File "/Users/ines/Applications/SimNIBS-3.2/simnibs_env/lib/python3.7/site-packages/simnibs/simulation/cond.py", line 173, in cond2elmdata</span><o:p></o:p></p>
<p class="p1"><span class="apple-converted-space"> </span><span class="s1">assert len(anisotropy_volume.shape) == 4</span><o:p></o:p></p>
<p class="p1"><span class="s1">AssertionError</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Could this be because the volume is smaller than the expected from the T1 mesh?
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica">All the best,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica">Ines</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica;color:black;mso-fareast-language:EN-GB">--</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica;color:black;mso-fareast-language:EN-GB">Dr Ines Violante<br>
Lecturer in Psychological Neuroscience <br>
School of Psychology | Faculty of Health and Medical Sciences<br>
Room 32 AC 04</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica;color:black;mso-fareast-language:EN-GB">University of Surrey | Guildford GU2 7XH</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica;mso-fareast-language:EN-GB"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Helvetica"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Axel Thielscher <a href="mailto:axelt@drcmr.dk">
<axelt@drcmr.dk></a><br>
<b>Date: </b>Friday, 11 December 2020 at 20:39<br>
<b>To: </b><a href="mailto:simnibs-discuss@drcmr.dk">simnibs-discuss@drcmr.dk</a>
<a href="mailto:simnibs-discuss@drcmr.dk"><simnibs-discuss@drcmr.dk></a>, <a href="mailto:inesviolante@gmail.com">
inesviolante@gmail.com</a> <a href="mailto:inesviolante@gmail.com"><inesviolante@gmail.com></a><br>
<b>Subject: </b>Re: [Simnibs-discuss] hippocampal segmentation to stl</span><o:p></o:p></p>
</div>
<p>Hi Ines,<o:p></o:p></p>
<p>when you open the nifti-file in freeview, is it then coregistered with the <subid>_T1fs_conform.nii.gz which headreco creates? If not, you can first run freesurfer and use the T1 and T2 which freesurfer stores as input to headreco.<o:p></o:p></p>
<p>You can then try the nii2msh tool, which puts the data from niftis into the mesh.
<o:p></o:p></p>
<p>Let us know in case you get stuck.<o:p></o:p></p>
<p>Best regards,<o:p></o:p></p>
<p>Axel<o:p></o:p></p>
<p> <o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/9/2020 6:40 PM, Inês Violante wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">Hello,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">I’ve just tried headreco and it is really cool.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">I would like to have a segmentation of the hippocampus in the same space as the meshes generated by headreco.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">I have the hippocampus segmentation from freesurfer aligned to the subject space. This is a .nii.gz file
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">How can I now convert this to stl and have it in the same space as the other meshes generated by headreco?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">Thank you in advance!</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">All the best,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Helvetica">ines</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-GB"><br>
<br>
<br>
</span><o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Simnibs-discuss mailing list<o:p></o:p></pre>
<pre><a href="mailto:Simnibs-discuss@drcmr.dk">Simnibs-discuss@drcmr.dk</a><o:p></o:p></pre>
<pre><a href="https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss">https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Dr. Axel Thielscher<o:p></o:p></pre>
<pre>Associate Professor<o:p></o:p></pre>
<pre>Danish Research Center for Magnetic Resonance<o:p></o:p></pre>
<pre>Copenhagen University Hospital Hvidovre<o:p></o:p></pre>
<pre>DK-2650 Hvidovre, Denmark<o:p></o:p></pre>
<pre><a href="http://www.drcmr.dk">www.drcmr.dk</a><o:p></o:p></pre>
<pre>&<o:p></o:p></pre>
<pre>Department of Health Technology<o:p></o:p></pre>
<pre>Technical University of Denmark<o:p></o:p></pre>
<pre>DK-2800 Kgs. Lyngby<o:p></o:p></pre>
<pre><a href="http://www.healthtech.dtu.dk/">http://www.healthtech.dtu.dk/</a><o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-GB">--></span><o:p></o:p></p>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Dr. Axel Thielscher<o:p></o:p></pre>
<pre>Associate Professor<o:p></o:p></pre>
<pre>Danish Research Center for Magnetic Resonance<o:p></o:p></pre>
<pre>Copenhagen University Hospital Hvidovre<o:p></o:p></pre>
<pre>DK-2650 Hvidovre, Denmark<o:p></o:p></pre>
<pre><a href="http://www.drcmr.dk">www.drcmr.dk</a><o:p></o:p></pre>
<pre>&<o:p></o:p></pre>
<pre>Department of Health Technology<o:p></o:p></pre>
<pre>Technical University of Denmark<o:p></o:p></pre>
<pre>DK-2800 Kgs. Lyngby<o:p></o:p></pre>
<pre><a href="http://www.healthtech.dtu.dk/">http://www.healthtech.dtu.dk/</a><o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-GB">--><o:p></o:p></span></p>
</div>
</body>
</html>