Skip to content

Commit

Permalink
fixed important bug in nii orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
pjmark committed Jan 18, 2022
1 parent fe58d1c commit 912ac97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miutil/imio/nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def getnii(fim, nan_replace=None, output='image'):

# > get orientations from the affine
ornt = nib.io_orientation(nim.affine)
trnsp = tuple(np.int8([ornt[2, 0], ornt[1, 0], ornt[0, 0]]))
trnsp = tuple(np.flip(np.argsort(ornt[:, 0])))
flip = tuple(np.int8(ornt[:, 1]))

# > voxel size
Expand Down

0 comments on commit 912ac97

Please sign in to comment.