Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support proprietary FreeSurfer mesh transforms #675

Closed
neurolabusc opened this issue Aug 27, 2023 · 0 comments
Closed

Support proprietary FreeSurfer mesh transforms #675

neurolabusc opened this issue Aug 27, 2023 · 0 comments

Comments

@neurolabusc
Copy link
Collaborator

Previous neurostars and NiiVue issues noted that FreeSurfer uses proprietary transforms for the open GIfTI format. It turns out that the internal proprietary FreeSurfer mesh format also stores transforms in a footer. While it is understandable that proprietary formats may include private featues, this footer is ignored by popular tools like bioelectromagnetism and spm.

nibabel can read these footers. For example, to read the RAS translation from the central voxel to the RAS center of the image (aka Pxyz_c) with Python:

import nibabel as nb
fsh = nb.freesurfer.io.read_geometry('lh.pial',True)
fsh[2]['cras']

If one loads a FreeSurfer mesh onto a FreeSurfer voxel based image, one must apply the same transform to both. Since NiiVue applies this tranform to voxels, it must also read the undocumented footer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants