Skip to content

ENH: Reorient interface #2572

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 5 commits into from
May 22, 2018
Merged

ENH: Reorient interface #2572

merged 5 commits into from
May 22, 2018

Conversation

effigies
Copy link
Member

This is a pure nibabel/numpy interface to reorient an image to any RAS ... IPL. It also produces an affine transform that describes the reorientation.

Based off of fmriprep.interfaces.images.Reorient, but does not assume RAS target orientation or nibabel >= 2.2.

I created a interfaces.image file, since this didn't seem to fall into existing interface categories. Is there a better place to put this?

@codecov-io
Copy link

codecov-io commented May 11, 2018

Codecov Report

Merging #2572 into master will increase coverage by 0.02%.
The diff coverage is 90.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2572      +/-   ##
==========================================
+ Coverage   67.57%   67.59%   +0.02%     
==========================================
  Files         333      334       +1     
  Lines       42547    42598      +51     
  Branches     5266     5273       +7     
==========================================
+ Hits        28750    28796      +46     
- Misses      13124    13126       +2     
- Partials      673      676       +3
Flag Coverage Δ
#smoketests 50.7% <ø> (ø) ⬆️
#unittests 65.06% <90.19%> (+0.05%) ⬆️
Impacted Files Coverage Δ
nipype/interfaces/image.py 90.19% <90.19%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a96ea5...ea5a5e2. Read the comment docs.

@oesteban
Copy link
Contributor

+1000, and I think the new module is fine.

@effigies effigies added this to the 1.0.4 milestone May 13, 2018
@effigies
Copy link
Member Author

Well, hoped to get #2576 to test the nibabel fallback code, but that's not likely to happen.

This should be good to go.

@oesteban
Copy link
Contributor

Seems like some tests are failing in Travis. Particularly, when checking that the affine was actually changed. Seems like (0, 1, 2) affines are being set?

@effigies
Copy link
Member Author

Ah, no. This is the case where there's a flip but not a reordering. The dimension info doesn't include direction, just axis.

@effigies
Copy link
Member Author

@oesteban Good to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants