[Neuroimaging] Reading FreeSurfer m3z files?

Matthew Brett matthew.brett at gmail.com
Tue Feb 26 09:11:49 EST 2019


Hi,

On Tue, Feb 26, 2019 at 1:16 PM Tim Schäfer <ts+ml at rcmd.org> wrote:
>
> Dear list,
>
> I have attached a Python/numpy function that works like the Matlab function 'mris_read_m3z' from the official FreeSurfer repo (https://github.com/freesurfer/freesurfer/blob/dev/matlab/mris_read_m3z.m) at the end of this email.
>
> My latest version is always 'read_m3z_file' in https://github.com/dfsp-spirit/brainload/blob/master/src/brainload/freesurferdata.py
>
> There is a unit test called 'test_read_m3z_file' in https://github.com/dfsp-spirit/brainload/blob/master/tests/brainload/test_freesurferdata.py. The values which are checked in the unit test have been retrieved by running the Matlab implementation linked above on my example m3z file (the file is also in the brainload repo, see the test).
>
> The current implementation does not convert the result to double (like the Matlab implementation does), and the order of the return values is different. Most likely it's not the most beautiful implementation as I'm rather new to numpy, but it works. Feel free to use it/improve it/whatever (license is MIT).
>

Did you base your code on the Freesurfer version?  I guess then you
have to license under their license?

https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense

Cheers,

Matthew


More information about the Neuroimaging mailing list