Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed Feb 5, 2024
1 parent 88e0405 commit 42652ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions totalsegmentator/nnunet.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ def nnUNet_predict_image(file_in: Union[str, Path, Nifti1Image], file_out, task_
if not isinstance(file_in, Nifti1Image):
file_in = Path(file_in)
img_type = "nifti" if str(file_in).endswith(".nii") or str(file_in).endswith(".nii.gz") else "dicom"
if not file_in.exists():
sys.exit("ERROR: The input file or directory does not exist.")
if file_out is not None:
file_out = Path(file_out)
if not file_in.exists():
sys.exit("ERROR: The input file or directory does not exist.")
multimodel = type(task_id) is list

if img_type == "nifti" and output_type == "dicom":
Expand Down

0 comments on commit 42652ef

Please sign in to comment.