Hi all,
I'd like to solicit input for the Python interface to .mgh/.mgz files in nibabel[0].
I've recently had cause to dig into this interface (MGHImage[1]), and found that the naming of header fields[2] (analogous to variable names in C structs) is inconsistent with all of my experience with how FreeSurfer refers to these fields in the code (MRI_IMAGE[3]) as well as in the outputs of many programs, such as mri_info. (In fact, the current names seem to reflect the intermediate variables used in load/save_mgh.m and the description of the affine transforms in the FS Coordinates powerpoints[4].)
I'm proposing (https://github.com/nipy/nibabel/pull/569) an API change in nibabel, with field names[5] that more closely reflect what I deem to be common FreeSurfer usage (although it does not adhere precisely to the C structure fields). Given that, it was felt that the FreeSurfer community more broadly should have some say in the final API. To put a few specific questions: Do you depend on the current MGHHeader field names? Would you be averse to updating the field names? If not, are there alternatives to my proposal you would find preferable?
While I would be willing to discuss in more detail on this list, I don't want to needlessly pollute a support list with discussions of a third party API. If it's convenient, I would prefer responses on the pull request linked above.
Thanks, Chris Markiewicz
[0] http://nipy.org/nibabel/ [1] https://github.com/nipy/nibabel/blob/master/nibabel/freesurfer/mghformat.py [2] https://github.com/nipy/nibabel/blob/2139ce0d24e65a83295bb6b3eaaf005eaeaebb5... [3] https://github.com/freesurfer/freesurfer/blob/master/include/mri.h#L157-L252 [4] https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems [5] https://github.com/effigies/nibabel/blob/55c9bf905ec8785617755f900635fc31bae...