Skip to content

Commit

Permalink
Merge pull request #73 from BrainLesion/71-enhancement-fails-on-cpu-o…
Browse files Browse the repository at this point in the history
…nly-machines-when-not-explicitly-setting-to-cpu

71 enhancement fails on cpu only machines when not explicitly setting to cpu
  • Loading branch information
neuronflow authored Apr 19, 2024
2 parents 5ad167b + d4e19d9 commit 1e34cd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions brainles_preprocessing/brain_extraction/brain_extractor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# TODO add typing and docs
from abc import abstractmethod
from pathlib import Path
from shutil import copyfile

from auxiliary.nifti.io import read_nifti, write_nifti
Expand Down Expand Up @@ -82,13 +83,10 @@ def extract(
)

hdbet_mask_path = (
masked_image_path.parent
+ "/"
+ name_extractor(masked_image_path)
+ "_mask.nii.gz"
Path(masked_image_path).parent
/ f"{name_extractor(masked_image_path)}_mask.nii.gz"
)

if hdbet_mask_path != brain_mask_path:
if hdbet_mask_path.resolve() != Path(brain_mask_path).resolve():
copyfile(
src=hdbet_mask_path,
dst=brain_mask_path,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ nibabel = "^3.2.1"
numpy = "^1.23.0"

# hd-bet reqs
BrainLes-HD-BET = ">=0.0.5"
brainles_hd_bet = "*" #= ">=0.0.5"

# utils
tqdm = "^4.64.1"
Expand Down

0 comments on commit 1e34cd8

Please sign in to comment.