@cornerstonejs/ai 4.0.0-beta.3 → 4.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,7 @@ declare class MarkerLabelmapTool extends LabelmapBaseTool {
|
|
|
23
23
|
searchBreadth: number;
|
|
24
24
|
};
|
|
25
25
|
});
|
|
26
|
+
shouldResolvePreviewRequests(): boolean;
|
|
26
27
|
_init: () => Promise<void>;
|
|
27
28
|
_getToolGroupId: () => import("packages/tools/dist/esm/types").IToolGroup;
|
|
28
29
|
_addToolInstances: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnabledElementByViewportId } from '@cornerstonejs/core';
|
|
2
|
-
import { LabelmapBaseTool, ToolGroupManager,
|
|
2
|
+
import { LabelmapBaseTool, ToolGroupManager, annotation, ProbeTool, addTool, } from '@cornerstonejs/tools';
|
|
3
3
|
import ONNXSegmentationController from './ONNXSegmentationController';
|
|
4
4
|
class MarkerLabelmapTool extends LabelmapBaseTool {
|
|
5
5
|
static { this.toolName = 'MarkerLabelmap'; }
|
|
@@ -172,5 +172,24 @@ class MarkerLabelmapTool extends LabelmapBaseTool {
|
|
|
172
172
|
this.segmentAI.rejectPreview(enabledElement.viewport.element);
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
+
shouldResolvePreviewRequests() {
|
|
176
|
+
const MARKER_TOOLS = [
|
|
177
|
+
ONNXSegmentationController.MarkerInclude,
|
|
178
|
+
ONNXSegmentationController.MarkerExclude,
|
|
179
|
+
ONNXSegmentationController.BoxPrompt,
|
|
180
|
+
];
|
|
181
|
+
const toolGroup = this._getToolGroupId();
|
|
182
|
+
if (!toolGroup) {
|
|
183
|
+
console.debug(`Tool group not found for tool: ${MarkerLabelmapTool.toolName}`);
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
return (this.hasPreviewData() &&
|
|
187
|
+
MARKER_TOOLS.some((markerToolName) => {
|
|
188
|
+
if (toolGroup.hasTool(markerToolName)) {
|
|
189
|
+
const instance = toolGroup.getToolInstance(markerToolName);
|
|
190
|
+
return instance.mode === 'Active' || instance.mode === 'Enabled';
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
175
194
|
}
|
|
176
195
|
export default MarkerLabelmapTool;
|
|
@@ -551,7 +551,8 @@ export default class ONNXSegmentationController {
|
|
|
551
551
|
renderArguments.viewReference = viewRef;
|
|
552
552
|
renderArguments.imageId = null;
|
|
553
553
|
}
|
|
554
|
-
imageSession.canvasPosition =
|
|
554
|
+
imageSession.canvasPosition =
|
|
555
|
+
await utilities.loadImageToCanvas(renderArguments);
|
|
555
556
|
canvas.style.width = size;
|
|
556
557
|
canvas.style.height = size;
|
|
557
558
|
if (isCurrent) {
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.0.0-beta.
|
|
1
|
+
export declare const version = "4.0.0-beta.5";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.0.0-beta.
|
|
1
|
+
export const version = '4.0.0-beta.5';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/ai",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.5",
|
|
4
4
|
"description": "AI and ML Interfaces for Cornerstone3D",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"build:all": "yarn run build:esm",
|
|
37
37
|
"start": "tsc --project ./tsconfig.json --watch",
|
|
38
38
|
"format": "prettier --write 'src/**/*.js' 'test/**/*.js'",
|
|
39
|
-
"lint": "
|
|
40
|
-
"format-check": "npx eslint ./src --quiet",
|
|
39
|
+
"lint": "oxlint .",
|
|
41
40
|
"api-check": "api-extractor --debug run ",
|
|
42
41
|
"prepublishOnly": "yarn clean && yarn build"
|
|
43
42
|
},
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"dependencies": {
|
|
55
54
|
"@babel/runtime-corejs2": "^7.17.8",
|
|
56
55
|
"buffer": "^6.0.3",
|
|
57
|
-
"dcmjs": "^0.
|
|
56
|
+
"dcmjs": "^0.43.1",
|
|
58
57
|
"gl-matrix": "^3.4.3",
|
|
59
58
|
"lodash.clonedeep": "^4.5.0",
|
|
60
59
|
"ndarray": "^1.0.19",
|
|
@@ -62,8 +61,8 @@
|
|
|
62
61
|
"onnxruntime-web": "1.17.1"
|
|
63
62
|
},
|
|
64
63
|
"peerDependencies": {
|
|
65
|
-
"@cornerstonejs/core": "^4.0.0-beta.
|
|
66
|
-
"@cornerstonejs/tools": "^4.0.0-beta.
|
|
64
|
+
"@cornerstonejs/core": "^4.0.0-beta.5",
|
|
65
|
+
"@cornerstonejs/tools": "^4.0.0-beta.5"
|
|
67
66
|
},
|
|
68
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "c983ea46160362885b27f3c72cc84731cfe86b99"
|
|
69
68
|
}
|