@cornerstonejs/tools 4.15.1 → 4.15.3
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.
|
@@ -61,6 +61,17 @@ class RegionSegmentTool extends GrowCutBaseTool {
|
|
|
61
61
|
}
|
|
62
62
|
async getGrowCutLabelmap(growCutData) {
|
|
63
63
|
const { segmentation: { referencedVolumeId }, renderingEngineId, viewportId, circleCenterPoint, circleBorderPoint, options, } = growCutData;
|
|
64
|
+
const { positiveSeedVariance, negativeSeedVariance, positiveStdDevMultiplier, } = this.configuration;
|
|
65
|
+
const baseStdDevMultiplier = positiveStdDevMultiplier ?? 1;
|
|
66
|
+
const currentStdDevMultiplier = options?.positiveStdDevMultiplier
|
|
67
|
+
? Math.max(options.positiveStdDevMultiplier, 0.01)
|
|
68
|
+
: baseStdDevMultiplier;
|
|
69
|
+
const varianceScale = currentStdDevMultiplier / baseStdDevMultiplier;
|
|
70
|
+
const growCutOptions = {
|
|
71
|
+
...options,
|
|
72
|
+
positiveSeedVariance: Math.max(0.01, (positiveSeedVariance ?? 1) * varianceScale),
|
|
73
|
+
negativeSeedVariance: Math.max(0.01, (negativeSeedVariance ?? 1) * varianceScale),
|
|
74
|
+
};
|
|
64
75
|
const renderingEngine = getRenderingEngine(renderingEngineId);
|
|
65
76
|
const viewport = renderingEngine.getViewport(viewportId);
|
|
66
77
|
const worldCircleRadius = vec3.len(vec3.sub(vec3.create(), circleCenterPoint, circleBorderPoint));
|
|
@@ -68,7 +79,7 @@ class RegionSegmentTool extends GrowCutBaseTool {
|
|
|
68
79
|
center: circleCenterPoint,
|
|
69
80
|
radius: worldCircleRadius,
|
|
70
81
|
};
|
|
71
|
-
return growCut.runGrowCutForSphere(referencedVolumeId, sphereInfo, viewport,
|
|
82
|
+
return growCut.runGrowCutForSphere(referencedVolumeId, sphereInfo, viewport, growCutOptions);
|
|
72
83
|
}
|
|
73
84
|
_activateDraw(element) {
|
|
74
85
|
element.addEventListener(Events.MOUSE_UP, this._endCallback);
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.15.
|
|
1
|
+
export declare const version = "4.15.3";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.15.
|
|
1
|
+
export const version = '4.15.3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.3",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"canvas": "3.2.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@cornerstonejs/core": "4.15.
|
|
111
|
+
"@cornerstonejs/core": "4.15.3",
|
|
112
112
|
"@kitware/vtk.js": "34.15.1",
|
|
113
113
|
"@types/d3-array": "3.2.1",
|
|
114
114
|
"@types/d3-interpolate": "3.0.4",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"type": "individual",
|
|
128
128
|
"url": "https://ohif.org/donate"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "5acad7d754b473d4d8b7a298f33b8e5aac66c362"
|
|
131
131
|
}
|