<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.xxxmsonormal, li.xxxmsonormal, div.xxxmsonormal
{mso-style-name:x_x_xmsonormal;
margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=DA link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=FI>Hi Dennis,<o:p></o:p></span></p><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><p class=MsoNormal><span lang=FI>I’m guessing there’s something strange about either the orientation and/or the header of the image. <o:p></o:p></span></p><p class=MsoNormal><span lang=FI>Does the ouput from SPM (the tissue masks) look okay?<o:p></o:p></span></p><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><p class=MsoNormal><span lang=FI>If it’s possible for you to share the image I can have a look at it. In case you can share the image, maybe best not to send it to Simnibs-discuss. <o:p></o:p></span></p><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><p class=MsoNormal><span lang=FI>Best,<br>Oula</span></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='border:none;padding:0cm'><b>Lähettäjä: </b><a href="mailto:d.j.l.g.schutter@uu.nl">Schutter, D.J.L.G. (Dennis)</a><br><b>Lähetetty: </b>22. april 2021 09:15<br><b>Vastaanottaja: </b><a href="mailto:discuss@simnibs.org">discuss@simnibs.org</a><br><b>Aihe: </b>[Simnibs-discuss] Error value “axes don't match array”</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Dear SimNIBS,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>First of all, thank you for the amazing program.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=xxxmsonormal><span lang=EN-US>I am struggling with creating a mesh (using headreco all) based on a NIFTI file that I converted from DICOM (with </span><span lang=EN-US style='font-size:11.5pt;font-family:"Arial",sans-serif;color:#404040;background:white'>dicm2nii)</span><span lang=EN-US>. While the first steps few steps in Matlab run successful, I get the error value “axes don't match array” at the start of <b>Binarizing tissue probability maps</b> and program terminates (see below for complete message). When I run headreco all with Ernie’s NIFTI file the headreco all it works fine, so I guess something went wrong with the conversion, but I cannot put my finger on the problem. The scan is a standard 3T scan: voxel dimensions: 1x1x1mm and image (XYZ) dimensions: 192x256x256, and the NIFTI scan looks fine in MRICRO and MANGO. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I hope you can help me. Thank you very much for your valuable time and I look forward to hearing from you.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Best wishes,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Dennis<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=xxxmsonormal><b><span lang=EN-US>Binarizing tissue probability maps</span></b><span lang=EN-US><o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US>Creating unity.xfm and ref_FS.nii.gz<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US>Traceback (most recent call last):<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\cli\headreco.py", line 13, in <module><o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> main()<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\cli\headreco.py", line 10, in main<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> headmodel(sys.argv)<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\msh\headreco.py", line 286, in headmodel<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> hmu.write_ref_fs(vols_conform[0])<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\msh\hmutils.py", line 3454, in write_ref_fs<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> data = np.transpose(np.zeros_like(vol.get_data()),(0,2,1))<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\numpy\core\fromnumeric.py", line 639, in transpose<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> return _wrapfunc(a, 'transpose', axes)<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\numpy\core\fromnumeric.py", line 56, in _wrapfunc<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> return getattr(obj, method)(*args, **kwds)<o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US> <o:p></o:p></span></p><p class=xxxmsonormal><span lang=EN-US>ValueError: axes don't match array<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>