-
Notifications
You must be signed in to change notification settings - Fork 338
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(labelmap): apply styles based on active segment index #1836
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
yeah i missed raising this change for labelmaps. good spot. |
I explained in the other PR why we can't merge this, you can use perSegment config for this purpose |
Hi @sedghi , I tried using segmentation.config.style.setStyle(
{
type: csToolsEnums.SegmentationRepresentations.Labelmap,
segmentationId,
segmentIndex: 1,
},
{
fillAlpha: 1,
fillAlphaInactive: 0,
}
);
segmentation.config.style.setStyle(
{
type: csToolsEnums.SegmentationRepresentations.Labelmap,
segmentationId,
segmentIndex: 2,
},
{
fillAlpha: 1,
fillAlphaInactive: 0,
}
); I'd appreciate it if you could clarify what I might be missing. 2025-02-24.12.27.29.mov |
@stada526 I will get back to this next week, busy with cs3d 3.0 right now |
@stada526 per the office hour discussion, the active/inactive setting is supposed to be interpreted as the segmentation level change not the segment level change. atleast that's what i could gather. |
@sedghi @minimal-scouser |
i am working on this. |
@minimal-scouser |
Context
While rendering, segment styles such as opacity, fill etc do not consider active segment based on its index.
This issue was partly fixed via #1833, but only for Contour, so I’ve made some updates for Labelmap.
Changes & Results
Active segmentationId along with the segmentIndex should determine whether a segment is active or not.
2025-02-19.10.21.58.mov
Testing
Checklist
PR
semantic-release format and guidelines.
Code
[] My code has been well-documented (function documentation, inline comments,
etc.)
[] I have run the
yarn build:update-api
to update the API documentation, and havecommitted the changes to this PR. (Read more here https://www.cornerstonejs.org/docs/contribute/update-api)
Public Documentation Updates
additions or removals.
Tested Environment