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

Any smriprep fix for Freesurfer 7.3.2 FLAIR Pial Surface placement bug? #414

Open
nordicpioneer opened this issue Feb 15, 2024 · 3 comments
Labels
freesurfer FreeSurfer related improvements and issues

Comments

@nordicpioneer
Copy link

nordicpioneer commented Feb 15, 2024

Hi! I was made aware of the FLAIR Pial Surface placement bug reported by the freesurfer devs. This bug was not pathed until version 7.4.0, while smriprep is still using version 7.3.2.

Are there any plans to fix this bug/update to version 7.4.0 in the near future? We are currently considering using fMRIPrep/smriprep with FLAIR for surface refinement in our preprocessing plan, but need this issue answered before we proceed.

According to the release notes an alternative to upgrading to version 7.4.0 is to supply expert options via a global-expert-option.txt file:

Pial surface placement with FLAIR images has a bug which has existed since the start of version 7. This bug causes the pial surface to not extend nearly far enough. This has been fixed in the development version and so will be present in the next version. You can fix it in previous v7 releases by creating (or adding to) $SUBJECTS_DIR/global-expert-options.txt with this line "PlaceMMPialSurf --mm_min_inside 50 --mm_max_inside 200 --mm_min_outside 10 --mm_max_outside 50

Is this somehow possible by suppling extra flags with smriprep/fmriprep?

@effigies
Copy link
Member

If there's an easy patch to make sure 7.3.2 behaves better, that would be good.

I'm currently a bit hesitant to upgrade to 7.4 in our Docker images, as it increases the size of Docker images by several hundred megabytes and I haven't had time to go through it and see what we can safely exclude from the installation.

Is this somehow possible by suppling extra flags with smriprep/fmriprep?

This is possible by just pre-populating the subjects directory with a global-expert-option.txt file. The directory can be provided with the --fs-subjects-dir, or else it will be generated in the output directory. fMRIPrep will create it in $OUTPUT/sourcedata/freesurfer, while I believe sMRIPrep still creates it in $OUTPUT/freesurfer.

@effigies
Copy link
Member

Here's where we validate/create a FreeSurfer subjects directory:

https://github.com/nipreps/niworkflows/blob/b1e9c5d771cf813d2c652724cead8303d34e657b/niworkflows/interfaces/bids.py#L895-L980

If we check the FreeSurfer version and it's at least 7 but less than 7.4, then we could add this file ourselves.

@nordicpioneer
Copy link
Author

Thanks! We will try this.

This is possible by just pre-populating the subjects directory with a global-expert-option.txt file. The directory can be provided with the --fs-subjects-dir, or else it will be generated in the output directory. fMRIPrep will create it in $OUTPUT/sourcedata/freesurfer, while I believe sMRIPrep still creates it in $OUTPUT/freesurfer.

@effigies effigies added the freesurfer FreeSurfer related improvements and issues label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
freesurfer FreeSurfer related improvements and issues
Projects
None yet
Development

No branches or pull requests

2 participants