Skip to content
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

Merged
merged 6 commits into from Jan 17, 2022

Conversation

Garyfallidis
Copy link
Contributor

This PR fixes the issue reported in #467

Basically, we were not flipping the images correctly in save_image and load_image. save_image was called by snapshot.

@pep8speaks
Copy link

pep8speaks commented Jan 13, 2022

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

@skoudoro skoudoro linked an issue Jan 13, 2022 that may be closed by this pull request
3 tasks
@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #521 (c59ad15) into master (0ff2c0a) will decrease coverage by 7.68%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
fury/actor.py
fury/io.py
fury/material.py
fury/primitive.py
fury/shaders/tests/test_base.py
fury/ui/tests/test_containers.py
fury/ui/tests/test_core.py
fury/ui/tests/test_elements.py
fury/window.py
fury/ui/helpers.py
... and 79 more

@skoudoro skoudoro added the type:Bug Fix Something isn't working label Jan 13, 2022
Copy link
Contributor

@skoudoro skoudoro left a 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)
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@skoudoro
Copy link
Contributor

Failing CI's not related, thank @Garyfallidis. merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window snapshot inverts the displayed scene
4 participants