8000 ENH: Add a utility to calculate obliquity of affines by oesteban · Pull Request #815 · nipy/nibabel · GitHub
[go: up one dir, main page]

Skip to content

ENH: Add a utility to calculate obliquity of affines #815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: incorrect operation ordering caught by @matthew-brett
  • Loading branch information
oesteban authored Sep 27, 2019
commit 891d85c07b41f4908fb3e9ffb9e89c78883a64eb
2 changes: 1 addition & 1 deletion nibabel/affines.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,5 @@ def obliquity(affine):

"""
vs = voxel_sizes(affine)
best_cosines = np.abs((affine[:-1, :-1] / vs).max(axis=1))
best_cosines = np.abs(affine[:-1, :-1] / vs).max(axis=1)
return np.arccos(best_cosines)
0