Skip to content

Commit

Permalink
cast None to string when adding ImageOrientation in add_nifti_info fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
ashleychari committed Feb 10, 2025
1 parent 7650e19 commit c943a12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cubids/cubids.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ def add_nifti_info(self):
data["NumVolumes"] = 1
if "ImageOrientation" not in data.keys():
orient = nb.orientations.aff2axcodes(img.affine)
orient = [str(orientation) for orientation in orient]
joined = "".join(orient) + "+"
data["ImageOrientation"] = joined

Expand Down

0 comments on commit c943a12

Please sign in to comment.