Skip to content

Commit

Permalink
Merge pull request #2983 from MRtrix3/dwibiasnormmask_maskalgo_fix
Browse files Browse the repository at this point in the history
dwibiasnormmask: Fix masking algorithm selection
  • Loading branch information
Lestropie authored Sep 2, 2024
2 parents 769a4ca + abf0985 commit 7817fda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/mrtrix3/commands/dwibiasnormmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def execute(): #pylint: disable=unused-variable
app.console(f'Default "{MASK_ALGO_DEFAULT}" algorithm will be used for brain masking during iteration')

# Check mask algorithm, including availability of external software if necessary
for mask_algo, software, command in [('fslbet', 'FSL', 'bet'), ('hdbet', 'HD-BET', 'hd-bet'), ('synthstrip', 'FreeSurfer', 'mri_synthstrip')]:
if app.ARGS.mask_algo == mask_algo and not shutil.which(command):
for algo, software, command in [('fslbet', 'FSL', 'bet'), ('hdbet', 'HD-BET', 'hd-bet'), ('synthstrip', 'FreeSurfer', 'mri_synthstrip')]:
if mask_algo == algo and not shutil.which(command):
raise MRtrixError(f'{software} command "{command}" not found; cannot use for internal mask calculations')

app.activate_scratch_dir()
Expand Down

0 comments on commit 7817fda

Please sign in to comment.