<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Dear Ines,</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.<br>
    </p>
    <p>Best regards,</p>
    <p>Axel<br>
    </p>
    <div class="moz-cite-prefix">On 12/14/2020 12:51 PM, Inês Violante
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:LOYP123MB34077AE205CF4CF2FAF9344AAFC70@LOYP123MB3407.GBRP123.PROD.OUTLOOK.COM">
      <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;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-family:Helvetica">Hi
            Axel,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica">Thanks
            for the quick reply.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica">I tried
            that but with no luck. See command line output below.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></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<o:p></o:p></span></p>
        <p class="p1"><span class="s1"><o:p> </o:p></span></p>
        <p class="p1"><span class="s1">[ simnibs ]INFO: Creating tensor
            visualization</span></p>
        <p class="p1"><span class="s1">Traceback (most recent call
            last):</span></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></p>
        <p class="p1"><span class="apple-converted-space">    </span><span
            class="s1">main()</span></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></p>
        <p class="p1"><span class="apple-converted-space">    </span><span
            class="s1">aniso_tissues=[1, 2])</span></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></p>
        <p class="p1"><span class="apple-converted-space">    </span><span
            class="s1">assert len(anisotropy_volume.shape) == 4</span></p>
        <p class="p1"><span class="s1">AssertionError</span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica">Could
            this be because the volume is smaller than the expected from
            the T1 mesh?
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica">All the
            best,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica">Ines<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:Helvetica;color:black;mso-fareast-language:EN-GB">--<o:p></o:p></span></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<o:p></o:p></span></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<o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:Helvetica;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
        </div>
        <p class="MsoNormal"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="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
              <a class="moz-txt-link-rfc2396E" 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 class="moz-txt-link-abbreviated" href="mailto:simnibs-discuss@drcmr.dk">simnibs-discuss@drcmr.dk</a>
              <a class="moz-txt-link-rfc2396E" href="mailto:simnibs-discuss@drcmr.dk"><simnibs-discuss@drcmr.dk></a>, <a class="moz-txt-link-abbreviated" href="mailto:inesviolante@gmail.com">inesviolante@gmail.com</a>
              <a class="moz-txt-link-rfc2396E" href="mailto:inesviolante@gmail.com"><inesviolante@gmail.com></a><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>Hi Ines,</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.</p>
        <p>You can then try the nii2msh tool, which puts the data from
          niftis into the mesh.
        </p>
        <p>Let us know in case you get stuck.</p>
        <p>Best regards,</p>
        <p>Axel</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></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica"> </span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica">I’ve just
              tried headreco and it is really cool.</span></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></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></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica"> </span></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></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica"> </span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica">Thank you
              in advance!</span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica"> </span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica">All the
              best,</span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica"> </span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;font-family:Helvetica">ines</span></p>
          <p class="MsoNormal"> </p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;mso-fareast-language:EN-GB"><br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________</pre>
          <pre>Simnibs-discuss mailing list</pre>
          <pre><a href="mailto:Simnibs-discuss@drcmr.dk" moz-do-not-send="true">Simnibs-discuss@drcmr.dk</a></pre>
          <pre><a href="https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss" moz-do-not-send="true">https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss</a></pre>
        </blockquote>
        <pre>-- </pre>
        <pre>Dr. Axel Thielscher</pre>
        <pre>Associate Professor</pre>
        <pre>Danish Research Center for Magnetic Resonance</pre>
        <pre>Copenhagen University Hospital Hvidovre</pre>
        <pre>DK-2650 Hvidovre, Denmark</pre>
        <pre><a href="http://www.drcmr.dk" moz-do-not-send="true">www.drcmr.dk</a></pre>
        <pre>&</pre>
        <pre>Department of Health Technology</pre>
        <pre>Technical University of Denmark</pre>
        <pre>DK-2800 Kgs. Lyngby</pre>
        <pre><a href="http://www.healthtech.dtu.dk/" moz-do-not-send="true">http://www.healthtech.dtu.dk/</a></pre>
        <p class="MsoNormal"><span
            style="font-size:11.0pt;mso-fareast-language:EN-GB">--><o:p></o:p></span></p>
      </div>
    </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>