fix(fov): Use of legacy FOV scaling method for orthographic viewports (temporary fix) #2379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Currently, orthographic viewports do not provide correct FOV estimates on camera reset when showing reformatted orientations of the volume. As a result, the loaded image volume is cropped and a significant number of slices can be "hidden" outside the FOV (see screenshot below).
The problem has been addressed in the in PR #2334, but the proposed solution does not work yet.
The current PR introduces a fallback to the legacy FOV scaling method for orthographic viewports. This is intended as temporary fix until another solution has been developed. The legacy method seems to work well for the orthographic viewports (I have not noticed any issues with the FOV scaling).
Resubmitted PR because the previous PR did not pickup the commit with the added screenshots.
Changes & Results
In the function resetCamera() in Viewports.ts, a condition has been added that forces the fallback to the legacy scaling method for orthographic viewports when estimating the world dimensions.
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment