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

NEW: Add support for FSL version 6.0.6 onwards #527

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

ghisvail
Copy link
Contributor

@ghisvail ghisvail commented Mar 31, 2023

My initial attempts at building a container image for FSL (which lead to #523) failed, as the FSL installer gets stuck to 0% during stage 2 according to the logs. I gave up and decided to spend my efforts contributing a working image for 6.0.6+ instead.

Closes #524

@djarecka
Copy link
Member

I will wait for @kaczmarj review of this, but can I ask you to also update the user_guide to provide an updated list of available versions (search --fsl).

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (19b6a94) 88.77% compared to head (8f8161f) 88.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #527   +/-   ##
=======================================
  Coverage   88.77%   88.77%           
=======================================
  Files          11       11           
  Lines        1033     1033           
=======================================
  Hits          917      917           
  Misses        116      116           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ghisvail
Copy link
Contributor Author

ghisvail commented Mar 31, 2023

To test:

cd neurdocker
pipx install --force .
neurodocker generate docker -p apt -b ubuntu:latest --fsl version=6.0.6.4 > fsl-6.0.6.4.Dockerfile
podman build --tag fsl:6.0.6.4 --file fsl-6.0.6.4.Dockerfile

After a very long installation process, this is the log you should be getting:

Installing FSL ...
FSL installer version: 3.5.0
Press CTRL+C at any time to cancel installation
Running the installer script as root user is discouraged! You should run this script as a regular user - you will be asked for your administrator password if required.
Installation log file: /tmp/fslinstaller_suvwhm5s.log

FSL 6.0.6.4 selected for installation
Downloading FSL environment specification from https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fsl-6.0.6.4_linux-64.yml...

Installing FSL in /opt/fsl-6.0.6.4

Downloading miniconda from https://github.com/conda-forge/miniforge/releases/download/22.11.1-4/Mambaforge-22.11.1-4-Linux-x86_64.sh...
[#############################################################] 85.0 / 85.0 MB |
Installing miniconda at /opt/fsl-6.0.6.4...
[################################################################] 100 / 100 % |
Installing FSL into /opt/fsl-6.0.6.4...
[################################################################] 100 / 100 % |

FSL successfully installed
$ podman run -it --rm fsl:6.0.6.4 bet -h

Usage:    bet <input> <output> [options]

Main bet2 options:
  -o          generate brain surface outline overlaid onto original image
  -m          generate binary brain mask
  -s          generate approximate skull image
  -n          don't generate segmented brain image output
  -f <f>      fractional intensity threshold (0->1); default=0.5; smaller values give larger brain outline estimates
  -g <g>      vertical gradient in fractional intensity threshold (-1->1); default=0; positive values give larger brain outline at bottom, smaller at top
  -r <r>      head radius (mm not voxels); initial surface sphere is set to half of this
  -c <x y z>  centre-of-gravity (voxels not mm) of initial mesh surface.
  -t          apply thresholding to segmented brain image and mask
  -e          generates brain surface as mesh in .vtk format

Variations on default bet2 functionality (mutually exclusive options):
  (default)   just run bet2
  -R          robust brain centre estimation (iterates BET several times)
  -S          eye & optic nerve cleanup (can be useful in SIENA - disables -o option)
  -B          bias field & neck cleanup (can be useful in SIENA)
  -Z          improve BET if FOV is very small in Z (by temporarily padding end slices)
  -F          apply to 4D FMRI data (uses -f 0.3 and dilates brain mask slightly)
  -A          run bet2 and then betsurf to get additional skull and scalp surfaces (includes registrations)
  -A2 <T2>    as with -A, when also feeding in non-brain-extracted T2 (includes registrations)

Miscellaneous options:
  -v          verbose (switch on diagnostic messages)
  -h          display this help, then exits
  -d          debug (don't delete temporary intermediate images)

@ghisvail
Copy link
Contributor Author

I was able to run the defacing pipeline in pydra-deface using Pydra tasks calling FSL via this container image.

@kaczmarj
Copy link
Collaborator

this looks great to me, thanks @ghisvail !

@kaczmarj kaczmarj merged commit 80e7cf4 into ReproNim:master Mar 31, 2023
@ghisvail ghisvail deleted the fsl/new-installer branch March 31, 2023 14:40
@kaczmarj kaczmarj mentioned this pull request May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ensure FSL 6.0.6 installation works
3 participants