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

fix(segmentation-tools): toggle passive and active tool modes based on segment actions #4633

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Devu-trenser
Copy link
Contributor

@Devu-trenser Devu-trenser commented Dec 30, 2024

Context

Changes & Results

Changes to

  • Set segmentation tools to passive mode when all segments are removed from the segmentation.
  • Activate segmentation tools when:
    1. Adding new segments.
    2. Activating a segmentation that contains at least one segment.
    3. Switching between segmentations that contain segments.
  • Prevent -infinity segmentation index when adding a new segment after deleting all segments.

Results:

  • Segmentation tools are disabled if the active segmentation does not contain any segments.
  • Segmentation tools are reactivated when:
    1. Adding segments.
    2. Activating a segmentation with at least one segment.
    3. Switching between segmentations with segments.
  • The user can add a new segment after deleting all segments from a segmentation.
OSS4633.mp4

Testing

  • Verify that segmentation tools are disabled if the active segmentation does not contain any segments
  • Verify that segmentation tools are active when adding a new segment, activating a segmentation with at least one segment, or switching between segmentations that contain segments.
  • Verify user is able to add new segment after deleting all segments.

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 Dec 30, 2024

Deploy Preview for ohif-platform-docs canceled.

Name Link
🔨 Latest commit 67d6d9e
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/6799f03c1889fc0008cf71f8

Copy link

netlify bot commented Dec 30, 2024

Deploy Preview for ohif-dev canceled.

Name Link
🔨 Latest commit 67d6d9e
🔍 Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/6799f03cb7570300086e0bdd

@Devu-trenser Devu-trenser force-pushed the fix-brush-tool-is-active-after-deleting-segments-from-segmentation branch from 9f767bf to b794564 Compare January 7, 2025 14:39
@sedghi sedghi self-requested a review January 23, 2025 19:26
@Devu-trenser
Copy link
Contributor Author

Devu-trenser commented Jan 29, 2025

@sedghi Could you please review this PR and let me know if it's possible to include these changes in 3.9?

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.

I reviewed this PR last week and I'm pretty sure it's not the right approach. I need to think about how to fix this issue, but it's definitely not this way. One problem is that SegmentationTools are hardcoded in that file, which doesn't make sense.
The right approach is to let the evaluator handle the disabled state, and have the segmentation service simply publish events.

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.

[Bug] Segmentation tool remains active after deleting all segments, and new segments cannot be added
2 participants