Skip to content

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

Merged
Zaid-Safadi merged 2 commits intocornerstonejs:viewport-issue304from
Zaid-Safadi:viewport-issue304
Jun 29, 2020
Merged

fix: displaying images (series) with different sizes causes the image…#462
Zaid-Safadi merged 2 commits intocornerstonejs:viewport-issue304from
Zaid-Safadi:viewport-issue304

Conversation

@Zaid-Safadi
Copy link
Copy Markdown
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
Copy Markdown
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant