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] MIP Viewport Loses LABELMAP_EDGE_PROJECTION_BLEND Effect After resize #1814

Open
stada526 opened this issue Feb 5, 2025 · 4 comments
Labels
bugs Something isn't working, verified by maintainers

Comments

@stada526
Copy link
Contributor

stada526 commented Feb 5, 2025

Describe the Bug

With LABELMAP_EDGE_PROJECTION_BLEND, calling the resize function causes an issue where the MIP viewport changes, and it appears that LABELMAP_EDGE_PROJECTION_BLEND is no longer applied.

Steps to Reproduce

I've prepared an example to reproduce this issue.

  1. Run yarn run example labelmapMIP
  2. In the example, brush a segment.
  3. Click the 'Resize' button
2025-02-05.14.31.08.mov

The current behavior

After calling the resize function, it appears that LABELMAP_EDGE_PROJECTION_BLEND is no longer applied.

The expected behavior

LABELMAP_EDGE_PROJECTION_BLEND remains applied.

OS

maxOS 15.1

Node version

v21.7.1

Browser

Chrome 130.0.6723.117

@stada526 stada526 changed the title [Bug] [Bug] MIP Viewport Loses LABELMAP_EDGE_PROJECTION_BLEND Effect After resize Feb 5, 2025
@sedghi sedghi added bugs Something isn't working, verified by maintainers and removed Awaiting Reproduction labels Feb 6, 2025
@stada526
Copy link
Contributor Author

Hi,
I was wondering if there are any updates on this issue.
If no one has enough time to work on it but has an idea of which part may need to be modified to fix the bug, I’d appreciate it if you could share any information. That way, I might be able to help.

@sedghi
Copy link
Member

sedghi commented Feb 19, 2025

It seems like the issue is related to viewPresentation.

If you comment out this section, it works fine:

  viewports.forEach((viewport, idx) => {
    viewport.setViewPresentation(presentations[idx]);
  });

My guess is that viewPresentation isn't applying the slabThickness. If you check, the PT (not the labelmap) also loses the slabs after resizing.

@minimal-scouser
Copy link
Contributor

minimal-scouser commented Feb 19, 2025

i uncommented the part of code you provided. it still breaks?

i checked it with the pr link, stada526 provided.

if you just do this, it breaks

renderingEngine.resize()

more specifically, i found out that resetting camera is what's causing this.
especially this line from RenderingEngine.ts

vp.resetCameraForResize();

i would like to provide more info if you think i'm on the right path.

@minimal-scouser
Copy link
Contributor

providing some context obtained from the office hours:

problem might stem from addVolumesAsIndependentComponents.ts file
specifically this section of file

i forgot what else was discussed on this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Something isn't working, verified by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants