feat: automatic segmentation using onnx to run local AI algorithms #1656
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
@cornerstonejs/ai
package, which includes a comprehensive list of imports and a detailedONNXSegmentationController
class with various methods and properties.README.md
for the@cornerstonejs/ai
package, providing an overview and documentation links.api-extractor.json
configuration file for the@cornerstonejs/ai
package to generate API reports.Tool Updates:
VolumeViewport
class to include an optionaluseSlabThickness
parameter in thegetCurrentImageIdIndex
method.interpolationUID
to theAnnotation
type and changedcachedStats
toRecord<string, unknown>
. [1] [2]createAnnotation
method in theAnnotationDisplayTool
class.defaults
andmergeDefaultProps
methods to theBaseTool
class, along with a getter fortoolName
. [1] [2] [3]BrushTool
to extendLabelmapBaseTool
and removed several methods. [1] [2]createAnnotation
method return type fromAnnotation
toContourAnnotation
inPlanarFreehandROITool
andSplineROITool
. [1] [2]probeDefaults
static property toProbeTool
class and updated_calculateCachedStats
method. [1] [2]AddPreview
toStrategyCallbacks
enum.Build Process Enhancements:
build:update-api:ai
to thepackage.json
to update the API for the@cornerstonejs/ai
package.