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

Fix mask output filename issues when '.nii.gz' is not included in out_fname #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bacaron
Copy link

@bacaron bacaron commented May 1, 2024

The current run_hd_bet function has a hard-coded string filter on the output mask name to append _mask.nii.gz to the output mask (line 78: mask_fname = out_fname[:-7] + "_mask.nii.gz"). However, if the user doesn't include the '.nii.gz' extension in the out_fname parameter, this will cause issues. For example, if out_fname is set to 'hd_bet_output', the resulting mask name will be 'hd_bet.nii.gz'.

This update fixes this small bug and should work in both cases (i.e. where a user includes the '.nii.gz' extension, and those when the user doesn't include the '.nii.gz' extension).

The current run_hd_bet function has a hard-coded string filter on the output mask name to append _mask.nii.gz to the output mask (line 78: mask_fname = out_fname[:-7] + "_mask.nii.gz"). However, if the user doesn't include the '.nii.gz' extension in the out_fname parameter, this will cause issues. For example, if out_fname is set to 'hd_bet_output', the resulting mask name will be 'hd_bet'.

This update fixes this small bug and should work in both cases (i.e. where a user includes the '.nii.gz' extension, and those when the user doesn't include the '.nii.gz' extension).
@bacaron bacaron changed the title Update run.py Mask output filename issues when '.nii.gz' is not included in out_fname May 1, 2024
@bacaron bacaron changed the title Mask output filename issues when '.nii.gz' is not included in out_fname Fix mask output filename issues when '.nii.gz' is not included in out_fname May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant