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

[Bug]? Resizing OHIF window causes viewport to scroll down to last slide reset Window Levels and colormap #4771

Closed
ahlaughland opened this issue Feb 6, 2025 · 3 comments
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@ahlaughland
Copy link

ahlaughland commented Feb 6, 2025

Describe the Bug

Not sure if this is a bug or a problem with the DICOM dataset I'm using - this doesn't happen on all datasets. When I resize the OHIF window the Axial view scrolls all the way to the bottom and resets the Window Levels and colormap.

I see a comment in the code for sliceIndex:
https://github.com/rapidllc/3drd-ohif-v3/commit/7624ccb5e495c0a151227a458d8d5bfb8babb22c#diff-a28c8c52c1ec95a73d2e55755c1baf5b8cfd47e511221277126c494c650ad1e5R1061

 private performResize() {
    const isImmediate = false;

 ...
      // Store the current position presentations for each viewport.
      viewports.forEach(({ id: viewportId }) => {
        const presentation = this._getPositionPresentation(viewportId);

        // During a resize, the slice index should remain unchanged. This is a temporary fix for
        // a larger issue regarding the definition of slice index with slab thickness.
        // We need to revisit this to make it more robust and understandable.
        delete presentation.viewReference.sliceIndex;
        this.beforeResizePositionPresentations.set(viewportId, presentation);
      });
...

Steps to Reproduce

Before window resize:

Image

After:

Image

After scrolling up - "fixes" window levels:

Image

I noticed that the sliceIndex was less for the Axial view vs. Sagittal and Coronal:

Image

The current behavior

See above in Steps to Reproduce

The expected behavior

The Axial view should behave like the other viewport for Sagittal and Coronal.

OHIF version

3.9.0-beta.87

OS

Windows 10/11, Mac

Node version

20.18.0

Browser

Chrome - Version 132.0.6834.83 (Official Build) (64-bit)

@ahlaughland ahlaughland added the Awaiting Reproduction Can we reproduce the reported bug? label Feb 6, 2025
@sedghi
Copy link
Member

sedghi commented Feb 6, 2025

Hmm, can you share anonymized data? also can you try 3.10 latest?

@ahlaughland
Copy link
Author

ahlaughland commented Feb 6, 2025

I'm currently upgrading to 3.10.0-beta.91 so I can test that when I'm done.

Github is not letting me upload my .zips <!-- Failed to upload "t1.ct.zip" -->

Here is the NM from anohter issue: #4519 (comment)

I'll try to upload the CT again later.

@ahlaughland
Copy link
Author

I got OHIF 3.10.0-beta.91 running locally and tested with my data and I'm not seeing the scrolling issue.

Image

I'll close this now because it looks like the update will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reproduction Can we reproduce the reported bug?
Projects
None yet
Development

No branches or pull requests

2 participants