[Simnibs-discuss] Error value “axes don't match array”

Oula oulap at drcmr.dk
Tue May 4 10:01:06 CEST 2021


Hi Dennis,

I’m guessing there’s something strange about either the orientation and/or the header of the image. 
Does the ouput from SPM (the tissue masks) look okay?

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. 

Best,
Oula

Lähettäjä: Schutter, D.J.L.G. (Dennis)
Lähetetty: 22. april 2021 09:15
Vastaanottaja: discuss at simnibs.org
Aihe: [Simnibs-discuss] Error value “axes don't match array”

Dear SimNIBS,

First of all, thank you for the amazing program.

I am struggling with creating a mesh (using headreco all) based on a NIFTI file that I converted from DICOM (with dicm2nii). While the first steps few steps in Matlab run successful, I get the error value “axes don't match array” at the start of Binarizing tissue probability maps 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. 

I hope you can help me. Thank you very much for your valuable time and I look forward to hearing from you.

Best wishes,
Dennis

Binarizing tissue probability maps
 
Creating unity.xfm and ref_FS.nii.gz
Traceback (most recent call last):
  File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\cli\headreco.py", line 13, in <module>
    main()
 
  File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\cli\headreco.py", line 10, in main
    headmodel(sys.argv)
 
  File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\msh\headreco.py", line 286, in headmodel
    hmu.write_ref_fs(vols_conform[0])
 
  File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\simnibs\msh\hmutils.py", line 3454, in write_ref_fs
    data   = np.transpose(np.zeros_like(vol.get_data()),(0,2,1))
 
  File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\numpy\core\fromnumeric.py", line 639, in transpose
    return _wrapfunc(a, 'transpose', axes)
 
  File "C:\Users\schut103\SimNIBS-3.2\simnibs_env\lib\site-packages\numpy\core\fromnumeric.py", line 56, in _wrapfunc
    return getattr(obj, method)(*args, **kwds)
 
ValueError: axes don't match array


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20210504/e86695d4/attachment.html>


More information about the Simnibs-discuss mailing list