cornerstonejs / cornerstone3D

Cornerstone is a set of JavaScript libraries that can be used to build web-based medical imaging applications. It provides a framework to build radiology applications such as the OHIF Viewer.
https://cornerstonejs.org
MIT License
539 stars 278 forks source link

[Bug] ToolGroupSpecific configuration for changing segment color is changing color across other toolgroup #895

Closed jithenece closed 9 months ago

jithenece commented 10 months ago

Describe the Bug

Steps to Reproduce

  1. Clone the cornerstone3D repo
  2. Use the labelmapToolGroupSpecificConfiguration/index.ts to replace below file path packages/tools/examples/labelmapToolGroupSpecificConfiguration/index.ts
  3. Run the example using yarn install yarn run example labelmapToolGroupSpecificConfiguration
  4. Observe the page by commenting the promise statement in line number 334

The current behavior

The expected behavior

OS

macOS 14.1.1

Node version

14.16.0

Browser

Chrome 119.0.6045.159

sedghi commented 9 months ago

Yes, it appears to be a problem. I believe the issue also occurs with the same toolgroup. For example, if you change the color of a segment in segmentation 1, it will also change in segmentation 2 within the same toolGroup. This is actually a more significant issue than the one you mentioned. Rest assured, I will address and resolve it.

By the way, I'm interested to know why you have two toolGroups. What is your specific use case?

jithenece commented 9 months ago

Thanks @sedghi for checking on this.

I had 4 viewports. One viewport using CT to show only tumor segmentation. Other 3 viewport using PT/CT to show tumor and organ segmentations. Using a single toolgroup, it seems we cannot achieve this. so I had to create two different toolgroups for different viewport combinations. Please let me know if there are better ways to implement this.

sedghi commented 9 months ago

check the latest and see if the problem occurs