freesurfer / surfa

Python utilities for medical image and surface-based analysis
27 stars 9 forks source link

Use default spacing 1 for compatibility with FreeSurfer. #26

Closed mu40 closed 7 months ago

yhuang43 commented 7 months ago

Jackson/Avnish, the change is to make sure the output warp.mgz works with 'mri_convert -at' - the spacing is expected to be non-zero.

jnolan14 commented 7 months ago

Just to make sure I under stand the reason for this change, this is so the character spacing in the header will match what is expected by 'mri_convert -at ...', correct?

yhuang43 commented 7 months ago

The spacing corresponds to the 'spacing' field in struct GCA_MORPH (defined in include/gcamorph.h). It can't be 0.

This is the fix on Freesurfer side when it reads warp.mgz - https://github.com/freesurfer/freesurfer/commit/f5cb17a8fc0a1b880dcb02be8e4d0889836dd01a

The PR is to fix on Surfa when it outputs warp.mgz

avnishks commented 7 months ago

Looks good to me.

jnolan14 commented 7 months ago

Thanks for the info, Yujing!