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

feat: automatic segmentation using onnx to run local AI algorithms #1656

Merged
merged 8 commits into from
Dec 3, 2024

Conversation

wayfarer3130
Copy link
Collaborator

@wayfarer3130 wayfarer3130 commented Dec 3, 2024

Try it here https://www.cornerstonejs.org/live-examples/samclientside

fixes #1658

This pull request introduces significant changes across multiple files, primarily focusing on the addition of a new AI module, updates to existing tools, and enhancements to the build process.

New AI Module:

  • Added a new API report file for the @cornerstonejs/ai package, which includes a comprehensive list of imports and a detailed ONNXSegmentationController class with various methods and properties.
  • Created a new README.md for the @cornerstonejs/ai package, providing an overview and documentation links.
  • Added an api-extractor.json configuration file for the @cornerstonejs/ai package to generate API reports.

Tool Updates:

  • Updated VolumeViewport class to include an optional useSlabThickness parameter in the getCurrentImageIdIndex method.
  • Added interpolationUID to the Annotation type and changed cachedStats to Record<string, unknown>. [1] [2]
  • Introduced a new createAnnotation method in the AnnotationDisplayTool class.
  • Added static defaults and mergeDefaultProps methods to the BaseTool class, along with a getter for toolName. [1] [2] [3]
  • Refactored BrushTool to extend LabelmapBaseTool and removed several methods. [1] [2]
  • Changed createAnnotation method return type from Annotation to ContourAnnotation in PlanarFreehandROITool and SplineROITool. [1] [2]
  • Added probeDefaults static property to ProbeTool class and updated _calculateCachedStats method. [1] [2]
  • Added AddPreview to StrategyCallbacks enum.

Build Process Enhancements:

  • Added a new script build:update-api:ai to the package.json to update the API for the @cornerstonejs/ai package.

Copy link

stackblitz bot commented Dec 3, 2024

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

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 20c421d
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/674f4cce9b5e920008f0573b
😎 Deploy Preview https://deploy-preview-1656--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 feat: Segmentation using onnx to run local AI algorithms feat: automatic segmentation using onnx to run local AI algorithms Dec 3, 2024
@sedghi sedghi merged commit 5b5856f into main Dec 3, 2024
26 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.

[Bug] Segments Not Displayed After v2.4.0 in SegmentationVolume Example
2 participants