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

fix(TVMT HP) - Fixes issue #4636 of OHIF related with infinite loop of setViewReference #1847

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YiannisTheocharakis
Copy link

Context

The fix is related to OHIF issue [Bug] Infinite loop in TMTV mode #4636

A recursive call of setViewReference was causing OHIF to stall.

Changes & Results

The fix was finally located in CS3D and the way we had to resetCamera in BaseVolumeViewport->applyViewOrientation

Testing

Checklist

PR

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

Code

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: v23.6.1
  • "Browser: Vivaldi 7.1.3570.50 (Stable channel) (64-bit)

Copy link

netlify bot commented Feb 24, 2025

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit d3a70db
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/67bc82a1f2e13c0008ef9839
😎 Deploy Preview https://deploy-preview-1847--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -151,7 +151,8 @@ abstract class BaseVolumeViewport extends Viewport {
this.initialViewUp = viewUp;

if (resetCamera) {
this.resetCamera();
const t = this as unknown as IVolumeViewport;
t.resetCamera({ resetOrientation: false, resetRotation: false });
Copy link
Member

Choose a reason for hiding this comment

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

doesn't this.resetCamera({...}
work? why the t assignment?

Choose a reason for hiding this comment

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

Because I had some typescript issues. The IDE was looking a wrong function signature in Viewport.cs and not VolumeViewport.cs. OHIF wouldn't compile because the viewport.cs resetCamera doesn't accept these attributes

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.

2 participants