@cornerstonejs/tools 3.11.1 → 3.11.2
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.
|
@@ -205,6 +205,7 @@ class PlanarFreehandROITool extends ContourSegmentationBaseTool {
|
|
|
205
205
|
toolGroupId: this.toolGroupId,
|
|
206
206
|
toolName: this.getToolName(),
|
|
207
207
|
viewportId: enabledElement.viewport.id,
|
|
208
|
+
annotationUID: annotation.annotationUID,
|
|
208
209
|
};
|
|
209
210
|
const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
210
211
|
if (!options.visibility) {
|
|
@@ -12,6 +12,10 @@ declare class ProbeTool extends AnnotationTool {
|
|
|
12
12
|
preventHandleOutsideImage: boolean;
|
|
13
13
|
getTextLines: typeof defaultGetTextLines;
|
|
14
14
|
handleRadius: string;
|
|
15
|
+
textCanvasOffset: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
15
19
|
};
|
|
16
20
|
};
|
|
17
21
|
constructor(toolProps?: PublicToolProps, defaultToolProps?: any);
|
|
@@ -9,6 +9,7 @@ import { state } from '../../store/state';
|
|
|
9
9
|
import { ChangeTypes, Events } from '../../enums';
|
|
10
10
|
import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters';
|
|
11
11
|
import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
|
|
12
|
+
import { isAnnotationVisible } from '../../stateManagement/annotation/annotationVisibility';
|
|
12
13
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
13
14
|
import { getPixelValueUnits } from '../../utilities/getPixelValueUnits';
|
|
14
15
|
import { isViewportPreScaled } from '../../utilities/viewport/isViewportPreScaled';
|
|
@@ -22,6 +23,10 @@ class ProbeTool extends AnnotationTool {
|
|
|
22
23
|
preventHandleOutsideImage: false,
|
|
23
24
|
getTextLines: defaultGetTextLines,
|
|
24
25
|
handleRadius: '6',
|
|
26
|
+
textCanvasOffset: {
|
|
27
|
+
x: 6,
|
|
28
|
+
y: -6,
|
|
29
|
+
},
|
|
25
30
|
},
|
|
26
31
|
}; }
|
|
27
32
|
constructor(toolProps = {}, defaultToolProps) {
|
|
@@ -190,6 +195,9 @@ class ProbeTool extends AnnotationTool {
|
|
|
190
195
|
console.warn('Rendering Engine has been destroyed');
|
|
191
196
|
return renderStatus;
|
|
192
197
|
}
|
|
198
|
+
if (!isAnnotationVisible(annotationUID)) {
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
193
201
|
const handleGroupUID = '0';
|
|
194
202
|
drawHandlesSvg(svgDrawingHelper, annotationUID, handleGroupUID, [canvasCoordinates], { color, lineWidth, handleRadius: this.configuration.handleRadius });
|
|
195
203
|
renderStatus = true;
|
|
@@ -200,8 +208,8 @@ class ProbeTool extends AnnotationTool {
|
|
|
200
208
|
const textLines = this.configuration.getTextLines(data, targetId);
|
|
201
209
|
if (textLines) {
|
|
202
210
|
const textCanvasCoordinates = [
|
|
203
|
-
canvasCoordinates[0] +
|
|
204
|
-
canvasCoordinates[1]
|
|
211
|
+
canvasCoordinates[0] + this.configuration.textCanvasOffset.x,
|
|
212
|
+
canvasCoordinates[1] + this.configuration.textCanvasOffset.y,
|
|
205
213
|
];
|
|
206
214
|
const textUID = '0';
|
|
207
215
|
drawTextBoxSvg(svgDrawingHelper, annotationUID, textUID, textLines, [textCanvasCoordinates[0], textCanvasCoordinates[1]], options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.2",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"canvas": "^3.1.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@cornerstonejs/core": "^3.11.
|
|
106
|
+
"@cornerstonejs/core": "^3.11.2",
|
|
107
107
|
"@kitware/vtk.js": "32.12.1",
|
|
108
108
|
"@types/d3-array": "^3.0.4",
|
|
109
109
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"type": "individual",
|
|
123
123
|
"url": "https://ohif.org/donate"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "844d2cdbb8ced16abf8ed22fdefa9b0e6874b594"
|
|
126
126
|
}
|