-
Notifications
You must be signed in to change notification settings - Fork 325
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] Cant get actual segments list for segmentation #1691
Comments
some at https://www.cornerstonejs.org/live-examples/segmentationvolume example after click "load seg" u can see many segments with differect colors at dicoms, but i get one segment with name "Segment 1" |
+1 for this issue |
I think we should have them synced yes |
It would be a life-saver for us, thank you! |
Hi @sedghi! |
So I looked into this, and I've kind of changed my mind - a segment is basically a construct, and its state should be kept at a higher level than cornerstone3D. What I mean is, a segmentation can have a segment even if it's empty, and that's okay. It's up to the consuming applications to create and hold that state, and then use it as they see fit by calling utilities inside cornerstone3D. The applications are in charge of managing the segment state, and they can use cornerstone3D's tools to do that. |
@sedghi Sorry I don't quite get it. What we have here is DICOM SEG with many segments, and it's imported with cornerstone3D adapter in your example. We have found only one way to get the information on the segments in API - with cornerstoneTools.segmentation.state.getSegmentations()[0].segments and it works incorrectly and shows only one segment instead of 13. If there is another way please suggest it |
+1 this issue |
Describe the Bug
In your example you have one segmentation with two segments with different colors.
But in
cornerstoneTools.segmentation.state.getSegmentations()[0].segments
i see only one segment. some in other in my cases with many segmentsSteps to Reproduce
cornerstoneTools.segmentation.state.getSegmentations()[0].segments
The current behavior
cornerstoneTools.segmentation.state.getSegmentations()[0].segments
take only one segmentsThe expected behavior
expected -
cornerstoneTools.segmentation.state.getSegmentations()[0].segments
take two (many) segmentsOS
macos 14.6.1
Node version
18.20.2
Browser
Chrome 131.0.6778.69
The text was updated successfully, but these errors were encountered: