Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: displaying images (series) with different sizes causes the image… #462

Merged

Conversation

Zaid-Safadi
Copy link
Contributor

… to be clipped #304

Solution 1: By default, don't create a "displayedArea" in the viewport object and let user provides one if needed. otherwise, the code will use the full image dimensions

Pros:

Cleanest (IMO), someone explicitly setting the displayedArea knows what they are doing and can reset it for new images if displayedArea should be different.
Cons:

Any code assuming the viewport.displayedArea is created by default and accessing directly (such as applying my workaround above) will break.

@Zaid-Safadi
Copy link
Contributor Author

I have an example which I can clean up and add but unit-tests are provided

@Zaid-Safadi Zaid-Safadi merged commit e9fd1e5 into cornerstonejs:viewport-issue304 Jun 29, 2020
swederik pushed a commit that referenced this pull request Sep 13, 2021
#462)

* fix: displaying images (series) with different sizes causes the image to be clipped #304

* add example to display multiple images with different sizes
swederik added a commit that referenced this pull request Sep 13, 2021
…#462) (#465)

* fix: displaying images (series) with different sizes causes the image… (#462)

* fix: displaying images (series) with different sizes causes the image to be clipped #304

* add example to display multiple images with different sizes

* fix createViewport test

Co-authored-by: swederik <erik.sweed@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant