Skip to content

fix(seg): Refactor LabelmapBaseTool and SphereScissorsTool to fix sphere bug in stack#1772

Merged
sedghi merged 7 commits intomainfrom
fix/brush-stuff
Jan 22, 2025
Merged

fix(seg): Refactor LabelmapBaseTool and SphereScissorsTool to fix sphere bug in stack#1772
sedghi merged 7 commits intomainfrom
fix/brush-stuff

Conversation

@sedghi
Copy link
Member

@sedghi sedghi commented Jan 22, 2025

related to OHIF/Viewers#4700 & OHIF/Viewers#4643
fixes #1724, #1729

This pull request includes several changes to the LabelmapBaseTool and SphereScissorsTool classes to improve code organization and functionality. The most important changes include the introduction of new type definitions, modifications to existing methods, and removal of redundant code.

Changes to LabelmapBaseTool:

  • Modified the createEditData method to return a new type EditDataReturnType and changed its access level to protected. [1] [2]
  • Introduced a new method getEditData to handle the creation of edit data, which is now used within createEditData. [1] [2]
  • Updated the getOperationData method to return a new type ModifiedLabelmapToolOperationData. [1] [2]

Changes to SphereScissorsTool:

  • Refactored the SphereScissorsTool class to use the new getEditData method from LabelmapBaseTool, simplifying the logic for handling volume operations.

Type Definitions and Imports:

  • Added new type definitions EditDataReturnType and ModifiedLabelmapToolOperationData in LabelmapBaseTool.ts.
  • Updated import statements to include new types and remove unused imports in LabelmapBaseTool.ts and SphereScissorsTool.ts. [1] [2] [3] [4]

These changes aim to improve the maintainability and clarity of the codebase by introducing more specific type definitions and refactoring existing methods.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 5f563e2
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/679115f0eb304400088544d1
😎 Deploy Preview https://deploy-preview-1772--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.

@sedghi sedghi changed the title fix sphere for stack feat(seg): Refactor LabelmapBaseTool and SphereScissorsTool to fix sphere bug in stack Jan 22, 2025
@sedghi sedghi changed the title feat(seg): Refactor LabelmapBaseTool and SphereScissorsTool to fix sphere bug in stack fix(seg): Refactor LabelmapBaseTool and SphereScissorsTool to fix sphere bug in stack Jan 22, 2025
@sedghi sedghi merged commit 5eeda06 into main Jan 22, 2025
29 checks passed
@sedghi sedghi deleted the fix/brush-stuff branch January 22, 2025 16:09
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] Brushing Feature Malfunction When Switching Active Segments in THRESHOLD_INSIDE_CIRCLE strategy

1 participant