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: segmentSelect issue + segmentation modified event #1065

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

lscoder
Copy link
Collaborator

@lscoder lscoder commented Feb 8, 2024

Context

  • segmentSelect example was not working as intended
  • SEGMENTATION_DATA_MODIFIED was not being triggered for PlanarFreehandContourSegmentationTool

Changes & Results

  • changed how contourSegmentationCompletedListener finds a viewport with PlanarFreehandContourSegmentationTool tool enabled
  • added an event listener to run when an annotation is deleted to update the annotationUIDsMap that contains contour UIDs in each segmentation
  • added the contour UID of each annotation created after appending/removing annotations

@lscoder lscoder self-assigned this Feb 8, 2024
Copy link

netlify bot commented Feb 8, 2024

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit d735e4b
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/65c5469c47184d00089a65d8
😎 Deploy Preview https://deploy-preview-1065--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.

@lscoder lscoder requested a review from sedghi February 8, 2024 21:11
* @param annotation - Annotation to find the viewports that it could display in
* @returns All viewports to display in
*/
export default function getViewportsForAnnotation(annotation: Annotation) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have this already

packages/tools/src/utilities/getViewportForAnnotation.ts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ViewportS (plural)
Later it looks for the viewport that is in a toolGroup with freehand tool

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a change to make getViewportForAnnotation call getViewportsForAnnotation removing duplicated code

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.

see my comment thanks

@sedghi sedghi merged commit 3451d24 into cornerstonejs:main Feb 8, 2024
9 checks passed
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.

2 participants