Skip to content

Conversation

tblock79
Copy link
Contributor

@tblock79 tblock79 commented Oct 9, 2025

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.

image

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

  • Load a volumetric dataset (e.g., CT) into a volume viewport in orthographic mode with an orientation different from the acquired orientation.
  • Zoom-out to validate that there are no hidden slices outside the FOV

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • "OS: Windows 11"
  • "Node version: 22.17.0"
  • "Browser: Chrome 142.0, Firefox 143.0"

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

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

I believe you want the stack viewport new FOV and not the orthographic new FOV and hence the new PR?

@vitblock
Copy link
Contributor

Yes, the idea would be to keep the new (v4) FOV scaling for the stack viewports (since it makes much better use of the viewport space) but use the legacy scaling for the orthographic viewports because the new FOV scaling does not work correctly for anisotropic datasets (thus, slices often remain hidden outside the FOV when displaying reformats). This would be temporary until a final solution has been found.

The new PR is just because I added the updated screenshots for the Playwright tests and somehow, GitHub wasn't picking up the added commit in the initial PR (not sure why). That's why I recreated the PR (which now includes both commits).

@sedghi
Copy link
Member

sedghi commented Oct 11, 2025

please bear with us we are fixing the fov for orthogonal next week

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.

3 participants