Skip to content

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

Open
bacaron wants to merge 1 commit intoMIC-DKFZ:masterfrom
bacaron:master
Open

Fix mask output filename issues when '.nii.gz' is not included in out_fname#53
bacaron wants to merge 1 commit intoMIC-DKFZ:masterfrom
bacaron:master

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