Qsm_sstv pipeline brain mask

Hi @akuurstr , I was wondering how to get the qsm_sstv pipeline to skip fsl bet and use a custom brain mask instead ?

To summarize the qsm_sstv help, if you are processing a single subject the easiest way to use a custom mask is to use the flags:
--brain_extract_method SINGLE_SUBJECT_FULL_PATH
--single_subject_custom_mask /full/path/to/custom/mask

Note that a bids pattern matching is also available, but it is old and outdated. The pipeline was created as BIDS was being introduced and before we were using bids derivatives, so it is programmed to perform a pattern match in the subject’s raw bids anat folder instead of in a derivatives folder.
As an example, if you use the flags:
--brain_extract_method BIDS
--mask_match_pattern *brain_mask*

Then the program will search the folder bids_dir/sub-XX/anat/ for a file that has the substring “brain_mask” and use it as the custom mask.

For convenience, I’ve copied the help descriptions for the relevant flags below:

--brain_extract_method
choices: BET, BIDS, SINGLE_SUBJECT_FULL_PATH

BET introduces an FSL BET node into the pipeline. BIDS finds a precomputed mask in the BIDS directory using the mask_match_pattern parameter. SINGLE_SUBJECT_FULL_PATH finds a precomputed mask using the single_subject_custom_mask parameter.

--mask_match_pattern

Pattern used to match brain mask images in BIDS anat folder (leave file extension out of pattern). Must also set brain_extract_method parameter appropriately.The pattern may contain simple shell-style wildcards. However, filenames starting with a dot are special cases that are not matched by ‘*’ and ‘?’ patterns.

--single_subject_custom_mask

Provide the full path to a custom brain mask in order to override BET node. Must also set brain_extract_method appropriately. Only use this option when processing a single subject.