-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: automatic segmentation using onnx to run local AI algorithms (#…
- Loading branch information
1 parent
f2996db
commit 5b5856f
Showing
40 changed files
with
2,857 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# External Dependencies | ||
|
||
This module contains optional and external dependencies for including in OHIF, such as the DICOM Microscopy Viewer component. | ||
|
||
|
||
# External Components | ||
|
||
This directory contains various external components. These can be fetched in various ways such as NPM dependencies or by fetching files externally. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
## API Report File for "@cornerstonejs/ai" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
import type ColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction'; | ||
import { Corners } from '@kitware/vtk.js/Interaction/Widgets/OrientationMarkerWidget/Constants'; | ||
import type { IColorMapPreset } from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps'; | ||
import type { mat3 } from 'gl-matrix'; | ||
import { mat4 } from 'gl-matrix'; | ||
import { PixelDataTypedArray as PixelDataTypedArray_2 } from 'packages/core/dist/esm/types'; | ||
import type { Range as Range_2 } from '@kitware/vtk.js/types'; | ||
import { vec3 } from 'gl-matrix'; | ||
import type vtkActor from '@kitware/vtk.js/Rendering/Core/Actor'; | ||
import vtkAnnotatedCubeActor from '@kitware/vtk.js/Rendering/Core/AnnotatedCubeActor'; | ||
import type { vtkCamera } from '@kitware/vtk.js/Rendering/Core/Camera'; | ||
import { vtkColorTransferFunction } from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction'; | ||
import { vtkImageData } from '@kitware/vtk.js/Common/DataModel/ImageData'; | ||
import type vtkImageSlice from '@kitware/vtk.js/Rendering/Core/ImageSlice'; | ||
import type { vtkObject } from '@kitware/vtk.js/interfaces'; | ||
import type vtkOpenGLTexture from '@kitware/vtk.js/Rendering/OpenGL/Texture'; | ||
import type vtkPiecewiseFunction from '@kitware/vtk.js/Common/DataModel/PiecewiseFunction'; | ||
import vtkPlane from '@kitware/vtk.js/Common/DataModel/Plane'; | ||
import type vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData'; | ||
import type vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer'; | ||
import type vtkVolume from '@kitware/vtk.js/Rendering/Core/Volume'; | ||
|
||
// @public (undocumented) | ||
export class ONNXSegmentationController { | ||
constructor(options?: { | ||
listeners: any; | ||
getPromptAnnotations: any; | ||
promptAnnotationTypes: any; | ||
models: any; | ||
modelName: any; | ||
previewToolType: string; | ||
}); | ||
// (undocumented) | ||
protected annotationModifiedListener: (_event?: any) => void; | ||
// (undocumented) | ||
protected annotationsNeedUpdating: boolean; | ||
// (undocumented) | ||
protected boxRadius: number; | ||
// (undocumented) | ||
cacheImageEncodings(current?: any, offset?: number, length?: number): any; | ||
// (undocumented) | ||
canvas: HTMLCanvasElement; | ||
// (undocumented) | ||
canvasMask: HTMLCanvasElement; | ||
// (undocumented) | ||
clear(viewport: any): void; | ||
// (undocumented) | ||
createLabelmap(mask: any, canvasPosition: any, _points: any, _labels: any): void; | ||
// (undocumented) | ||
protected currentImage: any; | ||
// (undocumented) | ||
decode(points: any, labels: any, useSession?: any): Promise<void>; | ||
// (undocumented) | ||
protected desiredImage: { | ||
imageId: any; | ||
sampleImageId: any; | ||
imageIndex: number; | ||
decoder: any; | ||
encoder: any; | ||
}; | ||
// (undocumented) | ||
disconnectViewport(viewport: any): void; | ||
// (undocumented) | ||
protected excludeTool: string; | ||
// (undocumented) | ||
fetchAndCacheModel(url: any, name: any): Promise<ArrayBuffer>; | ||
// (undocumented) | ||
getConfig(modelName?: string): any; | ||
// (undocumented) | ||
getDirectoryForImageId(session: any, imageId: any): Promise<any>; | ||
// (undocumented) | ||
getFileNameForImageId(imageId: any, extension: any): any; | ||
// (undocumented) | ||
protected getPromptAnnotations: (viewport?: any) => cornerstoneTools.Types.Annotations; | ||
// (undocumented) | ||
protected handleImage({ imageId, sampleImageId }: { | ||
imageId: any; | ||
sampleImageId: any; | ||
}, imageSession: any): Promise<void>; | ||
// (undocumented) | ||
protected imageEncodings: Map<any, any>; | ||
// (undocumented) | ||
protected imageImageData: any; | ||
// (undocumented) | ||
initModel(): Promise<unknown>; | ||
// (undocumented) | ||
initViewport(viewport: any): void; | ||
// (undocumented) | ||
interpolateScroll(viewport?: any, dir?: number): Promise<void>; | ||
// (undocumented) | ||
protected isGpuInUse: boolean; | ||
// (undocumented) | ||
protected load(): Promise<void>; | ||
// (undocumented) | ||
loadModels(models: any, imageSession?: any): Promise<void>; | ||
// (undocumented) | ||
loadStorageImageEncoding(session: any, imageId: any, index?: any): Promise<any>; | ||
// (undocumented) | ||
protected log(logger: Loggers, ...args: any[]): void; | ||
// (undocumented) | ||
mapAnnotationPoint(worldPoint: any): number[]; | ||
// (undocumented) | ||
static MarkerExclude: string; | ||
// (undocumented) | ||
static MarkerInclude: string; | ||
// (undocumented) | ||
protected maskImageData: any; | ||
// (undocumented) | ||
maxHeight: number; | ||
// (undocumented) | ||
maxWidth: number; | ||
// (undocumented) | ||
modelHeight: number; | ||
// (undocumented) | ||
static MODELS: { | ||
sam_l: ({ | ||
name: string; | ||
url: string; | ||
size: number; | ||
key: string; | ||
feedType: string; | ||
} | { | ||
name: string; | ||
url: string; | ||
size: number; | ||
key: string; | ||
feedType?: undefined; | ||
})[]; | ||
sam_h: ({ | ||
name: string; | ||
url: string; | ||
size: number; | ||
key: string; | ||
feedType: string; | ||
} | { | ||
name: string; | ||
url: string; | ||
size: number; | ||
key: string; | ||
feedType?: undefined; | ||
})[]; | ||
}; | ||
// (undocumented) | ||
modelWidth: number; | ||
// (undocumented) | ||
protected previewToolType: string; | ||
// (undocumented) | ||
protected promptAnnotationTypes: string[]; | ||
// (undocumented) | ||
restoreImageEncoding(session: any, imageId: any): Promise<any>; | ||
// (undocumented) | ||
protected runDecode(): Promise<void>; | ||
// (undocumented) | ||
protected sharedImageEncoding: any; | ||
// (undocumented) | ||
storeImageEncoding(session: any, imageId: any, data: any): Promise<void>; | ||
// (undocumented) | ||
protected tool: any; | ||
// (undocumented) | ||
tryLoad(options?: { | ||
resetImage: boolean; | ||
}): void; | ||
// (undocumented) | ||
updateAnnotations(): void; | ||
// (undocumented) | ||
protected viewport: any; | ||
// (undocumented) | ||
static viewportOptions: { | ||
displayArea: Types.DisplayArea; | ||
background: Types.Point3; | ||
}; | ||
// (undocumented) | ||
protected viewportRenderedListener: (_event: any) => void; | ||
} | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.