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

dwibiasnormmask: Fix masking algorithm selection #2983

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading