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
Snapshot flipping bug fix #521
Snapshot flipping bug fix #521
Conversation
Hello @Garyfallidis! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-01-14 18:18:04 UTC |
Codecov Report
@@ Coverage Diff @@
## master #521 +/- ##
==========================================
- Coverage 89.55% 81.86% -7.69%
==========================================
Files 35 54 +19
Lines 7467 10616 +3149
Branches 857 1069 +212
==========================================
+ Hits 6687 8691 +2004
- Misses 547 1661 +1114
- Partials 233 264 +31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I will merge it as soon as you fix my comment below. Thanks!
fury/io.py
Outdated
@@ -77,6 +78,7 @@ def load_image(filename, as_vtktype=False, use_pillow=True): | |||
vtk_image.SetSpacing(1.0, 1.0, 1.0) | |||
vtk_image.SetOrigin(0.0, 0.0, 0.0) | |||
arr_tmp = np.flipud(image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this line? It is not used since you do arr_tmp = image
in the line below (81)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Failing CI's not related, thank @Garyfallidis. merging |
This PR fixes the issue reported in #467
Basically, we were not flipping the images correctly in
save_image
andload_image
.save_image
was called bysnapshot
.