Skip to content

fix(labelmap) : Display labelmap on volume3d viewport #1993

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

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

Conversation

Celian-abd
Copy link
Contributor

Context

The labelmap was showing on mip using volume or orthographic viewport but it was not working for volume3d.

Changes & Results

  • Moved getBlendMode() method in BaseVolumeViewport instead of VolumeViewport
  • Changed the VolumeViewport check to BaseVolumeViewport

This changes allow the labelmap to render on volume3d viewport aswell as volume.

Testing

Can be tested in the labelmapMIP example.

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:
  • [] "Node version:
  • [] "Browser:

Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit a5af8b7
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/67fd06057f1ce80008a74324
😎 Deploy Preview https://deploy-preview-1993--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.

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.

The issue is what happens on the real 3D viewport, since we don't want to render Labelmap in 3D viewport, the best representation for segmentation in 3D viewport is actually a surface

@salimkanoun
Copy link
Contributor

But actually it works pretty well even in 3D viewport, maybe @Celian-abd you can make a video of the cornerstone example with 3D viewport with labelmap?

@sedghi
Copy link
Member

sedghi commented Apr 29, 2025

yes please, let's see. Create couple of segments that overlap if camera looks at them from different angles

@salimkanoun
Copy link
Contributor

Hum overlap I'm not sure, however not la elmap have overlap, it can be a known limitation of this rendering that fit several use cases

@Celian-abd
Copy link
Contributor Author

3D viewport with labelmap

image
image

@sedghi
Copy link
Member

sedghi commented Apr 29, 2025

but is that a 3d viewport or a mip viewport?

@Celian-abd
Copy link
Contributor Author

It's a volume3D viewport

 {
      viewportId: viewportId2,
      type: ViewportType.VOLUME_3D,
      element: element2,
      defaultOptions: {
        orientation: Enums.OrientationAxis.SAGITTAL,
        background: <Types.Point3>[0.2, 0, 0.2],
      },
    },

@sedghi
Copy link
Member

sedghi commented Apr 30, 2025

can you pull main, i fixed the tests

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.

This requires a lot more testing from me, it will take some time sorry

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