gallantlab / pycortex

Pycortex is a python-based toolkit for surface visualization of fMRI data
https://gallantlab.github.io/pycortex
BSD 2-Clause "Simplified" License
581 stars 137 forks source link

align.automatic and freesurfer.import_subj integration #126

Closed rfarouni closed 9 years ago

rfarouni commented 9 years ago

When I run align.automatic after I import a subject from Freesurfer, pycortex runs FSL to generate a brain mask, a white matter mask, and a segemented brain. But are these steps needed If Freesurfer has generated the required files already, namely, brainmask.mgz (or brain.mgz), wm.mgz, and filled.mgz according to this list. Is there a reason they are not imported by import_subj function?

Thanks

jamesgao commented 9 years ago

This is due to extremely peculiar behavior behind FSL's FLIRT command. We have tried to import the brainmask and white matter masks from Freesurfer, but it severely broke the coregistration. There's an open issue, #123 that wishes to integrate Freesurfer's bbregister command. However, I haven't had the time to validate its operation.

In any case, FLIRT works extremely well with the auto-generated masks from BET. Since the brain masks are cached, it only takes a bit longer the first time you run it for that reference image.