@cornerstonejs/tools 3.31.1 → 3.31.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.
|
@@ -27,6 +27,8 @@ class SegmentLabelTool extends BaseTool {
|
|
|
27
27
|
configuration: {
|
|
28
28
|
hoverTimeout: 100,
|
|
29
29
|
searchRadius: 6,
|
|
30
|
+
color: null,
|
|
31
|
+
background: null,
|
|
30
32
|
},
|
|
31
33
|
}) {
|
|
32
34
|
super(toolProps, defaultToolProps);
|
|
@@ -91,7 +93,8 @@ class SegmentLabelTool extends BaseTool {
|
|
|
91
93
|
viewport,
|
|
92
94
|
});
|
|
93
95
|
const segment = activeSegmentation.segments[hoveredSegmentIndex];
|
|
94
|
-
const color =
|
|
96
|
+
const color = this.configuration.color ??
|
|
97
|
+
segmentationConfig.color.getSegmentIndexColor(viewport.id, segmentationId, hoveredSegmentIndex);
|
|
95
98
|
const label = segment?.label;
|
|
96
99
|
const canvasCoordinates = viewport.worldToCanvas(worldPoint);
|
|
97
100
|
this._editData = {
|
|
@@ -124,6 +127,7 @@ class SegmentLabelTool extends BaseTool {
|
|
|
124
127
|
];
|
|
125
128
|
const boundingBox = drawTextBoxSvg(svgDrawingHelper, 'segmentSelectLabelAnnotation', 'segmentSelectLabelTextBox', [hoveredSegmentLabel ?? '(unnamed segment)'], textBoxPosition, {
|
|
126
129
|
color: `rgba(${color[0]}, ${color[1]}, ${color[2]}, ${color[3]})`,
|
|
130
|
+
background: this.configuration.background ?? undefined,
|
|
127
131
|
});
|
|
128
132
|
const left = canvasCoordinates[0];
|
|
129
133
|
const top = canvasCoordinates[1];
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.31.
|
|
1
|
+
export declare const version = "3.31.3";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.31.
|
|
1
|
+
export const version = '3.31.3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.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.1.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@cornerstonejs/core": "^3.31.
|
|
111
|
+
"@cornerstonejs/core": "^3.31.3",
|
|
112
112
|
"@kitware/vtk.js": "32.12.1",
|
|
113
113
|
"@types/d3-array": "^3.0.4",
|
|
114
114
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"type": "individual",
|
|
128
128
|
"url": "https://ohif.org/donate"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "f68f1d6e2f9c4e18f81c51d5d728d8560d6f56cb"
|
|
131
131
|
}
|