@cornerstonejs/tools 0.28.0 → 0.29.0
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/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tools/ReferenceLinesTool.d.ts +25 -0
- package/dist/cjs/tools/ReferenceLinesTool.js +152 -0
- package/dist/cjs/tools/ReferenceLinesTool.js.map +1 -0
- package/dist/cjs/tools/index.d.ts +2 -1
- package/dist/cjs/tools/index.js +3 -1
- package/dist/cjs/tools/index.js.map +1 -1
- package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +7 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tools/ReferenceLinesTool.d.ts +25 -0
- package/dist/esm/tools/ReferenceLinesTool.js +146 -0
- package/dist/esm/tools/ReferenceLinesTool.js.map +1 -0
- package/dist/esm/tools/index.d.ts +2 -1
- package/dist/esm/tools/index.js +2 -1
- package/dist/esm/tools/index.js.map +1 -1
- package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +7 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ import * as cursors from './cursors';
|
|
|
8
8
|
import * as Types from './types';
|
|
9
9
|
import * as annotation from './stateManagement/annotation';
|
|
10
10
|
import * as segmentation from './stateManagement/segmentation';
|
|
11
|
-
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool } from './tools';
|
|
11
|
+
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool } from './tools';
|
|
12
12
|
import * as Enums from './enums';
|
|
13
|
-
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
|
13
|
+
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
package/dist/cjs/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.MagnifyTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
|
|
26
|
+
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.MagnifyTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.ReferenceLinesTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
|
|
27
27
|
const init_1 = require("./init");
|
|
28
28
|
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_1.init; } });
|
|
29
29
|
Object.defineProperty(exports, "destroy", { enumerable: true, get: function () { return init_1.destroy; } });
|
|
@@ -71,6 +71,7 @@ Object.defineProperty(exports, "BidirectionalTool", { enumerable: true, get: fun
|
|
|
71
71
|
Object.defineProperty(exports, "PlanarFreehandROITool", { enumerable: true, get: function () { return tools_1.PlanarFreehandROITool; } });
|
|
72
72
|
Object.defineProperty(exports, "ArrowAnnotateTool", { enumerable: true, get: function () { return tools_1.ArrowAnnotateTool; } });
|
|
73
73
|
Object.defineProperty(exports, "CrosshairsTool", { enumerable: true, get: function () { return tools_1.CrosshairsTool; } });
|
|
74
|
+
Object.defineProperty(exports, "ReferenceLinesTool", { enumerable: true, get: function () { return tools_1.ReferenceLinesTool; } });
|
|
74
75
|
Object.defineProperty(exports, "RectangleScissorsTool", { enumerable: true, get: function () { return tools_1.RectangleScissorsTool; } });
|
|
75
76
|
Object.defineProperty(exports, "CircleScissorsTool", { enumerable: true, get: function () { return tools_1.CircleScissorsTool; } });
|
|
76
77
|
Object.defineProperty(exports, "SphereScissorsTool", { enumerable: true, get: function () { return tools_1.SphereScissorsTool; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;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jB,+FArCA,sBAAc,OAqCA;AACd,mGArCA,0BAAkB,OAqCA;AAYlB,sGAhDA,6BAAqB,OAgDA;AACrB,mGAhDA,0BAAkB,OAgDA;AAClB,mGAhDA,0BAAkB,OAgDA;AAClB,0GAhDA,iCAAyB,OAgDA;AACzB,kHAhDA,yCAAiC,OAgDA;AANjC,wGAzCA,+BAAuB,OAyCA;AAOvB,0FA/CA,iBAAS,OA+CA;AAVT,0FApCA,iBAAS,OAoCA;AACT,4FApCA,mBAAW,OAoCA;AAjCb,+CAAiC;AAoD/B,sBAAK"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
|
|
3
|
+
import { ReferenceLineAnnotation } from '../types/ToolSpecificAnnotationTypes';
|
|
4
|
+
import AnnotationDisplayTool from './base/AnnotationDisplayTool';
|
|
5
|
+
declare class ReferenceLines extends AnnotationDisplayTool {
|
|
6
|
+
static toolName: any;
|
|
7
|
+
touchDragCallback: any;
|
|
8
|
+
mouseDragCallback: any;
|
|
9
|
+
_throttledCalculateCachedStats: any;
|
|
10
|
+
editData: {
|
|
11
|
+
renderingEngine: any;
|
|
12
|
+
sourceViewport: any;
|
|
13
|
+
annotation: ReferenceLineAnnotation;
|
|
14
|
+
} | null;
|
|
15
|
+
isDrawing: boolean;
|
|
16
|
+
isHandleOutsideImage: boolean;
|
|
17
|
+
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
|
|
18
|
+
_init: () => void;
|
|
19
|
+
onSetToolEnabled: () => void;
|
|
20
|
+
onCameraModified: (evt: Types.EventTypes.CameraModifiedEvent) => void;
|
|
21
|
+
renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
|
|
22
|
+
isPerpendicular: (vec1: Types.Point3, vec2: Types.Point3) => boolean;
|
|
23
|
+
isParallel(vec1: Types.Point3, vec2: Types.Point3): boolean;
|
|
24
|
+
}
|
|
25
|
+
export default ReferenceLines;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
7
|
+
const core_1 = require("@cornerstonejs/core");
|
|
8
|
+
const annotationState_1 = require("../stateManagement/annotation/annotationState");
|
|
9
|
+
const drawingSvg_1 = require("../drawingSvg");
|
|
10
|
+
const viewportFilters_1 = require("../utilities/viewportFilters");
|
|
11
|
+
const triggerAnnotationRenderForViewportIds_1 = __importDefault(require("../utilities/triggerAnnotationRenderForViewportIds"));
|
|
12
|
+
const AnnotationDisplayTool_1 = __importDefault(require("./base/AnnotationDisplayTool"));
|
|
13
|
+
const { EPSILON } = core_1.CONSTANTS;
|
|
14
|
+
class ReferenceLines extends AnnotationDisplayTool_1.default {
|
|
15
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
16
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
17
|
+
configuration: {
|
|
18
|
+
sourceViewportId: '',
|
|
19
|
+
},
|
|
20
|
+
}) {
|
|
21
|
+
super(toolProps, defaultToolProps);
|
|
22
|
+
this.editData = {};
|
|
23
|
+
this._init = () => {
|
|
24
|
+
const renderingEngines = (0, core_1.getRenderingEngines)();
|
|
25
|
+
const renderingEngine = renderingEngines[0];
|
|
26
|
+
if (!renderingEngine) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let viewports = renderingEngine.getViewports();
|
|
30
|
+
viewports = (0, viewportFilters_1.filterViewportsWithToolEnabled)(viewports, this.getToolName());
|
|
31
|
+
const sourceViewport = renderingEngine.getViewport(this.configuration.sourceViewportId);
|
|
32
|
+
if (!sourceViewport || !sourceViewport.getImageData()) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const { element } = sourceViewport;
|
|
36
|
+
const { viewUp, viewPlaneNormal } = sourceViewport.getCamera();
|
|
37
|
+
const sourceViewportCanvasCornersInWorld = core_1.utilities.getViewportImageCornersInWorld(sourceViewport);
|
|
38
|
+
let annotation = this.editData.annotation;
|
|
39
|
+
if (!annotation) {
|
|
40
|
+
const newAnnotation = {
|
|
41
|
+
highlighted: true,
|
|
42
|
+
invalidated: true,
|
|
43
|
+
metadata: {
|
|
44
|
+
toolName: this.getToolName(),
|
|
45
|
+
viewPlaneNormal: [...viewPlaneNormal],
|
|
46
|
+
viewUp: [...viewUp],
|
|
47
|
+
FrameOfReferenceUID: sourceViewport.getFrameOfReferenceUID(),
|
|
48
|
+
referencedImageId: null,
|
|
49
|
+
},
|
|
50
|
+
data: {
|
|
51
|
+
handles: {
|
|
52
|
+
points: sourceViewportCanvasCornersInWorld,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
(0, annotationState_1.addAnnotation)(element, newAnnotation);
|
|
57
|
+
annotation = newAnnotation;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.editData.annotation.data.handles.points =
|
|
61
|
+
sourceViewportCanvasCornersInWorld;
|
|
62
|
+
}
|
|
63
|
+
this.editData = {
|
|
64
|
+
sourceViewport,
|
|
65
|
+
renderingEngine,
|
|
66
|
+
annotation,
|
|
67
|
+
};
|
|
68
|
+
(0, triggerAnnotationRenderForViewportIds_1.default)(renderingEngine, viewports
|
|
69
|
+
.filter((viewport) => viewport.id !== sourceViewport.id)
|
|
70
|
+
.map((viewport) => viewport.id));
|
|
71
|
+
};
|
|
72
|
+
this.onSetToolEnabled = () => {
|
|
73
|
+
this._init();
|
|
74
|
+
};
|
|
75
|
+
this.onCameraModified = (evt) => {
|
|
76
|
+
this._init();
|
|
77
|
+
};
|
|
78
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
const { viewport: targetViewport } = enabledElement;
|
|
81
|
+
const { annotation, sourceViewport } = this.editData;
|
|
82
|
+
let renderStatus = false;
|
|
83
|
+
if (!sourceViewport) {
|
|
84
|
+
return renderStatus;
|
|
85
|
+
}
|
|
86
|
+
if (sourceViewport.id === targetViewport.id) {
|
|
87
|
+
return renderStatus;
|
|
88
|
+
}
|
|
89
|
+
if (!annotation || !((_b = (_a = annotation === null || annotation === void 0 ? void 0 : annotation.data) === null || _a === void 0 ? void 0 : _a.handles) === null || _b === void 0 ? void 0 : _b.points)) {
|
|
90
|
+
return renderStatus;
|
|
91
|
+
}
|
|
92
|
+
const styleSpecifier = {
|
|
93
|
+
toolGroupId: this.toolGroupId,
|
|
94
|
+
toolName: this.getToolName(),
|
|
95
|
+
viewportId: enabledElement.viewport.id,
|
|
96
|
+
};
|
|
97
|
+
const topLeft = annotation.data.handles.points[0];
|
|
98
|
+
const topRight = annotation.data.handles.points[1];
|
|
99
|
+
const bottomLeft = annotation.data.handles.points[2];
|
|
100
|
+
const bottomRight = annotation.data.handles.points[3];
|
|
101
|
+
const { focalPoint, viewPlaneNormal } = targetViewport.getCamera();
|
|
102
|
+
const { viewPlaneNormal: sourceViewPlaneNormal } = sourceViewport.getCamera();
|
|
103
|
+
if (this.isParallel(viewPlaneNormal, sourceViewPlaneNormal)) {
|
|
104
|
+
return renderStatus;
|
|
105
|
+
}
|
|
106
|
+
const targetViewportPlane = core_1.utilities.planar.planeEquation(viewPlaneNormal, focalPoint);
|
|
107
|
+
const pointSet1 = [topLeft, bottomLeft, topRight, bottomRight];
|
|
108
|
+
const pointSet2 = [topLeft, topRight, bottomLeft, bottomRight];
|
|
109
|
+
let pointSetToUse = pointSet1;
|
|
110
|
+
let topBottomVec = gl_matrix_1.vec3.subtract(gl_matrix_1.vec3.create(), pointSet1[0], pointSet1[1]);
|
|
111
|
+
topBottomVec = gl_matrix_1.vec3.normalize(gl_matrix_1.vec3.create(), topBottomVec);
|
|
112
|
+
let topRightVec = gl_matrix_1.vec3.subtract(gl_matrix_1.vec3.create(), pointSet1[2], pointSet1[0]);
|
|
113
|
+
topRightVec = gl_matrix_1.vec3.normalize(gl_matrix_1.vec3.create(), topRightVec);
|
|
114
|
+
const newNormal = gl_matrix_1.vec3.cross(gl_matrix_1.vec3.create(), topBottomVec, topRightVec);
|
|
115
|
+
if (this.isParallel(newNormal, viewPlaneNormal)) {
|
|
116
|
+
return renderStatus;
|
|
117
|
+
}
|
|
118
|
+
if (this.isPerpendicular(topBottomVec, viewPlaneNormal)) {
|
|
119
|
+
pointSetToUse = pointSet2;
|
|
120
|
+
}
|
|
121
|
+
const lineStartWorld = core_1.utilities.planar.linePlaneIntersection(pointSetToUse[0], pointSetToUse[1], targetViewportPlane);
|
|
122
|
+
const lineEndWorld = core_1.utilities.planar.linePlaneIntersection(pointSetToUse[2], pointSetToUse[3], targetViewportPlane);
|
|
123
|
+
const { annotationUID } = annotation;
|
|
124
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
125
|
+
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
126
|
+
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
127
|
+
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
128
|
+
const shadow = this.getStyle('shadow', styleSpecifier, annotation);
|
|
129
|
+
const canvasCoordinates = [lineStartWorld, lineEndWorld].map((world) => targetViewport.worldToCanvas(world));
|
|
130
|
+
const dataId = `${annotationUID}-line`;
|
|
131
|
+
const lineUID = '1';
|
|
132
|
+
(0, drawingSvg_1.drawLine)(svgDrawingHelper, annotationUID, lineUID, canvasCoordinates[0], canvasCoordinates[1], {
|
|
133
|
+
color,
|
|
134
|
+
width: lineWidth,
|
|
135
|
+
lineDash,
|
|
136
|
+
shadow,
|
|
137
|
+
}, dataId);
|
|
138
|
+
renderStatus = true;
|
|
139
|
+
return renderStatus;
|
|
140
|
+
};
|
|
141
|
+
this.isPerpendicular = (vec1, vec2) => {
|
|
142
|
+
const dot = gl_matrix_1.vec3.dot(vec1, vec2);
|
|
143
|
+
return Math.abs(dot) < EPSILON;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
isParallel(vec1, vec2) {
|
|
147
|
+
return Math.abs(gl_matrix_1.vec3.dot(vec1, vec2)) > 1 - EPSILON;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
ReferenceLines.toolName = 'ReferenceLines';
|
|
151
|
+
exports.default = ReferenceLines;
|
|
152
|
+
//# sourceMappingURL=ReferenceLinesTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferenceLinesTool.js","sourceRoot":"","sources":["../../../src/tools/ReferenceLinesTool.ts"],"names":[],"mappings":";;;;;AAAA,yCAAiC;AACjC,8CAI6B;AAG7B,mFAA8E;AAE9E,8CAAwD;AACxD,kEAA8E;AAC9E,+HAAuG;AAKvG,yFAAiE;AAEjE,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAS,CAAC;AAM9B,MAAM,cAAe,SAAQ,+BAAqB;IAchD,YACE,YAA6B,EAAE,EAC/B,mBAA8B;QAC5B,yBAAyB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAC7C,aAAa,EAAE;YACb,gBAAgB,EAAE,EAAE;SACrB;KACF;QAED,KAAK,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;QAjBrC,aAAQ,GAIG,EAAS,CAAC;QAsBrB,UAAK,GAAG,GAAS,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,0BAAmB,GAAE,CAAC;YAC/C,MAAM,eAAe,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;YAG5C,IAAI,CAAC,eAAe,EAAE;gBACpB,OAAO;aACR;YAED,IAAI,SAAS,GAAG,eAAe,CAAC,YAAY,EAAE,CAAC;YAC/C,SAAS,GAAG,IAAA,gDAA8B,EAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YAE1E,MAAM,cAAc,GAAG,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MAAM,GAAG,GAAG,aAAa,OAAO,CAAC;YACvC,MAAM,OAAO,GAAG,GAAG,CAAC;YACpB,IAAA,qBAAW,EACT,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,iBAAiB,CAAC,CAAC,CAAC,EACpB,iBAAiB,CAAC,CAAC,CAAC,EACpB;gBACE,KAAK;gBACL,KAAK,EAAE,SAAS;gBAChB,QAAQ;gBACR,MAAM;aACP,EACD,MAAM,CACP,CAAC;YAEF,YAAY,GAAG,IAAI,CAAC;YAEpB,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QAEF,oBAAe,GAAG,CAAC,IAAkB,EAAE,IAAkB,EAAW,EAAE;YACpE,MAAM,GAAG,GAAG,gBAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;QACjC,CAAC,CAAC;IAtNF,CAAC;IAwND,UAAU,CAAC,IAAkB,EAAE,IAAkB;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;IACtD,CAAC;CACF;AAED,cAAc,CAAC,QAAQ,GAAG,gBAAgB,CAAC;AAC3C,kBAAe,cAAc,CAAC"}
|
|
@@ -9,6 +9,7 @@ import VolumeRotateMouseWheelTool from './VolumeRotateMouseWheelTool';
|
|
|
9
9
|
import MIPJumpToClickTool from './MIPJumpToClickTool';
|
|
10
10
|
import CrosshairsTool from './CrosshairsTool';
|
|
11
11
|
import MagnifyTool from './MagnifyTool';
|
|
12
|
+
import ReferenceLinesTool from './ReferenceLinesTool';
|
|
12
13
|
import BidirectionalTool from './annotation/BidirectionalTool';
|
|
13
14
|
import LengthTool from './annotation/LengthTool';
|
|
14
15
|
import ProbeTool from './annotation/ProbeTool';
|
|
@@ -25,4 +26,4 @@ import SphereScissorsTool from './segmentation/SphereScissorsTool';
|
|
|
25
26
|
import RectangleROIThresholdTool from './segmentation/RectangleROIThresholdTool';
|
|
26
27
|
import RectangleROIStartEndThresholdTool from './segmentation/RectangleROIStartEndThresholdTool';
|
|
27
28
|
import BrushTool from './segmentation/BrushTool';
|
|
28
|
-
export { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, CrosshairsTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, MagnifyTool, };
|
|
29
|
+
export { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, CrosshairsTool, ReferenceLinesTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, MagnifyTool, };
|
package/dist/cjs/tools/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MagnifyTool = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.LengthTool = exports.BidirectionalTool = exports.CrosshairsTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.ZoomTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = void 0;
|
|
6
|
+
exports.MagnifyTool = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.LengthTool = exports.BidirectionalTool = exports.ReferenceLinesTool = exports.CrosshairsTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.ZoomTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = void 0;
|
|
7
7
|
const base_1 = require("./base");
|
|
8
8
|
Object.defineProperty(exports, "BaseTool", { enumerable: true, get: function () { return base_1.BaseTool; } });
|
|
9
9
|
Object.defineProperty(exports, "AnnotationTool", { enumerable: true, get: function () { return base_1.AnnotationTool; } });
|
|
@@ -27,6 +27,8 @@ const CrosshairsTool_1 = __importDefault(require("./CrosshairsTool"));
|
|
|
27
27
|
exports.CrosshairsTool = CrosshairsTool_1.default;
|
|
28
28
|
const MagnifyTool_1 = __importDefault(require("./MagnifyTool"));
|
|
29
29
|
exports.MagnifyTool = MagnifyTool_1.default;
|
|
30
|
+
const ReferenceLinesTool_1 = __importDefault(require("./ReferenceLinesTool"));
|
|
31
|
+
exports.ReferenceLinesTool = ReferenceLinesTool_1.default;
|
|
30
32
|
const BidirectionalTool_1 = __importDefault(require("./annotation/BidirectionalTool"));
|
|
31
33
|
exports.BidirectionalTool = BidirectionalTool_1.default;
|
|
32
34
|
const LengthTool_1 = __importDefault(require("./annotation/LengthTool"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAkD;AAoChD,yFApCO,eAAQ,OAoCP;AACR,+FArCiB,qBAAc,OAqCjB;AApChB,wDAAgC;AAsC9B,kBAtCK,iBAAO,CAsCL;AArCT,gFAAwD;AAsCtD,8BAtCK,6BAAmB,CAsCL;AArCrB,wEAAgD;AAuC9C,0BAvCK,yBAAe,CAuCL;AAtCjB,wEAAgD;AAuC9C,0BAvCK,yBAAe,CAuCL;AAtCjB,oGAAwE;AAuCtE,oCAvCK,uCAAyB,CAuCL;AAtC3B,0DAAkC;AAuChC,mBAvCK,kBAAQ,CAuCL;AAtCV,8FAAsE;AAuCpE,qCAvCK,oCAA0B,CAuCL;AAtC5B,8EAAsD;AAuCpD,6BAvCK,4BAAkB,CAuCL;AAtCpB,sEAA8C;AAwC5C,yBAxCK,wBAAc,CAwCL;AAvChB,gEAAwC;AA0DtC,sBA1DK,qBAAW,CA0DL;AAzDb,8EAAsD;AAuCpD,6BAvCK,4BAAkB,CAuCL;AArCpB,uFAA+D;AAsC7D,4BAtCK,2BAAiB,CAsCL;AArCnB,yEAAiD;AAsC/C,qBAtCK,oBAAU,CAsCL;AArCZ,uEAA+C;AAsC7C,oBAtCK,mBAAS,CAsCL;AArCX,+EAAuD;AAyBrD,wBAzBK,uBAAa,CAyBL;AAxBf,qFAA6D;AAqC3D,2BArCK,0BAAgB,CAqCL;AApClB,uFAA+D;AAqC7D,4BArCK,2BAAiB,CAqCL;AApCnB,+FAAuE;AAqCrE,gCArCK,+BAAqB,CAqCL;AApCvB,uFAA+D;AAqC7D,4BArCK,2BAAiB,CAqCL;AApCnB,uEAA+C;AAqC7C,oBArCK,mBAAS,CAqCL;AAlCX,qGAA6E;AAoC3E,kCApCK,iCAAuB,CAoCL;AAjCzB,iGAAyE;AAmCvE,gCAnCK,+BAAqB,CAmCL;AAlCvB,2FAAmE;AAmCjE,6BAnCK,4BAAkB,CAmCL;AAlCpB,2FAAmE;AAmCjE,6BAnCK,4BAAkB,CAmCL;AAlCpB,yGAAiF;AAmC/E,oCAnCK,mCAAyB,CAmCL;AAlC3B,yHAAiG;AAmC/F,4CAnCK,2CAAiC,CAmCL;AAlCnC,yEAAiD;AAmC/C,oBAnCK,mBAAS,CAmCL"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ import * as cursors from './cursors';
|
|
|
8
8
|
import * as Types from './types';
|
|
9
9
|
import * as annotation from './stateManagement/annotation';
|
|
10
10
|
import * as segmentation from './stateManagement/segmentation';
|
|
11
|
-
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool } from './tools';
|
|
11
|
+
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool } from './tools';
|
|
12
12
|
import * as Enums from './enums';
|
|
13
|
-
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
|
13
|
+
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
package/dist/esm/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as cursors from './cursors';
|
|
|
8
8
|
import * as Types from './types';
|
|
9
9
|
import * as annotation from './stateManagement/annotation';
|
|
10
10
|
import * as segmentation from './stateManagement/segmentation';
|
|
11
|
-
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool, } from './tools';
|
|
11
|
+
import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, MagnifyTool, } from './tools';
|
|
12
12
|
import * as Enums from './enums';
|
|
13
|
-
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
|
13
|
+
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, MagnifyTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EACL,QAAQ,EACR,cAAc,EACd,OAAO,EACP,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,iCAAiC,EACjC,uBAAuB,EACvB,SAAS,EACT,SAAS,EACT,WAAW,GACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAEL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,yBAAyB,EAEzB,QAAQ,EACR,cAAc,EAEd,OAAO,EACP,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAElB,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACT,WAAW,EAEX,uBAAuB,EAEvB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,iCAAiC,EACjC,SAAS,EAET,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,KAAK,EAEL,gBAAgB,EAEhB,KAAK,EAEL,SAAS,EAET,OAAO,EAEP,UAAU,EAEV,YAAY,EAEZ,SAAS,EACT,OAAO,GACR,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,cAAc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EAET,OAAO,EAEP,UAAU,EAEV,YAAY,EAEZ,SAAS,EACT,OAAO,GACR,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
|
|
3
|
+
import { ReferenceLineAnnotation } from '../types/ToolSpecificAnnotationTypes';
|
|
4
|
+
import AnnotationDisplayTool from './base/AnnotationDisplayTool';
|
|
5
|
+
declare class ReferenceLines extends AnnotationDisplayTool {
|
|
6
|
+
static toolName: any;
|
|
7
|
+
touchDragCallback: any;
|
|
8
|
+
mouseDragCallback: any;
|
|
9
|
+
_throttledCalculateCachedStats: any;
|
|
10
|
+
editData: {
|
|
11
|
+
renderingEngine: any;
|
|
12
|
+
sourceViewport: any;
|
|
13
|
+
annotation: ReferenceLineAnnotation;
|
|
14
|
+
} | null;
|
|
15
|
+
isDrawing: boolean;
|
|
16
|
+
isHandleOutsideImage: boolean;
|
|
17
|
+
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
|
|
18
|
+
_init: () => void;
|
|
19
|
+
onSetToolEnabled: () => void;
|
|
20
|
+
onCameraModified: (evt: Types.EventTypes.CameraModifiedEvent) => void;
|
|
21
|
+
renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
|
|
22
|
+
isPerpendicular: (vec1: Types.Point3, vec2: Types.Point3) => boolean;
|
|
23
|
+
isParallel(vec1: Types.Point3, vec2: Types.Point3): boolean;
|
|
24
|
+
}
|
|
25
|
+
export default ReferenceLines;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { vec3 } from 'gl-matrix';
|
|
2
|
+
import { getRenderingEngines, CONSTANTS, utilities as csUtils, } from '@cornerstonejs/core';
|
|
3
|
+
import { addAnnotation } from '../stateManagement/annotation/annotationState';
|
|
4
|
+
import { drawLine as drawLineSvg } from '../drawingSvg';
|
|
5
|
+
import { filterViewportsWithToolEnabled } from '../utilities/viewportFilters';
|
|
6
|
+
import triggerAnnotationRenderForViewportIds from '../utilities/triggerAnnotationRenderForViewportIds';
|
|
7
|
+
import AnnotationDisplayTool from './base/AnnotationDisplayTool';
|
|
8
|
+
const { EPSILON } = CONSTANTS;
|
|
9
|
+
class ReferenceLines extends AnnotationDisplayTool {
|
|
10
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
11
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
12
|
+
configuration: {
|
|
13
|
+
sourceViewportId: '',
|
|
14
|
+
},
|
|
15
|
+
}) {
|
|
16
|
+
super(toolProps, defaultToolProps);
|
|
17
|
+
this.editData = {};
|
|
18
|
+
this._init = () => {
|
|
19
|
+
const renderingEngines = getRenderingEngines();
|
|
20
|
+
const renderingEngine = renderingEngines[0];
|
|
21
|
+
if (!renderingEngine) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
let viewports = renderingEngine.getViewports();
|
|
25
|
+
viewports = filterViewportsWithToolEnabled(viewports, this.getToolName());
|
|
26
|
+
const sourceViewport = renderingEngine.getViewport(this.configuration.sourceViewportId);
|
|
27
|
+
if (!sourceViewport || !sourceViewport.getImageData()) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const { element } = sourceViewport;
|
|
31
|
+
const { viewUp, viewPlaneNormal } = sourceViewport.getCamera();
|
|
32
|
+
const sourceViewportCanvasCornersInWorld = csUtils.getViewportImageCornersInWorld(sourceViewport);
|
|
33
|
+
let annotation = this.editData.annotation;
|
|
34
|
+
if (!annotation) {
|
|
35
|
+
const newAnnotation = {
|
|
36
|
+
highlighted: true,
|
|
37
|
+
invalidated: true,
|
|
38
|
+
metadata: {
|
|
39
|
+
toolName: this.getToolName(),
|
|
40
|
+
viewPlaneNormal: [...viewPlaneNormal],
|
|
41
|
+
viewUp: [...viewUp],
|
|
42
|
+
FrameOfReferenceUID: sourceViewport.getFrameOfReferenceUID(),
|
|
43
|
+
referencedImageId: null,
|
|
44
|
+
},
|
|
45
|
+
data: {
|
|
46
|
+
handles: {
|
|
47
|
+
points: sourceViewportCanvasCornersInWorld,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
addAnnotation(element, newAnnotation);
|
|
52
|
+
annotation = newAnnotation;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.editData.annotation.data.handles.points =
|
|
56
|
+
sourceViewportCanvasCornersInWorld;
|
|
57
|
+
}
|
|
58
|
+
this.editData = {
|
|
59
|
+
sourceViewport,
|
|
60
|
+
renderingEngine,
|
|
61
|
+
annotation,
|
|
62
|
+
};
|
|
63
|
+
triggerAnnotationRenderForViewportIds(renderingEngine, viewports
|
|
64
|
+
.filter((viewport) => viewport.id !== sourceViewport.id)
|
|
65
|
+
.map((viewport) => viewport.id));
|
|
66
|
+
};
|
|
67
|
+
this.onSetToolEnabled = () => {
|
|
68
|
+
this._init();
|
|
69
|
+
};
|
|
70
|
+
this.onCameraModified = (evt) => {
|
|
71
|
+
this._init();
|
|
72
|
+
};
|
|
73
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
74
|
+
const { viewport: targetViewport } = enabledElement;
|
|
75
|
+
const { annotation, sourceViewport } = this.editData;
|
|
76
|
+
let renderStatus = false;
|
|
77
|
+
if (!sourceViewport) {
|
|
78
|
+
return renderStatus;
|
|
79
|
+
}
|
|
80
|
+
if (sourceViewport.id === targetViewport.id) {
|
|
81
|
+
return renderStatus;
|
|
82
|
+
}
|
|
83
|
+
if (!annotation || !annotation?.data?.handles?.points) {
|
|
84
|
+
return renderStatus;
|
|
85
|
+
}
|
|
86
|
+
const styleSpecifier = {
|
|
87
|
+
toolGroupId: this.toolGroupId,
|
|
88
|
+
toolName: this.getToolName(),
|
|
89
|
+
viewportId: enabledElement.viewport.id,
|
|
90
|
+
};
|
|
91
|
+
const topLeft = annotation.data.handles.points[0];
|
|
92
|
+
const topRight = annotation.data.handles.points[1];
|
|
93
|
+
const bottomLeft = annotation.data.handles.points[2];
|
|
94
|
+
const bottomRight = annotation.data.handles.points[3];
|
|
95
|
+
const { focalPoint, viewPlaneNormal } = targetViewport.getCamera();
|
|
96
|
+
const { viewPlaneNormal: sourceViewPlaneNormal } = sourceViewport.getCamera();
|
|
97
|
+
if (this.isParallel(viewPlaneNormal, sourceViewPlaneNormal)) {
|
|
98
|
+
return renderStatus;
|
|
99
|
+
}
|
|
100
|
+
const targetViewportPlane = csUtils.planar.planeEquation(viewPlaneNormal, focalPoint);
|
|
101
|
+
const pointSet1 = [topLeft, bottomLeft, topRight, bottomRight];
|
|
102
|
+
const pointSet2 = [topLeft, topRight, bottomLeft, bottomRight];
|
|
103
|
+
let pointSetToUse = pointSet1;
|
|
104
|
+
let topBottomVec = vec3.subtract(vec3.create(), pointSet1[0], pointSet1[1]);
|
|
105
|
+
topBottomVec = vec3.normalize(vec3.create(), topBottomVec);
|
|
106
|
+
let topRightVec = vec3.subtract(vec3.create(), pointSet1[2], pointSet1[0]);
|
|
107
|
+
topRightVec = vec3.normalize(vec3.create(), topRightVec);
|
|
108
|
+
const newNormal = vec3.cross(vec3.create(), topBottomVec, topRightVec);
|
|
109
|
+
if (this.isParallel(newNormal, viewPlaneNormal)) {
|
|
110
|
+
return renderStatus;
|
|
111
|
+
}
|
|
112
|
+
if (this.isPerpendicular(topBottomVec, viewPlaneNormal)) {
|
|
113
|
+
pointSetToUse = pointSet2;
|
|
114
|
+
}
|
|
115
|
+
const lineStartWorld = csUtils.planar.linePlaneIntersection(pointSetToUse[0], pointSetToUse[1], targetViewportPlane);
|
|
116
|
+
const lineEndWorld = csUtils.planar.linePlaneIntersection(pointSetToUse[2], pointSetToUse[3], targetViewportPlane);
|
|
117
|
+
const { annotationUID } = annotation;
|
|
118
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
119
|
+
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
120
|
+
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
121
|
+
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
122
|
+
const shadow = this.getStyle('shadow', styleSpecifier, annotation);
|
|
123
|
+
const canvasCoordinates = [lineStartWorld, lineEndWorld].map((world) => targetViewport.worldToCanvas(world));
|
|
124
|
+
const dataId = `${annotationUID}-line`;
|
|
125
|
+
const lineUID = '1';
|
|
126
|
+
drawLineSvg(svgDrawingHelper, annotationUID, lineUID, canvasCoordinates[0], canvasCoordinates[1], {
|
|
127
|
+
color,
|
|
128
|
+
width: lineWidth,
|
|
129
|
+
lineDash,
|
|
130
|
+
shadow,
|
|
131
|
+
}, dataId);
|
|
132
|
+
renderStatus = true;
|
|
133
|
+
return renderStatus;
|
|
134
|
+
};
|
|
135
|
+
this.isPerpendicular = (vec1, vec2) => {
|
|
136
|
+
const dot = vec3.dot(vec1, vec2);
|
|
137
|
+
return Math.abs(dot) < EPSILON;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
isParallel(vec1, vec2) {
|
|
141
|
+
return Math.abs(vec3.dot(vec1, vec2)) > 1 - EPSILON;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
ReferenceLines.toolName = 'ReferenceLines';
|
|
145
|
+
export default ReferenceLines;
|
|
146
|
+
//# sourceMappingURL=ReferenceLinesTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferenceLinesTool.js","sourceRoot":"","sources":["../../../src/tools/ReferenceLinesTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,SAAS,IAAI,OAAO,GACrB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC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AtNF,CAAC;IAwND,UAAU,CAAC,IAAkB,EAAE,IAAkB;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;IACtD,CAAC;CACF;AAED,cAAc,CAAC,QAAQ,GAAG,gBAAgB,CAAC;AAC3C,eAAe,cAAc,CAAC"}
|
|
@@ -9,6 +9,7 @@ import VolumeRotateMouseWheelTool from './VolumeRotateMouseWheelTool';
|
|
|
9
9
|
import MIPJumpToClickTool from './MIPJumpToClickTool';
|
|
10
10
|
import CrosshairsTool from './CrosshairsTool';
|
|
11
11
|
import MagnifyTool from './MagnifyTool';
|
|
12
|
+
import ReferenceLinesTool from './ReferenceLinesTool';
|
|
12
13
|
import BidirectionalTool from './annotation/BidirectionalTool';
|
|
13
14
|
import LengthTool from './annotation/LengthTool';
|
|
14
15
|
import ProbeTool from './annotation/ProbeTool';
|
|
@@ -25,4 +26,4 @@ import SphereScissorsTool from './segmentation/SphereScissorsTool';
|
|
|
25
26
|
import RectangleROIThresholdTool from './segmentation/RectangleROIThresholdTool';
|
|
26
27
|
import RectangleROIStartEndThresholdTool from './segmentation/RectangleROIStartEndThresholdTool';
|
|
27
28
|
import BrushTool from './segmentation/BrushTool';
|
|
28
|
-
export { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, CrosshairsTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, MagnifyTool, };
|
|
29
|
+
export { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, CrosshairsTool, ReferenceLinesTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, MagnifyTool, };
|
package/dist/esm/tools/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import VolumeRotateMouseWheelTool from './VolumeRotateMouseWheelTool';
|
|
|
9
9
|
import MIPJumpToClickTool from './MIPJumpToClickTool';
|
|
10
10
|
import CrosshairsTool from './CrosshairsTool';
|
|
11
11
|
import MagnifyTool from './MagnifyTool';
|
|
12
|
+
import ReferenceLinesTool from './ReferenceLinesTool';
|
|
12
13
|
import BidirectionalTool from './annotation/BidirectionalTool';
|
|
13
14
|
import LengthTool from './annotation/LengthTool';
|
|
14
15
|
import ProbeTool from './annotation/ProbeTool';
|
|
@@ -25,5 +26,5 @@ import SphereScissorsTool from './segmentation/SphereScissorsTool';
|
|
|
25
26
|
import RectangleROIThresholdTool from './segmentation/RectangleROIThresholdTool';
|
|
26
27
|
import RectangleROIStartEndThresholdTool from './segmentation/RectangleROIStartEndThresholdTool';
|
|
27
28
|
import BrushTool from './segmentation/BrushTool';
|
|
28
|
-
export { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, CrosshairsTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, MagnifyTool, };
|
|
29
|
+
export { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, CrosshairsTool, ReferenceLinesTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, MagnifyTool, };
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,yBAAyB,MAAM,iCAAiC,CAAC;AACxE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,yBAAyB,MAAM,iCAAiC,CAAC;AACxE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