ncullen93 / mesh2nifti

Convert a .msh file in the simNIBS format to a .nii.gz file
4 stars 2 forks source link

mesh2nifti error #2

Closed ileunissen closed 7 years ago

ileunissen commented 7 years ago

First of all, thanks a lot for making this function publically available! It works like a charm for most of my participants, in a few however I get an error when trying to create the grey matter images (see file attached). The mesh itself looks fine, btw. Any idea what could cause this and how to solve it? Best, Inge

foutmelding

ncullen93 commented 7 years ago

hi there! thank you for the kind words. although it's impossible to know exactly the issue without your data, I've updated the code to be more robust to this error. it should work now. please let me know if there are any other issues :)

ileunissen commented 7 years ago

Hi, thanks for the prompt reply! I'm afraid the script now gets stuck somewhere after providing the coordinates on the screen (also for participants that previously worked). Let me know if you would like me to upload some one of the problematic cases to a dropbox for example. Best, Inge

ncullen93 commented 7 years ago

Yes Inge, if you upload the case to dropbox, I will make sure it runs. Sorry about this..

ileunissen commented 7 years ago

https://www.dropbox.com/sh/ahg52mnx3c4lifw/AABV6LCQ0GaaN_pip9__AjMta?dl=0

ncullen93 commented 7 years ago

Ok, I found the specific corner case issue and fixed it. I heavily tested this new version on various inputs. I also updated the code to have a progress bar instead of printing out x% . I am certain this works now (see attached nifti file of the mesh you uploaded). It may seem like it's hanging but that's just because the middle part of the loop takes longer than the beginning/end. It took ~7.5 minutes to convert this file on my computer.

nifti_mesh.nii.gz

Nick

ileunissen commented 7 years ago

It works! Thanks a lot!