@cornerstonejs/tools 4.5.11 → 4.5.13
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.
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js +3 -0
- package/dist/esm/tools/base/AnnotationTool.d.ts +2 -0
- package/dist/esm/tools/base/AnnotationTool.js +6 -0
- package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.js +4 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +3 -3
|
@@ -28,6 +28,7 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
28
28
|
}) {
|
|
29
29
|
super(toolProps, defaultToolProps);
|
|
30
30
|
this.addNewAnnotation = (evt) => {
|
|
31
|
+
this.startGroupRecording();
|
|
31
32
|
const eventDetail = evt.detail;
|
|
32
33
|
const { currentPoints, element } = eventDetail;
|
|
33
34
|
const worldPos = currentPoints.world;
|
|
@@ -126,6 +127,8 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
126
127
|
triggerAnnotationCompleted(annotation);
|
|
127
128
|
this.createMemo(element, annotation, { newAnnotation: !!this.memo });
|
|
128
129
|
setAnnotationLabel(annotation, element, label);
|
|
130
|
+
this.endGroupRecording();
|
|
131
|
+
this.doneEditMemo();
|
|
129
132
|
triggerAnnotationRenderForViewportIds(viewportIdsToRender);
|
|
130
133
|
});
|
|
131
134
|
}
|
|
@@ -51,6 +51,8 @@ declare abstract class AnnotationTool extends AnnotationDisplayTool {
|
|
|
51
51
|
operationType: string;
|
|
52
52
|
};
|
|
53
53
|
protected createMemo(element: any, annotation: any, options?: any): void;
|
|
54
|
+
protected startGroupRecording(): void;
|
|
55
|
+
protected endGroupRecording(): void;
|
|
54
56
|
protected static hydrateBase<T extends AnnotationTool>(ToolClass: new () => T, enabledElement: Types.IEnabledElement, points: Types.Point3[], options?: {
|
|
55
57
|
annotationUID?: string;
|
|
56
58
|
toolInstance?: T;
|
|
@@ -239,6 +239,12 @@ class AnnotationTool extends AnnotationDisplayTool {
|
|
|
239
239
|
createMemo(element, annotation, options) {
|
|
240
240
|
this.memo ||= AnnotationTool.createAnnotationMemo(element, annotation, options);
|
|
241
241
|
}
|
|
242
|
+
startGroupRecording() {
|
|
243
|
+
DefaultHistoryMemo.startGroupRecording();
|
|
244
|
+
}
|
|
245
|
+
endGroupRecording() {
|
|
246
|
+
DefaultHistoryMemo.endGroupRecording();
|
|
247
|
+
}
|
|
242
248
|
static hydrateBase(ToolClass, enabledElement, points, options = {}) {
|
|
243
249
|
if (!enabledElement) {
|
|
244
250
|
return null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setAnnotationLocked } from '../../stateManagement/annotation/annotationLocking';
|
|
1
2
|
import { getSegmentation } from '../../stateManagement/segmentation/getSegmentation';
|
|
2
3
|
export function addContourSegmentationAnnotation(annotation) {
|
|
3
4
|
if (annotation.parentAnnotationUID) {
|
|
@@ -20,5 +21,8 @@ export function addContourSegmentationAnnotation(annotation) {
|
|
|
20
21
|
annotationsUIDsSet = new Set();
|
|
21
22
|
annotationUIDsMap.set(segmentIndex, annotationsUIDsSet);
|
|
22
23
|
}
|
|
24
|
+
if (segmentation.segments[segmentIndex].locked) {
|
|
25
|
+
setAnnotationLocked(annotation.annotationUID, true);
|
|
26
|
+
}
|
|
23
27
|
annotationUIDsMap.set(segmentIndex, annotationsUIDsSet.add(annotation.annotationUID));
|
|
24
28
|
}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.5.
|
|
1
|
+
export declare const version = "4.5.13";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.5.
|
|
1
|
+
export const version = '4.5.13';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.13",
|
|
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": "4.5.
|
|
111
|
+
"@cornerstonejs/core": "4.5.13",
|
|
112
112
|
"@kitware/vtk.js": "32.12.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": "d1ba756ec155bc6870473d9fdbf4484847b7e03d"
|
|
131
131
|
}
|