SKULLSTRIP(1)

πŸ“¦
version 4.6.2 Β· 2 versions
, in fedora 43

πŸ’€βœ¨ SKULLSTRIP βœ¨πŸ’€

ok so this is the skullstrip page from the Generated Python Manual, and bestie, it's giving "delete the skull, keep the brain" energy and honestly? iconic. πŸ’…


🌸 SYNOPSIS 🌸

skullstrip [-h] [-p LABEL [LABEL ...]] [-m PATTERN] [-o DESTINATION
[DESTINATION ...]] [-f] [-a ARGS] [-c [SPECS]] bidsfolder pattern

🧠 DESCRIPTION 🧠

It's a lil wrapper around FreeSurfer's synthstrip skull stripping tool (<https://surfer.nmr.mgh.harvard.edu/docs/synthstrip>). Not a link in the "click me" sense but you get it, that's the docs URL, go read it.

Except for BIDS inheritances, this wrapper is BIDS-aware (a bidsapp) and writes BIDS compliant output. no cap, it plays by the BIDS rules. πŸŽ€

The corresponding brain mask gets saved in the bids/derivatives/synthstrip folder. that's where the mask lives now, periodt.

Assumes the installation of FreeSurfer v7.3.2 or higher β€” like, if you're on an older one, this is not the vibe, upgrade bestie. 🫢

bidsfolder The bids-directory with the subject data. it's the folder, it's got the subjects, that's the whole thing. 🌈

pattern Globlike search pattern (relative to the subject/session folder) to select the (3D) images that need to be skullstripped, e.g. 'anat/*_T1w*'. so like, you glob it, it picks the pics, we strip the skulls. ✨


πŸ’… OPTIONS πŸ’…

  • -p LABEL [LABEL ...], --participant LABEL [LABEL ...] β€” Space separated list of sub-# identifiers to be processed (the sub- prefix can be left out, so you can be lazy, it's fine πŸ’–). If not specified then all participants will be processed. everyone's getting the treatment. πŸ‘‘
  • -m PATTERN, --masked PATTERN β€” Globlike search pattern (relative to the subject/session folder) to select additional (3D/4D) images from the same space that need to be masked with the same mask, e.g. 'fmap/*_phasediff'. same mask, more images, efficient queen behaviour. πŸ¦‹ NB: This option can only be used if pattern yields a single file per session. one file per session or it simply does not work, no exceptions.
  • -o DESTINATION [DESTINATION ...], --output DESTINATION [DESTINATION ...] β€” One or two output strings that determine where the skullstripped + additional masked images are saved. Each output string can be the name of a BIDS datatype folder, such as 'anat', or of the derivatives folder, i.e. 'derivatives' (default). ✨ If the output string is the same as the datatype then the original images are replaced by the skullstripped images. ⚠️ like, replaced replaced. heads up.
  • -f, --force β€” Process images, regardless whether images have already been skullstripped (i.e. if {'SkullStripped': True} in the json sidecar file). it doesn't care that you already did it, it's doing it again. main character energy. πŸ”₯
  • -a ARGS, --args ARGS β€” Additional arguments that are passed to synthstrip. NB: Use quotes and include at least one space character to prevent premature parsing. quotes + a space, bestie, or the parser gets confused and we all cry. 😭
  • -c [SPECS], --cluster [SPECS] β€” Use the DRMAA library to submit the skullstrip jobs to a high-performance compute (HPC) cluster. πŸš€ You can add an opaque DRMAA argument with native specifications for your HPC resource manager. NB: Use quotes and include at least one space character to prevent premature parsing β€” see examples. same deal as before: quotes, space, or chaos. πŸ’€

πŸ“ COMMENTS πŸ“

examples, aka the receipts:

skullstrip myproject/bids anat/*_T1w*
skullstrip myproject/bids anat/*_T1w* -p 001 003 -a " --no-csf"
skullstrip myproject/bids fmap/*_magnitude1* -m fmap/*_phasediff* -o
extra_data fmap
skullstrip myproject/bids fmap/*_acq-mylabel*_magnitude1* -m
fmap/*_acq-mylabel_* -o fmap
ok notice how in example two the -a value starts with a space inside the quotes? and in example three the -o line wraps onto extra_data fmap? that's the "include at least one space character" thing in action, don't @ me, that's just how it is. πŸ™ˆ

🌟 AUTHOR 🌟

Marcel Zwiers <m.zwiers@donders.ru.nl> β€” the legend who wrote this, respect. πŸ’œ


and that's the whole page bestie!! πŸŽ€ the footer said it's bidscoin 4.6.2 and it's dated 2025-11-06, so yeah, that's the version and the date, slay, go strip some skulls, you got this πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from